/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', 'SimSun', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f7f1;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSgxNSkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiNmNWYwZDUiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjcGF0dGVybikiLz48L3N2Zz4=');
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-title {
    font-size: 2.5rem;
    color: #8b4513;
    text-align: center;
    padding: 20px 0;
    font-weight: bold;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 20px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #8b4513;
    background-color: #f5f0d5;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主内容样式 */
main {
    padding: 40px 0;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
    padding: 80px 0;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-content {
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn.primary {
    background-color: white;
    color: #8b4513;
}

.btn.primary:hover {
    background-color: #f5f0d5;
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 关于区域 */
.about {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.about h2 {
    color: #8b4513;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
}

.about p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1.1rem;
}

/* 章节列表 */
.chapters {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapters h2 {
    color: #8b4513;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.chapter-group h3 {
    color: #8b4513;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5f0d5;
    font-size: 1.5rem;
}

.chapter-group ul {
    list-style: none;
}

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

.chapter-group a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.chapter-group a:hover {
    background-color: #f5f0d5;
    color: #8b4513;
    transform: translateX(5px);
}

/* 章节内容页面 */
.chapter-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapter-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f5f0d5;
}

.chapter-title {
    color: #8b4513;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.chapter-meta {
    color: #666;
    font-size: 1rem;
}

.chapter-text {
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify;
    margin-bottom: 40px;
}

.chapter-text p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid #f5f0d5;
}

.chapter-nav a {
    text-decoration: none;
    color: #8b4513;
    font-weight: bold;
    transition: all 0.3s ease;
}

.chapter-nav a:hover {
    text-decoration: underline;
}

/* 序言页面 */
.preface-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preface-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f5f0d5;
}

.preface-title {
    color: #8b4513;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.preface-text {
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify;
}

.preface-text p {
    margin-bottom: 20px;
    text-indent: 2em;
}

/* 页脚样式 */
footer {
    background-color: #8b4513;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-info p {
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-legal {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 10px 0;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    .about, .chapters, .chapter-content, .preface-content {
        padding: 20px;
    }
    
    .chapter-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-info, .footer-links {
        margin-bottom: 20px;
        width: 100%;
    }
}