/* ===== CSS 变量 ===== */
:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #ff6b6b;
    --gold: #f0a500;
    --gold-light: #ffc857;
    --bg-dark: #0a0a0f;
    --bg-card: #14141f;
    --bg-card-hover: #1e1e2e;
    --text: #e8e8ec;
    --text-muted: #8b8b9e;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul { list-style: none; }

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

video {
    max-width: 100%;
    display: block;
}

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

.section {
    padding: 80px 0;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.6);
}

.btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn--outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.btn--lg {
    padding: 16px 40px;
    font-size: 18px;
}

/* ===== 导航栏 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.nav__logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__link {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav__link:hover,
.nav__link.active {
    color: #fff;
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* ===== 英雄区 ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero__slider {
    position: absolute;
    inset: 0;
}

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero__slide.active {
    opacity: 1;
}

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

.hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 15, 0.7) 0%,
        rgba(10, 10, 15, 0.6) 30%,
        rgba(10, 10, 15, 0.65) 60%,
        rgba(10, 10, 15, 0.85) 100%
    );
}

/* 额外文字区加深遮罩 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(10, 10, 15, 0.55) 0%,
        rgba(10, 10, 15, 0.25) 40%,
        rgba(10, 10, 15, 0.05) 55%,
        rgba(10, 10, 15, 0.3) 100%
    );
    pointer-events: none;
}

.hero__dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.hero__dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.hero__content {
    position: relative;
    z-index: 5;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero__info {
    max-width: 560px;
}

.hero__badge {
    margin-bottom: 20px;
}

.hero__icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.hero__title {
    font-size: clamp(36px, 6vw, 60px);
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
}

.hero__tagline {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

.hero__tag {
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.hero__date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.hero__btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== 区块标题 ===== */
.section__title {
    text-align: center;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section__title--left {
    text-align: left;
}

.section__desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 48px;
}

/* ===== 游戏特色 ===== */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--gold);
}

.feature-card__icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== 关于游戏 ===== */
.about {
    background: var(--bg-card);
}

.about__wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about__image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.about__content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.8;
}

.about__stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
}

.about__stat {
    text-align: center;
}

.about__stat-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about__stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 游戏展示 ===== */
.showcase__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.showcase__item {
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.showcase__item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.showcase__item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

/* ===== 精彩截图 ===== */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.gallery__item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    aspect-ratio: 9 / 16;
}

.gallery__item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow);
}

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

/* ===== 上线福利 ===== */
.rewards {
    background: var(--bg-card);
}

.rewards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.reward-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
}

.reward-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.reward-card--highlight {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.08), rgba(230, 57, 70, 0.08));
}

.reward-card__icon {
    font-size: 40px;
    margin-bottom: 14px;
}

.reward-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.reward-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== 下载区域 ===== */
.download__card {
    background: linear-gradient(135deg, var(--bg-card), rgba(230, 57, 70, 0.08));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.download__icon-wrap {
    margin-bottom: 20px;
}

.download__icon {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.download__title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.download__version {
    font-size: 16px;
    color: var(--gold);
    margin-bottom: 6px;
}

.download__info {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.download__btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.download__qrcode {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.download__qrcode #downloadQrcode {
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.download__qrcode #downloadQrcode img,
.download__qrcode #downloadQrcode canvas {
    display: block;
}

.download__tip {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Hero 按钮二维码悬浮 ===== */
.btn--qrcode {
    position: relative;
}

.qrcode-popup {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 50;
    pointer-events: none;
    width: 160px;
}

.qrcode-popup.show {
    opacity: 1;
    visibility: visible;
}

.qrcode-popup__inner {
    background: #fff;
    padding: 14px 14px 10px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qrcode-popup__inner #heroQrcode img,
.qrcode-popup__inner #heroQrcode canvas {
    display: block;
}

.qrcode-popup__inner span {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* 小三角箭头 */
.qrcode-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

/* ===== 视频区 ===== */
.video__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.video__item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video__item video {
    width: 100%;
    border-radius: var(--radius);
}

/* ===== 友情链接 ===== */
.friend-links {
    background: var(--bg-card);
}

.friend-links__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    max-width: 700px;
    margin: 0 auto;
}

.friend-links__grid a {
    padding: 10px 22px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.friend-links__grid a:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(230, 57, 70, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.15);
}

/* ===== 页脚 ===== */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
}

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

.footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.footer__logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.footer__links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__links a {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}

.footer__links a:hover {
    color: #fff;
}

.footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.footer__bottom p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* ===== 灯箱 ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.lightbox__close:hover {
    color: var(--primary);
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox__nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.lightbox__prev,
.lightbox__next {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(230, 57, 70, 0.6);
}

/* ===== 动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .about__wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__image {
        order: -1;
    }

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

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

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .nav__menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        transform: translateY(-120%);
        transition: var(--transition);
        border-bottom: 1px solid var(--border);
    }

    .nav__menu.active {
        transform: translateY(0);
    }

    .nav__menu li {
        width: 100%;
        text-align: center;
    }

    .nav__menu .nav__link {
        display: block;
        padding: 14px 0;
        font-size: 16px;
    }

    .nav__toggle {
        display: flex;
    }

    .hero {
        min-height: 500px;
    }

    .hero__info {
        max-width: 100%;
        text-align: center;
    }

    .hero__badge {
        display: flex;
        justify-content: center;
    }

    .hero__meta {
        justify-content: center;
    }

    .hero__date {
        justify-content: center;
    }

    .hero__btns {
        justify-content: center;
    }

    .hero__icon {
        width: 64px;
        height: 64px;
    }

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

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

    .showcase__item img {
        height: 200px;
    }

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

    .about__stats {
        justify-content: center;
        gap: 30px;
    }

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

    .download__card {
        padding: 40px 24px;
    }

    .download__btns {
        flex-direction: column;
        align-items: center;
    }

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

    .footer__links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero__title {
        font-size: 32px;
    }

    .hero__btns {
        flex-direction: column;
        align-items: center;
    }

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

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

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

    .about__stats {
        gap: 20px;
    }

    .about__stat-num {
        font-size: 24px;
    }

    .section__title {
        font-size: 24px;
    }
}
