
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #00BFFF 70%, #6A5ACD 25%, #FFA500 5%); /* 应用黄金比配色 */
    color: #333;
    line-height: 1.6;
}

/* 头部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
}
.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s;
}
.navbar ul li a:hover {
    color: #FFA500; /* 点缀色 */
}

/* 主内容区域样式 */
.main {
    padding: 100px 20px 50px 20px; /* 留出头部导航空间 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.chapter-nav ul li {
    margin-bottom: 10px;
}
.chapter-nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: color 0.3s;
}
.chapter-nav ul li a:hover {
    color: #00BFFF; /* 主色 */
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
article h2, article h3, article h4 {
    color: #6A5ACD; /* 辅色 */
}
article h2 {
    font-size: 28px;
    margin-bottom: 20px;
}
article h3 {
    font-size: 22px;
    margin-bottom: 15px;
}
article h4 {
    font-size: 18px;
    margin-bottom: 10px;
}
article p {
    font-size: 16px;
    margin-bottom: 15px;
}
article pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}
article code {
    font-family: 'Courier New', Courier, monospace;
    background: #eaeaea;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 图片样式 */
img.decorative {
    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;
}
img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        display: none; /* 移动端隐藏菜单 */
    }
    .chapter-nav {
        display: none; /* 移动端隐藏章节导航 */
    }
    .main {
        padding: 100px 10px 30px 10px;
    }
}

