
/* 全局样式设置，包括字体、背景色和总体布局 */
body {
    margin: 0;
    padding: 0;
    background-color: #0A1F44; /* 深蓝色背景，符合科技感主题 */
    color: #FFFFFF; /* 白色字体，确保良好的可读性 */
    font-family: 'Roboto', sans-serif; /* 现代无衬线字体 */
    line-height: 1.6;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #1E2A47; /* 较深的蓝色，主色调 */
    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 ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* 导航链接样式 */
.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00CFFD; /* 电光蓝作为强调色 */
}

/* 主内容容器，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 40px 40px 40px; /* 上方留出导航栏空间 */
}

/* 模块化内容块样式 */
.module {
    background-color: #1E2A47;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* 标题样式 */
h2, h3, h4 {
    color: #FFFFFF;
    margin-bottom: 10px;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid #00CFFD;
    padding-bottom: 5px;
}

h3 {
    font-size: 20px;
    color: #39FF14; /* 荧光绿作为副色 */
}

h4 {
    font-size: 18px;
    color: #00CFFD;
}

/* 段落样式 */
p {
    font-size: 16px;
    color: #CCCCCC;
    margin-bottom: 15px;
}

/* 代码块样式，区别于正文 */
pre {
    background-color: #1E2A47;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

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

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

/* 图片样式，圆角、阴影和悬浮效果 */
img.decorative {
    width: 100%;
    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 8px 16px rgba(0, 0, 0, 0.3);
}

/* 导航菜单移动端样式 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 80px 20px 20px 20px;
    }
}

/* 渐显动画效果 */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 折叠区域样式 */
.collapsible {
    background-color: #1E2A47;
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #00CFFD;
}

.collapsible:after {
    content: '\002B';
    color: #FFFFFF;
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212";
}

.content {
    padding: 0 18px;
    display: none;
    background-color: #0A1F44;
    overflow: hidden;
}

/* 章节导航栏样式 */
.chapter-nav {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: rgba(30, 42, 71, 0.9);
    padding: 15px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.chapter-nav h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #00CFFD;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-nav li {
    margin-bottom: 10px;
}

.chapter-nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #39FF14;
}

/* 加载动画样式 */
.loader {
    border: 8px solid #1E2A47;
    border-top: 8px solid #00CFFD;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式字体大小调整 */
@media (max-width: 768px) {
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    p {
        font-size: 14px;
    }

    .button {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* 切换主题模式按钮样式 */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #00CFFD;
    color: #FFFFFF;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: #39FF14;
}

/* 高亮当前章节导航 */
.chapter-nav a.active {
    color: #39FF14;
    font-weight: bold;
}

/* 金色比例配色 */
:root {
    --main-color: #0A1F44;
    --secondary-color: #1E2A47;
    --accent-color: #00CFFD;
    --highlight-color: #39FF14;
}

/* 背景渐变效果 */
.header {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    padding: 60px 0;
    text-align: center;
    color: #FFFFFF;
}

/* 抽象几何图形动画 */
.geometric-shape {
    width: 100px;
    height: 100px;
    background: var(--accent-color);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    position: absolute;
    top: 20%;
    left: 70%;
    opacity: 0.3;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 卡片悬浮效果 */
.dashboard-widget:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 实时数据展示模块样式 */
.data-display {
    display: flex;
    justify-content: space-around;
    padding: 40px 0;
}

.data-item {
    background-color: #1E2A47;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.data-item:hover {
    background-color: #0A1F44;
}

/* 交互式图表容器样式 */
.chart-container {
    width: 100%;
    height: 400px;
    background-color: #1E2A47;
    border-radius: 8px;
    position: relative;
}

