
/* 主要色彩搭配：科技蓝色调，活力橙色作为点缀 */
:root {
    --primary-color: #002D72; /* 深蓝色，主色调 */
    --secondary-color: #00ADEF; /* 浅蓝色，辅色调 */
    --accent-color: #FFA500; /* 橙色，点缀色 */
    --neutral-light: #f0f0f0; /* 浅灰色，背景色 */
    --neutral-dark: #333333; /* 深灰色，文本色 */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 主要字体 */
}

/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #FFFFFF;
    line-height: 1.6;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 45, 114, 0.9);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 导航栏列表样式 */
.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 导航项样式 */
.navbar li {
    margin: 0 20px;
}

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

/* 导航链接悬停效果 */
.navbar a:hover {
    color: var(--accent-color);
}

/* 页面主容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 顶部留出导航栏空间 */
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* 模块块样式 */
.module {
    grid-column: span 12;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

/* 模块悬停效果 */
.module:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

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

/* 图片悬停效果 */
img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

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

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.6em;
}

h4 {
    font-size: 1.4em;
}

/* 正文段落样式 */
p {
    font-size: 1em;
    color: #FFFFFF;
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9em;
}

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

table, th, td {
    border: 1px solid #FFFFFF;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: rgba(255, 165, 0, 0.8); /* 橙色背景 */
}

td {
    background-color: rgba(0, 45, 114, 0.6); /* 深蓝色背景 */
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: #FFFFFF;
    padding: 10px 15px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

.back-to-top:hover {
    background-color: #FF8C00;
    transform: scale(1.1);
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

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

.content {
    padding: 0 15px;
    display: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 20px;
}

/* 导航章节链接样式 */
.chapter-nav {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background-color: rgba(0, 45, 114, 0.8);
    padding: 10px;
    border-radius: 5px 0 0 5px;
    z-index: 999;
}

.chapter-nav a {
    display: block;
    color: #FFFFFF;
    padding: 8px 15px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.chapter-nav a:hover {
    background-color: var(--accent-color);
}

/* 提示信息样式 */
.notice {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 165, 0, 0.9);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1001;
    font-size: 1em;
}

/* 响应式设计：适应不同屏幕尺寸 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
    }

    .navbar ul {
        flex-direction: column;
    }

    .navbar li {
        margin: 10px 0;
    }

    .chapter-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.3em;
    }

    h4 {
        font-size: 1.1em;
    }

    p {
        font-size: 0.9em;
    }

    .navbar {
        padding: 10px 0;
    }
}

/* 动态粒子动画样式 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

@keyframes moveParticles {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

.particles.animate {
    animation: moveParticles 50s linear infinite;
}

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