/* ============================================
   CSS变量定义 - 主题色管理
   ============================================ */
:root {
    --primary-color: #a34e96;
    --secondary-color-1: #281f29;
    --secondary-color-2: #ead1cb;
    --secondary-color-3: #b0452e;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f8f8;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(163, 78, 150, 0.2);
    --transition: all 0.3s ease;
    --font-primary: 'Noto Sans SC', sans-serif;
    --font-secondary: 'Noto Serif SC', serif;
}

/* ============================================
   基础样式重置
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

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

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

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   返回顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

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

.back-to-top:hover {
    background: var(--secondary-color-3);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ============================================
   头部导航
   ============================================ */
.header {
    background: var(--secondary-color-1);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow);
}

.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    transition: var(--transition);
}

.logo:hover {
    color: var(--secondary-color-2);
    transform: scale(1.05);
}

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

.logo-text {
    font-family: var(--font-secondary);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: white;
    font-size: 16px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color-2);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ============================================
   英雄区
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--secondary-color-1) 0%, var(--primary-color) 100%);
    padding: 60px 0;
    color: white;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

.hero-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: var(--font-secondary);
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.8;
    opacity: 0.95;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.feature-tag {
    background: var(--secondary-color-3);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--secondary-color-3);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(176, 69, 46, 0.3);
}

.download-btn:hover {
    background: #c0553f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(176, 69, 46, 0.4);
}

/* ============================================
   通用区块标题
   ============================================ */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color-1);
    font-family: var(--font-secondary);
    position: relative;
    padding-bottom: 15px;
}

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

/* ============================================
   游戏特色
   ============================================ */
.features {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--secondary-color-1);
}

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

/* ============================================
   新闻/动态区
   ============================================ */
.news {
    padding: 80px 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    display: flex;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.date-day {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 18px;
    margin-top: 5px;
}

.date-year {
    font-size: 14px;
    margin-top: 5px;
    opacity: 0.9;
}

.news-content {
    flex: 1;
}

.news-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--secondary-color-1);
}

.news-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

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

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

/* ============================================
   媒体画廊
   ============================================ */
.gallery {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

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

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

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

.gallery-view {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gallery-view:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

/* ============================================
   图片查看器模态框
   ============================================ */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    border-radius: 10px;
}

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

.modal-close:hover {
    color: var(--secondary-color-2);
    transform: scale(1.2);
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   用户评价区
   ============================================ */
.reviews {
    padding: 80px 0;
}

.reviews-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, var(--secondary-color-2), white);
    border-radius: 15px;
    flex-wrap: wrap;
    gap: 30px;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.score-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.stars {
    color: #ffc107;
    font-size: 24px;
    margin: 10px 0;
}

.rating-count {
    color: var(--text-light);
    font-size: 14px;
}

.rating-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.rating-tags .tag {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.reviews-carousel {
    position: relative;
    overflow: hidden;
}

.reviews-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.review-card {
    min-width: 350px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-3));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.reviewer-info h4 {
    margin-bottom: 5px;
    color: var(--secondary-color-1);
}

.review-stars {
    color: #ffc107;
    font-size: 14px;
}

.review-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.review-date {
    color: var(--text-light);
    font-size: 14px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

.carousel-btn:hover {
    background: var(--secondary-color-3);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   版本历史
   ============================================ */
.versions {
    padding: 80px 0;
    background: var(--bg-light);
}

.versions-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.version-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.version-header h3 {
    font-size: 24px;
    color: var(--secondary-color-1);
}

.version-date {
    color: var(--text-light);
    font-size: 14px;
}

.version-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.version-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 14px;
}

.version-content {
    margin-bottom: 20px;
}

.version-content h4 {
    margin-bottom: 10px;
    color: var(--secondary-color-1);
}

.version-content ul {
    list-style: disc;
    margin-left: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.version-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

.version-download:hover {
    background: var(--secondary-color-3);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ============================================
   游戏攻略
   ============================================ */
.guides {
    padding: 80px 0;
}

.guide-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.guide-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.guide-card.hidden {
    display: none;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.guide-header h3 {
    font-size: 20px;
    color: var(--secondary-color-1);
    flex: 1;
}

.guide-difficulty {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.guide-difficulty.easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.guide-difficulty.medium {
    background: #fff3e0;
    color: #e65100;
}

.guide-difficulty.hard {
    background: #ffebee;
    color: #c62828;
}

.guide-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.guide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guide-tag {
    background: var(--bg-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--primary-color);
}

/* ============================================
   游戏章节
   ============================================ */
.chapters {
    padding: 80px 0;
    background: var(--bg-light);
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.chapter-item {
    display: flex;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.chapter-badge {
    min-width: 80px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    height: fit-content;
}

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

.character-chapter .chapter-badge {
    background: linear-gradient(135deg, var(--secondary-color-3), #d67a5f);
    color: white;
}

.chapter-content {
    flex: 1;
}

.chapter-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--secondary-color-1);
}

.chapter-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.chapter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.chapter-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   常见问题
   ============================================ */
.faq {
    padding: 80px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    transition: var(--transition);
}

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

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

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--secondary-color-1);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-color-2);
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.footer-section a:hover {
    color: var(--secondary-color-2);
    padding-left: 5px;
}

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

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

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

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--secondary-color-1);
        flex-direction: column;
        padding: 30px 0;
        transition: var(--transition);
        z-index: 998;
    }

    .nav-menu.active {
        left: 0;
    }

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

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        font-size: 28px;
    }

    .news-item {
        flex-direction: column;
    }

    .news-date {
        flex-direction: row;
        min-width: auto;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .reviews-summary {
        flex-direction: column;
        text-align: center;
    }

    .rating-tags {
        justify-content: center;
    }

    .reviews-track {
        flex-direction: column;
    }

    .review-card {
        min-width: 100%;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

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

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

    .chapter-item {
        flex-direction: column;
    }

    .chapter-badge {
        width: fit-content;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 16px;
    }

    .download-btn {
        padding: 12px 30px;
        font-size: 16px;
    }

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

    .modal-prev,
    .modal-next {
        font-size: 20px;
        padding: 15px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}

