
/* 基础重置样式，确保不同浏览器下的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体与背景色，使用黄金比配色 */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    background: linear-gradient(135deg, #1a1a2e 70%, #16213e 25%, #e94560 5%);
    color: #ffffff;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden; /* 防止横向滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(26, 26, 46, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar a {
    color: #e94560;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ffffff;
}

/* 提示信息样式 */
.prompt {
    text-align: center;
    padding: 100px 20px 50px 20px; /* 顶部留出导航栏空间 */
    font-size: 20px;
    font-weight: bold;
    color: #e94560;
}

/* 主内容区域样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* 文章部分样式 */
article {
    background-color: rgba(22, 33, 62, 0.8);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #e94560;
    position: relative;
}

article h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #e94560;
    margin-top: 10px;
    border-radius: 2px;
}

article h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #ffffff;
}

article p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #d1d1d1;
}

article pre {
    background-color: #1a1a2e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

article code {
    color: #e94560;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* 分隔线样式 */
.separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #1a1a2e, #e94560);
    margin: 40px 0;
    border: none;
    border-radius: 1px;
}

/* 按钮样式 */
.button {
    background-color: #0f3460;
    color: #e94560;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.button:hover {
    transform: scale(1.05);
    background-color: #16213e;
}

/* 卡片布局样式 */
.card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
}

/* 代码示例样式 */
.code-sample {
    background-color: #1a1a2e;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
}

.code-sample code {
    color: #e94560;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 动画样式 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }

    article {
        padding: 40px;
    }
}

@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 导航栏下拉菜单样式 */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    background-color: #16213e;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    color: #e94560;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.nav-dropdown-content a:hover {
    background-color: #1a1a2e;
    color: #ffffff;
}

/* 面包屑导航样式 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: #d1d1d1;
}

.breadcrumb a {
    color: #e94560;
    text-decoration: none;
    margin: 0 5px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
.footer {
    background-color: rgba(26, 26, 46, 0.9);
    color: #d1d1d1;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #e94560;
}

.footer a {
    color: #e94560;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

/* 滚动平滑效果 */
html {
    scroll-behavior: smooth;
}

/* 悬停效果 */
.hover-effect:hover {
    color: #ffffff;
    transition: color 0.3s ease;
}

/* 图表样式 */
.chart-container {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 8px;
    padding: 20px;
    transition: background 0.5s ease;
}

.chart-container:hover {
    background: linear-gradient(135deg, #16213e, #1a1a2e);
}

/* 加载动画样式 */
.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #e94560;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 安全性横幅样式 */
.security-banner {
    background-color: #16213e;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 页面切换动画 */
.page-transition {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.page-transition.active {
    opacity: 1;
}

/* 视频与音频元素样式 */
.media-element {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th, .table td {
    padding: 12px;
    border: 1px solid #e94560;
    text-align: left;
}

.table th {
    background-color: #1a1a2e;
    color: #e94560;
}

.table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 浮动按钮样式 */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #e94560;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-button:hover {
    transform: scale(1.1);
    background-color: #ffffff;
    color: #e94560;
}

