* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 0;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav .container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-btn {
    padding: 12px 30px;
    font-size: 1rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover,
.nav-btn.active {
    background: #667eea;
    color: white;
}

/* Views */
.view {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.view.active {
    display: block;
}

.view h2 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

/* Region Grid */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.region-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.region-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.region-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.region-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.region-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.region-card .count {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Grade Sections */
.grade-section {
    margin-bottom: 30px;
}

.grade-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.grade-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grade-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grade-btn:hover {
    background: #667eea;
    color: white;
}

/* Lessons */
.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5568d3;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.lesson-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.lesson-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.lesson-tag {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.lesson-tag.history {
    background: #e74c3c;
}

.lesson-tag.geography {
    background: #27ae60;
}

.lesson-tag.version-ren {
    background: #3498db;
}

.lesson-tag.version-su {
    background: #e67e22;
}

.lesson-location {
    color: #666;
    font-size: 0.9rem;
}

/* Lesson Detail */
#lesson-detail {
    line-height: 1.8;
}

#lesson-detail h2 {
    color: #667eea;
    margin-bottom: 20px;
}

#lesson-detail .info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#lesson-detail .info-box p {
    margin-bottom: 10px;
}

#lesson-detail .content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

/* 课文图片 */
.lesson-image {
    margin: 25px 0;
    text-align: center;
}

.lesson-image img {
    max-width: 100%;
    height: auto;
    max-height: 450px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

/* 全文样式 */
.full-text {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    line-height: 2;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

.full-text p {
    margin-bottom: 15px;
    text-indent: 2em;
}

.full-text br {
    display: block;
    content: "";
    margin: 10px 0;
}

/* 旅行小贴士 */
.travel-tips {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
    margin-top: 20px;
    line-height: 1.8;
}

/* 诗词特殊样式 */
.full-text.poetry {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left-color: #9c27b0;
    text-align: center;
}

.full-text.poetry p {
    text-indent: 0;
    margin-bottom: 10px;
}

/* 版本徽章 */
.version-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.version-badge.version-ren {
    background: #3498db;
    color: white;
}

.version-badge.version-su {
    background: #e67e22;
    color: white;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px 0;
    text-align: center;
    margin-top: 20px;
    border-radius: 10px;
}

footer p {
    color: #666;
    margin-bottom: 5px;
}

.copyright {
    font-size: 0.85rem;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .main-nav .container {
        flex-direction: column;
        align-items: center;
    }

    .region-grid {
        grid-template-columns: 1fr;
    }

    .grade-grid {
        justify-content: center;
    }
}
