
/* 
 * 全局样式设置
 * 设置全局字体、颜色及基本布局
 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，现代感强 */
    color: #FFFFFF; /* 主文字颜色为白色 */
    background: linear-gradient(135deg, #0D47A1, #6A1B9A); /* 主背景渐变色，蓝紫色调 */
    overflow-x: hidden; /* 防止横向滚动 */
}

/* 
 * 导航栏样式
 * 固定在顶部，包含模块导航链接
 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9); /* 半透明背景 */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* 保持在最前 */
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 71, 161, 1); /* 滚动后背景不透明 */
}

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

.navbar a:hover {
    color: #00E676; /* 鼠标悬停时颜色变化 */
}

/* 
 * 侧边导航样式
 * 适用于移动端设备，悬浮在侧边
 */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: none; /* 默认隐藏 */
    flex-direction: column;
}

.side-nav a {
    margin: 10px 0;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.side-nav a:hover {
    color: #00E676;
}

@media (max-width: 768px) {
    .side-nav {
        display: flex; /* 在小屏幕上显示侧边导航 */
    }
    .navbar {
        justify-content: center; /* 中心对齐导航栏内容 */
    }
}

/* 
 * 章节导航样式
 * 清晰的章节导航系统，帮助用户快速定位
 */
.chapter-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
}

.chapter-nav a {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 5px;
    color: #FFFFFF;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.chapter-nav a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* 
 * 内容区域样式
 * 每个模块的基本布局和样式
 */
.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 50px; /* 上下留白 */
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
}

.section:nth-child(even) {
    background: rgba(0, 0, 0, 0.5); /* 偶数模块背景色不同 */
}

.section h2, .section h3 {
    color: #FFEB3B; /* 标题颜色 */
    margin-bottom: 20px;
    text-align: center;
}

.section p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 800px;
    text-align: left;
}

/* 
 * 图片样式
 * 圆角、阴影、悬浮效果
 */
.section img {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 320px;
    height: 320px;
    object-fit: cover;
}

.section img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* 
 * 按钮样式
 * 高亮按钮强调转化动作
 */
.button-highlight {
    background: linear-gradient(45deg, #FF9800, #FB8C00);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button-highlight:hover {
    background: linear-gradient(45deg, #FB8C00, #FF9800);
    transform: scale(1.05);
}

/* 
 * 折叠区域样式
 * 次要信息的隐藏与显示
 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.collapsible:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
}

.content p {
    margin: 10px 0;
}

/* 
 * 代码块样式
 * 美观且与文章内容区分
 */
pre {
    background: #263238;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    color: #00BCD4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 
 * 表格样式
 * 专业且清晰的表格展示
 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #1C2331;
    color: #FFFFFF;
}

thead {
    background: #0D47A1;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #FFFFFF;
}

th {
    font-weight: bold;
}

tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 
 * 动画效果
 * 元素渐显与位移动画
 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 
 * 光晕脉动效果
 * 数据节点的视觉效果
 */
.data-node {
    width: 20px;
    height: 20px;
    background: #00E676;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
    position: absolute;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 
 * 高亮表格样式
 * 强调关键数据
 */
.table-highlight th {
    background: #FF9800;
}

.table-highlight td {
    background: rgba(255, 152, 0, 0.1);
}

/* 
 * 语言切换器样式
 * 多语言支持的按钮设计
 */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.language-switcher button {
    background: #263238;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.language-switcher button:hover {
    background: #00E676;
}

/* 
 * 响应式设计
 * 确保不同设备上的良好显示
 */
@media (max-width: 1920px) and (min-width: 320px) {
    .section {
        padding: 80px 20px;
    }

    .section h2 {
        font-size: 24px;
    }

    .section p {
        font-size: 15px;
    }

    .button-highlight {
        font-size: 15px;
    }
}

