
/* 全局样式设置 */
body {
    /* 使用线性渐变作为背景，主色调为深蓝色和紫色 */
    background: linear-gradient(135deg, #2c3e50, #8e44ad);
    color: #ecf0f1; /* 设置文字颜色为浅色，确保可读性 */
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 容器样式，采用十二栅格系统 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 40px;
    max-width: 1920px;
    margin: 0 auto;
}

/* 章节导航系统 */
.navbar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(44, 62, 80, 0.8);
    padding: 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
}

.navbar .nav-links {
    display: flex;
    gap: 15px;
}

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

.navbar .nav-links a:hover {
    color: #3498db; /* 点缀色：电光蓝 */
}

/* 主内容区域 */
.main-content {
    grid-column: 1 / -1;
    padding-top: 100px; /* 预留导航栏空间 */
}

/* 章节样式 */
section {
    margin-bottom: 60px; /* 每个章节之间留白 */
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

section h2, section h3 {
    color: #f1c40f; /* 点缀色：亮黄色 */
}

section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

section h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 10px;
}

section p {
    font-size: 16px;
    line-height: 1.6;
}

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

.decorative-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.5);
}

/* 按钮样式 */
.button {
    background-color: #3498db; /* 主色：电光蓝 */
    color: #ecf0f1;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* 代码示例样式 */
.code-example {
    background: rgba(44, 62, 80, 0.9);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ecf0f1;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.code-example code {
    display: block;
    white-space: pre;
}

/* 衰落背景动态效果 */
@keyframes particleFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dynamic-background {
    animation: particleFlow 20s linear infinite;
    background: linear-gradient(270deg, #2c3e50, #8e44ad, #2c3e50);
    background-size: 600% 600%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none; /* 移动设备上隐藏导航链接 */
    }
    .container {
        padding: 20px;
    }
    section {
        padding: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .container {
        padding: 30px;
    }
}

@media (min-width: 1201px) {
    .container {
        padding: 40px;
    }
}

/* 提示文字样式 */
.reference-note {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c; /* 点缀色：珊瑚橙 */
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1001;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

