:root {
    --primary: #0c1830;
    --primary-light: #142240;
    --primary-dark: #080f20;
    --accent-1: #a8f0fc;
    --accent-2: #488430;
    --accent-3: #d8c084;
    --text-light: #e8eaf0;
    --text-muted: #8a92a6;
    --bg-card: rgba(20, 34, 64, 0.6);
    --bg-card-hover: rgba(30, 48, 80, 0.8);
    --border-color: rgba(168, 240, 252, 0.12);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans SC', 'Segoe UI', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--accent-3);
}

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

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

/* ==================== Header ==================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(8, 15, 32, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-1);
    letter-spacing: 1px;
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

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

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-1);
    background: rgba(168, 240, 252, 0.08);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==================== Hero Section ==================== */
.hero {
    padding: 90px 0 40px;
    background: linear-gradient(175deg, var(--primary) 0%, var(--primary-dark) 60%, rgba(72, 132, 48, 0.15) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 240, 252, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-cover {
    flex-shrink: 0;
    width: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 40px rgba(168, 240, 252, 0.1);
    border: 2px solid var(--border-color);
}

.hero-cover img {
    width: 100%;
    display: block;
}

.hero-info {
    flex: 1;
}

.hero-info h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-info .subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.meta-tag i {
    color: var(--accent-1);
    font-size: 0.8rem;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.feature-badge {
    padding: 4px 12px;
    background: rgba(72, 132, 48, 0.2);
    border: 1px solid rgba(72, 132, 48, 0.35);
    border-radius: 16px;
    font-size: 0.78rem;
    color: #8ed86c;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--accent-2), #3a7028);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(72, 132, 48, 0.35);
    text-decoration: none;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(72, 132, 48, 0.5);
    color: #fff;
}

.btn-download:active {
    transform: translateY(0);
}

/* ==================== Section Common ==================== */
.section {
    padding: 60px 0;
}

.section:nth-child(even) {
    background: rgba(12, 24, 48, 0.4);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-light);
}

.section-title h2 i {
    margin-right: 10px;
    color: var(--accent-1);
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==================== News Section ==================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.news-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.news-card .news-date {
    font-size: 0.8rem;
    color: var(--accent-3);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-light);
}

.news-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.6;
}

.news-card .news-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.news-card .news-link:hover {
    gap: 8px;
}

/* ==================== Gallery ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    color: #fff;
    opacity: 0;
    transition: all var(--transition);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all var(--transition);
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ==================== Reviews ==================== */
.reviews-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

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

.reviews-score .score {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-3);
    line-height: 1;
}

.reviews-score .stars {
    color: var(--accent-3);
    font-size: 1.1rem;
    margin: 6px 0;
}

.reviews-score .count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.reviews-tags span {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.review-carousel {
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.review-track {
    display: flex;
    transition: transform 0.5s ease;
}

.review-card {
    min-width: 100%;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
}

.review-card .review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.review-card .review-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.review-card .review-stars {
    color: var(--accent-3);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.review-card .review-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-style: italic;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.carousel-dot.active {
    background: var(--accent-1);
    transform: scale(1.2);
}

/* ==================== Version History ==================== */
.version-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.version-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.version-item:last-child {
    border-bottom: none;
}

.version-badge {
    flex-shrink: 0;
    width: 80px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168, 240, 252, 0.15), rgba(168, 240, 252, 0.05));
    border: 1px solid rgba(168, 240, 252, 0.2);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-1);
}

.version-details h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.version-details .version-date {
    font-size: 0.8rem;
    color: var(--accent-3);
    margin-bottom: 8px;
}

.version-details p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.6;
}

.version-details .version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.version-details .version-meta span {
    font-size: 0.78rem;
    padding: 3px 10px;
    background: var(--bg-card);
    border-radius: 12px;
    color: var(--text-muted);
}

.version-details .version-meta a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-2);
}

.version-details .version-meta a:hover {
    color: #8ed86c;
}

/* ==================== Guides ==================== */
.guides-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-btn {
    padding: 7px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(168, 240, 252, 0.12);
    color: var(--accent-1);
    border-color: rgba(168, 240, 252, 0.3);
}

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

.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    transition: all var(--transition);
}

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

.guide-card .guide-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.guide-card .guide-icon.route {
    background: rgba(168, 240, 252, 0.12);
    color: var(--accent-1);
}

.guide-card .guide-icon.choice {
    background: rgba(216, 192, 132, 0.15);
    color: var(--accent-3);
}

.guide-card .guide-icon.ending {
    background: rgba(72, 132, 48, 0.15);
    color: #8ed86c;
}

.guide-card .guide-icon.cg {
    background: rgba(200, 100, 150, 0.15);
    color: #e898b8;
}

.guide-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.guide-card p {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

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

.guide-difficulty {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 10px;
}

.guide-difficulty.easy {
    background: rgba(72, 132, 48, 0.2);
    color: #8ed86c;
}

.guide-difficulty.medium {
    background: rgba(216, 192, 132, 0.2);
    color: var(--accent-3);
}

.guide-difficulty.hard {
    background: rgba(220, 80, 80, 0.2);
    color: #f08080;
}

.guide-recommend {
    display: flex;
    gap: 2px;
    color: var(--accent-3);
    font-size: 0.75rem;
}

/* ==================== Chapters ==================== */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.chapter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.chapter-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.chapter-card .chapter-type {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 0 12px 0 10px;
}

.chapter-type.main {
    background: rgba(168, 240, 252, 0.15);
    color: var(--accent-1);
}

.chapter-type.character {
    background: rgba(216, 192, 132, 0.15);
    color: var(--accent-3);
}

.chapter-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    padding-right: 60px;
}

.chapter-card .chapter-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.6;
}

.chapter-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.chapter-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.chapter-meta-item i {
    color: var(--accent-1);
    font-size: 0.75rem;
}

.chapter-mood {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.74rem;
    background: rgba(72, 132, 48, 0.15);
    color: #8ed86c;
}

.chapter-mood.dramatic {
    background: rgba(220, 80, 80, 0.15);
    color: #f08080;
}

.chapter-mood.romantic {
    background: rgba(200, 100, 150, 0.15);
    color: #e898b8;
}

.chapter-mood.tense {
    background: rgba(216, 192, 132, 0.15);
    color: var(--accent-3);
}

/* ==================== FAQ ==================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bg-card);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: color var(--transition);
}

.faq-question:hover {
    color: var(--accent-1);
}

.faq-question i {
    font-size: 0.8rem;
    transition: transform var(--transition);
    color: var(--accent-1);
}

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

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

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

.faq-answer-inner {
    padding: 0 22px 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==================== Footer ==================== */
.site-footer {
    background: var(--primary-dark);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-light);
}

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

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

.footer-col ul a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-col ul a:hover {
    color: var(--accent-1);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-2);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(72, 132, 48, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #3a7028;
    transform: translateY(-3px);
}

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: var(--primary-dark);
        padding: 80px 20px 20px;
        gap: 4px;
        transition: right var(--transition);
        border-left: 1px solid var(--border-color);
    }

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

    .hamburger {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-cover {
        width: 160px;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-info h1 {
        font-size: 1.7rem;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .reviews-summary {
        flex-direction: column;
        gap: 20px;
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .section {
        padding: 40px 0;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-info h1 {
        font-size: 1.4rem;
    }

    .btn-download {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    .meta-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}
