
/* 基本页面样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif; /* 设置全局字体 */
    background: linear-gradient(135deg, #1E3A8A 70%, #6EE7B7 25%, #FFA500 5%);
    color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(30, 58, 138, 0.9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: #FFA500;
}

/* 主容器样式 */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 100px 20px 20px 20px; /* 留出导航栏高度的空间 */
}

/* 章节样式 */
section {
    background-color: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

/* 标题样式 */
h2, h3, h4 {
    color: #ffffff;
    margin-top: 0;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid #FFA500;
    padding-bottom: 10px;
}

h3 {
    font-size: 20px;
    margin-top: 20px;
}

h4 {
    font-size: 18px;
    margin-top: 15px;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 10px 0;
}

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

/* 代码块样式 */
pre code {
    display: block;
    background-color: rgba(0,0,0,0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #FFD700;
    margin: 20px 0;
}

/* 提示信息样式 */
.notice {
    background-color: rgba(255, 165, 0, 0.9);
    color: #000000;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 2px solid #1E3A8A;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: rgba(30, 58, 138, 0.8);
    padding: 10px;
    border-radius: 8px;
    max-width: 200px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-nav li {
    margin-bottom: 10px;
}

.chapter-nav a {
    color: #6EE7B7;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 100px 10px 10px 10px;
    }
    
    .chapter-nav {
        position: static;
        max-width: none;
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
    }
    
    .chapter-nav {
        display: none;
    }
}

