/* ===== CSS变量定义 ===== */
:root {
    --primary-color: #592116;
    --secondary-color-1: #c4a188;
    --secondary-color-2: #aa8d74;
    --secondary-color-3: #a6847c;
    --bg-light: #faf8f6;
    --bg-dark: #2a1810;
    --text-dark: #2c1810;
    --text-light: #ffffff;
    --text-gray: #666666;
    --border-color: #e5d7cc;
    --shadow-sm: 0 2px 8px rgba(89, 33, 22, 0.1);
    --shadow-md: 0 4px 16px rgba(89, 33, 22, 0.15);
    --shadow-lg: 0 8px 32px rgba(89, 33, 22, 0.2);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color-1), var(--primary-color), var(--secondary-color-1));
    border-radius: 2px;
}

/* ===== 顶部导航栏 ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo span {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: 'Noto Serif SC', serif;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-menu i {
    font-size: 0.85rem;
}

/* ===== 英雄区 ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color-3) 100%);
    color: var(--text-light);
    padding: 4rem 20px 3rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color-1);
    margin-bottom: 1rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.game-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

.meta-item i {
    font-size: 1rem;
}

.game-tags {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    color: var(--text-dark);
    padding: 16px 48px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(89, 33, 22, 0.3);
}

.download-btn i {
    font-size: 1.3rem;
}

/* ===== 游戏特色 ===== */
.features {
    padding: 5rem 20px;
    background-color: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ===== 游戏截图 ===== */
.gallery {
    padding: 5rem 20px;
    background: linear-gradient(180deg, var(--bg-light) 0%, #f0e8e0 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(89, 33, 22, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 3rem;
}

/* ===== 游戏章节 ===== */
.chapters {
    padding: 5rem 20px;
    background-color: white;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.chapter-card {
    background: linear-gradient(135deg, #faf8f6 0%, #f5ede5 100%);
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color-2);
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chapter-header h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.chapter-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.chapter-badge.main {
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    color: white;
}

.chapter-badge.character {
    background: linear-gradient(135deg, #e8b4d4, #d896c2);
    color: white;
}

.chapter-badge.ending {
    background: linear-gradient(135deg, #f4d03f, #e6b422);
    color: white;
}

.chapter-desc {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.chapter-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.chapter-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
}

.chapter-info i {
    color: var(--primary-color);
}

.chapter-tone {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* ===== 游戏攻略 ===== */
.guides {
    padding: 5rem 20px;
    background: linear-gradient(180deg, #f0e8e0 0%, var(--bg-light) 100%);
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.guide-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.8rem;
}

.guide-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.guide-card p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.guide-meta {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.difficulty {
    color: var(--secondary-color-2);
    font-weight: 600;
}

/* ===== 玩家评价 ===== */
.reviews {
    padding: 5rem 20px;
    background-color: white;
}

.review-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.rating-box {
    text-align: center;
}

.rating-score {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rating-stars {
    color: #ffc107;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.rating-count {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.review-tag {
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.reviews-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: linear-gradient(135deg, #faf8f6 0%, #f5ede5 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.review-rating {
    color: #ffc107;
}

.review-text {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.review-date {
    color: #999;
    font-size: 0.9rem;
}

/* ===== 最新动态 ===== */
.news {
    padding: 5rem 20px;
    background: linear-gradient(180deg, var(--bg-light) 0%, #f0e8e0 100%);
}

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

.news-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.news-badge.update {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.news-badge.announcement {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.news-badge.dev {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.news-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.news-card p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--secondary-color-2);
    gap: 12px;
}

/* ===== 版本历史 ===== */
.versions {
    padding: 5rem 20px;
    background-color: white;
}

.version-timeline {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.version-item {
    background: linear-gradient(135deg, #faf8f6 0%, #f5ede5 100%);
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.version-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.version-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.version-date {
    color: var(--text-gray);
    font-size: 1rem;
}

.version-content h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.version-content ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.version-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-gray);
}

.version-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.version-meta {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.version-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
}

.version-download {
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    color: white !important;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.version-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== 常见问题 ===== */
.faq {
    padding: 5rem 20px;
    background: linear-gradient(180deg, #f0e8e0 0%, var(--bg-light) 100%);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #faf8f6 0%, #f5ede5 100%);
    transition: var(--transition);
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    color: white;
}

.faq-question h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.faq-question i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer p,
.faq-answer ul {
    padding: 1.5rem 2rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.faq-answer ul {
    list-style: none;
    padding-left: 3rem;
}

.faq-answer li {
    padding: 0.3rem 0;
    position: relative;
}

.faq-answer li::before {
    content: '•';
    position: absolute;
    left: -1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.faq-answer strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

/* ===== 底部 ===== */
.footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
    color: var(--text-light);
    padding: 3rem 20px 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color-1);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

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

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color-1), var(--secondary-color-2));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== 图片模态框 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--secondary-color-1);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 600px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: flex;
        padding: 1rem 2rem;
        border-radius: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .game-meta {
        gap: 1rem;
    }

    .meta-item {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .gallery-grid,
    .chapters-grid,
    .guides-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .review-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .reviews-slider {
        grid-template-columns: 1fr;
    }

    .version-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 15px 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .download-btn {
        padding: 14px 36px;
        font-size: 1.1rem;
    }

    .feature-card,
    .guide-card,
    .news-card,
    .chapter-card {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}