
/* 
整体样式设计遵循现代科技感与高级质感，采用CSS3的高级特性如线性渐变、box-shadow、text-shadow、关键帧动画等，确保网页具有丰富的色彩层次和动态交互效果。布局采用Flexbox和Grid布局技术，确保响应式设计在不同设备上的一致体验。主要颜色以冷色调为主，辅以渐变色和点缀色，遵循黄金比例配色法则，确保视觉上的和谐美与高级感。

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1A294F, #3CB371);
    color: #FFFFFF;
}

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

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

.navbar a:hover {
    color: #3CB371;
}

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

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 70px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapter-nav a {
    display: block;
    color: #FFFFFF;
    margin: 10px 0;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.chapter-nav a:hover {
    transform: scale(1.05);
    color: #7D3C98;
}

/* 主内容区样式 */
.container {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 20px;
    padding: 100px 50px 50px 50px;
}

.article-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.article-content h2, .article-content h3, .article-content h4 {
    color: #E8ECEF;
}

.article-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-content pre {
    background: #2C3E50;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

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

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 点缀色按钮样式 */
.btn-accent {
    background: linear-gradient(45deg, #3CB371, #7D3C98);
    color: #FFFFFF;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    font-size: 16px;
}

.btn-accent:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #7D3C98, #3CB371);
}

/* 代码示例块样式 */
.code-example {
    background: #1A294F;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-example code {
    color: #7D3C98;
    font-family: 'Courier New', Courier, monospace;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        padding: 100px 20px 20px 20px;
    }
    
    .chapter-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar a {
        margin: 5px 0;
    }
}

