
/* 全局样式设置，包括字体、颜色和背景渐变 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1E3C72, #2A5298); /* 主色调渐变背景 */
    color: #ffffff;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9); /* 半透明背景 */
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    transition: background 0.3s;
    z-index: 1000; /* 确保导航栏在最上层 */
}

.navbar:hover {
    background: rgba(30, 60, 114, 1); /* 悬停时背景不透明 */
}

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

.navbar a:hover {
    color: #ff6b6b; /* 悬停时颜色变化 */
}

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

.chapter-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 14px;
    transition: color 0.3s;
}

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

/* 主要内容区域样式 */
.main-content {
    padding: 100px 20px 60px; /* 上下留白 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3 {
    color: #ff6b6b; /* 辅色用于标题 */
}

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

article h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 代码块样式 */
article pre {
    background: #2a5298;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 图片装饰样式 */
.decorative-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.decorative-images img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 章节区块样式 */
.section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #ff6b6b;
    margin-top: 5px;
    border-radius: 2px;
}

/* 提示信息样式 */
.reference-note {
    background: rgba(255, 107, 107, 0.2);
    padding: 15px;
    border-left: 5px solid #ff6b6b;
    margin-bottom: 30px;
    border-radius: 4px;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    
    .chapter-nav {
        position: static;
        margin: 20px 0;
    }
    
    .decorative-images img {
        width: 100%;
        height: auto;
    }
}

