
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，确保可读性 */
    background: linear-gradient(135deg, #182C46 70%, #F5F7FA 25%, #00B894 5%); /* 使用渐变背景，符合黄金比配色 */
    color: #182C46;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #182C46;
    color: #F5F7FA;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 导航链接样式 */
.navbar a {
    color: #F5F7FA;
    margin: 0 15px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #00B894; /* 悬停时颜色变化，增强交互性 */
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(24, 44, 70, 0.8);
    padding: 10px;
    border-radius: 8px;
}

.chapter-nav a {
    display: block;
    color: #F5F7FA;
    margin: 5px 0;
    text-decoration: none;
    font-size: 14px;
}

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

/* 主内容区域样式 */
.container {
    max-width: 1200px;
    margin: 140px auto 60px auto; /* 留出导航栏空间 */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* 视觉区块样式 */
.section {
    background-color: #F5F7FA;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 装饰线条 */
.section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: #00B894;
    border-radius: 2px;
}

/* 图文布局 */
.section img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 文字内容布局 */
.section .content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section h2, .section h3, .section h4 {
    color: #00B894;
}

.section pre {
    background-color: #182C46;
    color: #F5F7FA;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

.section code {
    background-color: #F0F0F0;
    padding: 2px 4px;
    border-radius: 4px;
}

/* CSS3代码示例样式 */
.code-sample {
    background-color: #FFFFFF;
    padding: 20px;
    border-left: 5px solid #00B894;
    margin: 20px 0;
    font-family: 'Roboto Mono', monospace;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

