/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Colors */
    --cyan: #00F0FF;
    --purple: #8B5CF6;
    --cyan-dim: #00c4d0;
    --purple-dim: #7c4fe0;
    --bg-primary: #0A0E17;
    --bg-secondary: #0F1420;
    --bg-card: rgba(15, 20, 35, 0.6);
    --bg-card-hover: rgba(20, 28, 50, 0.7);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 240, 255, 0.25);
    --text-primary: #E8ECF4;
    --text-secondary: #8B92A8;
    --text-muted: #505873;
    --glass-blur: 20px;

    /* Typography */
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fs-hero: clamp(2.4rem, 5vw, 3.6rem);
    --fs-section: clamp(1.6rem, 3vw, 2.2rem);
    --fs-body: 0.95rem;
    --fs-small: 0.82rem;
    --lh-body: 1.7;

    /* Spacing */
    --section-gap: clamp(80px, 10vw, 130px);
    --inner-max: 1200px;
    --inner-pad: clamp(20px, 4vw, 48px);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.35s;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

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

ul, ol { list-style: none; }

/* ============================================
   Utility
   ============================================ */
.section-inner {
    max-width: var(--inner-max);
    margin: 0 auto;
    padding: 0 var(--inner-pad);
}

.gradient-text {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: var(--fs-section);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.4em;
    letter-spacing: -0.01em;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: var(--fs-body);
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background var(--duration), box-shadow var(--duration);
}

.header.scrolled {
    background: rgba(10, 14, 23, 0.82);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 1px 0 var(--border-glass);
}

.header-inner {
    max-width: var(--inner-max);
    margin: 0 auto;
    padding: 0 var(--inner-pad);
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { flex-shrink: 0; }

.logo-img {
    height: 32px;
    width: auto;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: color var(--duration);
    position: relative;
    padding: 0.3em 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 1px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--duration) var(--ease-out);
    white-space: nowrap;
}

.btn-download-sm {
    padding: 0.5em 1.3em;
    font-size: 0.82rem;
    background: linear-gradient(135deg, var(--cyan-dim), var(--purple-dim));
    border-radius: 6px;
    color: #fff;
}

.btn-download-sm:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 68px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 20% 50%, rgba(0, 240, 255, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: var(--inner-max);
    margin: 0 auto;
    padding: 3rem var(--inner-pad);
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.hero-content {
    flex: 0 0 55%;
    max-width: 55%;
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.6rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.tag {
    padding: 0.35em 0.9em;
    font-size: 0.78rem;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 100px;
    color: var(--cyan);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.btn-download {
    padding: 0.75em 2em;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--cyan-dim), var(--purple-dim));
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 240, 255, 0.2);
}

.btn-download:hover {
    box-shadow: 0 6px 32px rgba(0, 240, 255, 0.35);
    transform: translateY(-2px);
}

.hero-version {
    font-size: var(--fs-small);
    color: var(--text-muted);
}

.hero-requirements {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.hero-image {
    flex: 0 0 45%;
    max-width: 45%;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-height: 480px;
    width: auto;
    filter: drop-shadow(0 20px 60px rgba(0, 240, 255, 0.08));
}

/* ============================================
   Features
   ============================================ */
.features {
    padding: var(--section-gap) 0;
    background: var(--bg-secondary);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glass), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.features-grid .feature-card:nth-child(4),
.features-grid .feature-card:nth-child(5) {
    /* 下排2个居中 */
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: transform var(--duration) var(--ease-out), border-color var(--duration), box-shadow var(--duration);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: 0 8px 40px rgba(0, 240, 255, 0.08);
    background: var(--bg-card-hover);
}

.feature-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.feature-card:hover .feature-img img {
    transform: scale(1.04);
}

.feature-card h3 {
    padding: 1.2rem 1.4rem 0.4rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.feature-card p {
    padding: 0 1.4rem 1.4rem;
    font-size: var(--fs-small);
    color: var(--text-secondary);
    line-height: 1.65;
}

/* 下排两张居中布局 */
@supports (display: grid) {
    .features-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .feature-card:nth-child(1) { grid-column: 1 / 3; }
    .feature-card:nth-child(2) { grid-column: 3 / 5; }
    .feature-card:nth-child(3) { grid-column: 5 / 7; }
    .feature-card:nth-child(4) { grid-column: 2 / 4; }
    .feature-card:nth-child(5) { grid-column: 4 / 6; }
}

/* ============================================
   Stats
   ============================================ */
.stats {
    padding: clamp(48px, 6vw, 80px) 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    margin-top: 0.4rem;
    font-size: var(--fs-small);
    color: var(--text-secondary);
}

/* ============================================
   Games
   ============================================ */
.games {
    padding: var(--section-gap) 0;
    background: var(--bg-secondary);
}

.games-featured {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.game-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: block;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.game-card:hover img {
    transform: scale(1.06);
}

.game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.game-name {
    font-weight: 600;
    font-size: 1rem;
}

.game-genre {
    font-size: 0.75rem;
    color: var(--cyan);
}

.games-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 1rem;
    max-width: 100%;
}

.game-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border-glass);
    transition: transform var(--duration) var(--ease-out), border-color var(--duration), box-shadow var(--duration);
    justify-self: center;
}

.game-icon:hover {
    transform: scale(1.12);
    border-color: var(--border-glow);
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.15);
}

/* ============================================
   News
   ============================================ */
.news {
    padding: var(--section-gap) 0 calc(var(--section-gap) * 0.85);
    background: var(--bg-primary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    overflow: hidden;
    transition: transform var(--duration) var(--ease-out), border-color var(--duration), box-shadow var(--duration);
    display: block;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.06);
}

.news-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.news-card:hover .news-img img {
    transform: scale(1.04);
}

.news-body {
    padding: 1.2rem 1.3rem;
}

.news-body h3 {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-body time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    padding: var(--section-gap) 0;
    background: var(--bg-secondary);
}

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

.faq-item {
    border-bottom: 1px solid var(--border-glass);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-glass);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.2rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    transition: color var(--duration);
}

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

.faq-arrow {
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-out);
    color: var(--text-muted);
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
    color: var(--cyan);
}

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

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding-bottom: 1.2rem;
    font-size: var(--fs-small);
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #060810;
    border-top: 1px solid var(--border-glass);
    padding: 3.5rem 0 0;
}

.footer-inner {
    max-width: var(--inner-max);
    margin: 0 auto;
    padding: 0 var(--inner-pad);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-brand {
    flex: 0 0 220px;
}

.footer-logo {
    height: 28px;
    margin-bottom: 0.7rem;
    opacity: 0.7;
}

.footer-slogan {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 3.5rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.footer-col a {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.25em 0;
    transition: color var(--duration);
}

.footer-col a:hover {
    color: var(--cyan);
}

.footer-social h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.social-icons {
    display: flex;
    gap: 0.8rem;
}

.social-icons a {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    transition: all var(--duration);
}

.social-icons a:hover {
    border-color: var(--border-glow);
    background: rgba(0, 240, 255, 0.06);
}

.social-icons img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity var(--duration);
}

.social-icons a:hover img {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--border-glass);
    padding: 1.2rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 900;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(15, 20, 35, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all var(--duration) var(--ease-out);
}

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

.back-to-top:hover {
    border-color: var(--border-glow);
    color: var(--cyan);
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.12);
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ============================================
   Responsive — Tablet (<=1024px)
   ============================================ */
@media (max-width: 1024px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content {
        flex: none;
        max-width: 100%;
    }

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

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        flex: none;
        max-width: 80%;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .feature-card:nth-child(1),
    .feature-card:nth-child(2),
    .feature-card:nth-child(3),
    .feature-card:nth-child(4),
    .feature-card:nth-child(5) {
        grid-column: auto !important;
    }

    .feature-card:nth-child(5) {
        grid-column: 1 / -1 !important;
        max-width: 50%;
        justify-self: center;
    }

    .games-featured {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        flex-wrap: wrap;
    }
}

/* ============================================
   Responsive — Mobile (<=768px)
   ============================================ */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 23, 0.96);
        backdrop-filter: blur(var(--glass-blur));
        flex-direction: column;
        padding: 1.5rem var(--inner-pad);
        gap: 0;
        border-bottom: 1px solid var(--border-glass);
    }

    .nav.open {
        display: flex;
    }

    .nav-link {
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--border-glass);
    }

    .nav-link.active::after {
        display: none;
    }

    .btn-download-sm {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-image {
        max-width: 100%;
    }

    .hero-image img {
        max-height: 320px;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
    }

    .feature-card:nth-child(5) {
        max-width: 100% !important;
    }

    .games-featured {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .game-card {
        aspect-ratio: 2 / 3;
    }

    .games-icons {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        gap: 0.7rem;
    }

    .game-icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-brand {
        flex: none;
    }

    .footer-links {
        gap: 2rem;
    }
}

/* ============================================
   Responsive — Small Mobile (<=480px)
   ============================================ */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

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

    .btn-download {
        width: 100%;
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 1.5rem 2rem;
    }

    .games-featured {
        grid-template-columns: 1fr;
    }

    .game-card {
        aspect-ratio: 16 / 9;
    }
}
