/* ==========================================================================
   少年三国志推广站 - 全局样式
   移动优先 | 三国暗红 + 金色主题
   ========================================================================== */

/* ---------- CSS 变量 ---------- */
:root {
    --color-bg: #0f0c1a;
    --color-bg-2: #1a1325;
    --color-card: #221a33;
    --color-primary: #c8102e;
    --color-primary-dark: #8b0000;
    --color-gold: #d4af37;
    --color-gold-light: #f4d76e;
    --color-text: #f5f0e8;
    --color-text-muted: #b8a8a0;
    --color-border: rgba(212, 175, 55, 0.3);
    --shadow-gold: 0 4px 24px rgba(212, 175, 55, 0.25);
    --shadow-red: 0 8px 32px rgba(200, 16, 46, 0.4);
    --radius: 14px;
    --radius-sm: 8px;
    --max-width: 768px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}
img, video { max-width: 100%; display: block; }
a { color: var(--color-gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-gold-light); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- 通用容器 ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}
.section { padding: 48px 0; position: relative; }
.section-title {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}
.section-title h2 {
    font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
    font-size: 30px;
    color: var(--color-gold);
    letter-spacing: 2px;
    display: inline-block;
    position: relative;
    padding: 0 24px;
}
.section-title h2::before,
.section-title h2::after {
    content: "❖";
    color: var(--color-primary);
    font-size: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: .7;
}
.section-title h2::before { left: 0; }
.section-title h2::after { right: 0; }
.section-title p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-top: 8px;
}

/* ---------- 顶部导航 ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(15, 12, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: transform .3s;
}
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Ma Shan Zheng", serif;
    font-size: 20px;
    color: var(--color-gold);
}
.nav-logo img {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-gold);
}
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.nav-links a {
    color: var(--color-text);
    font-size: 15px;
    position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--color-gold); }
.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -6px; left: 0; right: 0;
    height: 2px;
    background: var(--color-gold);
    border-radius: 2px;
}
.nav-download {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    color: var(--color-bg) !important;
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow-gold);
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-toggle { display: none; font-size: 24px; color: var(--color-gold); padding: 4px 8px; }

/* ---------- Hero 首屏 ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 16px 120px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: url("../assets/banner/001.jpg") center/cover no-repeat;
    z-index: 0;
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,12,26,.55) 0%, rgba(15,12,26,.7) 50%, rgba(15,12,26,.95) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 560px; }
.hero-tag {
    display: inline-block;
    padding: 5px 16px;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    border: 1px solid var(--color-gold);
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-gold-light);
    margin-bottom: 18px;
    letter-spacing: 1px;
}
.hero-title {
    font-family: "Ma Shan Zheng", serif;
    font-size: 46px;
    line-height: 1.2;
    color: var(--color-gold);
    text-shadow: 0 0 30px rgba(212,175,55,.6), 0 4px 12px rgba(0,0,0,.8);
    margin-bottom: 12px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}
.hero-subtitle {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 28px;
    text-shadow: 0 2px 8px rgba(0,0,0,.8);
}
.hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}
.hero-features span {
    padding: 5px 14px;
    background: rgba(212,175,55,.12);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    font-size: 13px;
    color: var(--color-gold-light);
}
.hero-cta { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 56px;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
    color: var(--color-bg);
    font-size: 20px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(212,175,55,.5), inset 0 2px 0 rgba(255,255,255,.4);
    letter-spacing: 2px;
    animation: pulse 2s infinite;
    position: relative;
}
.btn-download::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 33px;
    border: 2px solid var(--color-gold);
    opacity: .6;
    animation: ring 2s infinite;
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    border-radius: 24px;
    font-size: 14px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(212,175,55,.2);
}
.hero-stat { text-align: center; }
.hero-stat strong {
    display: block;
    font-size: 28px;
    color: var(--color-gold);
    font-family: "Ma Shan Zheng", serif;
}
.hero-stat span { font-size: 12px; color: var(--color-text-muted); }

/* ---------- 游戏特色 ---------- */
.features { background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-2) 100%); }
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.feature-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.feature-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.feature-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    border: 2px solid var(--color-gold);
}
.feature-card h3 {
    font-family: "Ma Shan Zheng", serif;
    font-size: 22px;
    color: var(--color-gold);
    margin-bottom: 10px;
}
.feature-card p { color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }

/* ---------- 福利礼包 ---------- */
.welfare { background: var(--color-bg-2); }
.welfare-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.welfare-card {
    background: linear-gradient(135deg, var(--color-card) 0%, #2a1f3d 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.welfare-card.highlight {
    background: linear-gradient(135deg, #3a1a2a 0%, #4a2235 100%);
    border-color: var(--color-gold);
}
.welfare-icon {
    flex-shrink: 0;
    width: 60px; height: 60px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-gold), var(--color-primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    box-shadow: var(--shadow-gold);
}
.welfare-info { flex: 1; min-width: 0; }
.welfare-info h4 {
    font-size: 16px;
    color: var(--color-gold-light);
    margin-bottom: 4px;
}
.welfare-info p { font-size: 12px; color: var(--color-text-muted); line-height: 1.6; }
.welfare-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    color: var(--color-bg);
    border-radius: 18px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* 优惠券样式 */
.coupon-card {
    background: linear-gradient(135deg, #2a1018 0%, #3d1825 100%);
    border: 2px dashed var(--color-gold);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}
.coupon-card::before, .coupon-card::after {
    content: "";
    position: absolute;
    width: 20px; height: 20px;
    background: var(--color-bg-2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.coupon-card::before { left: -10px; }
.coupon-card::after { right: -10px; }
.coupon-price {
    font-size: 42px;
    color: var(--color-gold);
    font-weight: 700;
    font-family: "Ma Shan Zheng", serif;
}
.coupon-price small { font-size: 16px; }
.coupon-desc { color: var(--color-text-muted); font-size: 13px; margin: 6px 0 14px; }
.coupon-pay {
    display: inline-block;
    padding: 6px 24px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
}

/* ---------- 游戏截图 ---------- */
.screenshots { background: var(--color-bg); }
.screenshot-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 16px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.screenshot-scroll::-webkit-scrollbar { display: none; }
.screenshot-item {
    flex-shrink: 0;
    width: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    scroll-snap-align: center;
    cursor: pointer;
    transition: transform .3s;
}
.screenshot-item:hover { transform: scale(1.02); }
.screenshot-item img { width: 100%; height: 160px; object-fit: cover; }

/* ---------- 视频区 ---------- */
.video-section { background: var(--color-bg-2); }
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-red);
}
.video-wrapper video {
    width: 100%;
    display: block;
    background: #000;
}
.video-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    justify-content: center;
}
.video-tab {
    padding: 8px 24px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 14px;
    color: var(--color-text-muted);
    transition: all .2s;
}
.video-tab.active {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--color-gold-light);
    border-color: var(--color-gold);
}

/* ---------- FAQ ---------- */
.faq { background: var(--color-bg); }
.faq-list { max-width: 640px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--color-card);
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-size: 15px;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.faq-question .faq-icon { color: var(--color-gold); transition: transform .3s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s;
    padding: 0 20px;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.8;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 20px 16px; }

/* ---------- 攻略/福利页内容 ---------- */
.page-hero {
    padding: 96px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-2) 0%, var(--color-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}
.page-hero h1 {
    font-family: "Ma Shan Zheng", serif;
    font-size: 34px;
    color: var(--color-gold);
    margin-bottom: 10px;
}
.breadcrumb {
    font-size: 13px;
    color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-gold); }

.article-list { display: grid; gap: 20px; }
.article-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px 20px;
    transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.article-card h3 {
    font-size: 19px;
    color: var(--color-gold);
    margin-bottom: 10px;
}
.article-card .meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.article-card p { color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }
.article-card .read-more {
    display: inline-block;
    margin-top: 12px;
    color: var(--color-gold);
    font-size: 13px;
}

.welfare-section {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 22px;
    margin-bottom: 20px;
}
.welfare-section h2 {
    font-family: "Ma Shan Zheng", serif;
    font-size: 24px;
    color: var(--color-gold);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.welfare-section ul { padding-left: 20px; }
.welfare-section li {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 2;
    list-style: disc;
}
.welfare-section li strong { color: var(--color-gold-light); }

/* ---------- 底部 ---------- */
.footer {
    background: #0a0815;
    border-top: 1px solid var(--color-border);
    padding: 40px 0 calc(80px + var(--safe-bottom));
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}
.footer-links a { color: var(--color-text-muted); font-size: 13px; }
.footer-links a:hover { color: var(--color-gold); }
.footer-info {
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.9;
}
.footer-info p { margin: 2px 0; }

/* ---------- 固定下载栏 ---------- */
.download-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 99;
    background: rgba(15, 12, 26, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    padding: 10px 16px calc(10px + var(--safe-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.download-bar-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    border: 1px solid var(--color-gold);
    flex-shrink: 0;
}
.download-bar-text { flex: 1; min-width: 0; }
.download-bar-text strong {
    display: block;
    font-size: 15px;
    color: var(--color-gold);
    font-family: "Ma Shan Zheng", serif;
}
.download-bar-text span { font-size: 11px; color: var(--color-text-muted); }
.download-bar .btn-download {
    padding: 10px 28px;
    font-size: 16px;
    animation: pulse 2s infinite;
}
.download-bar .btn-download::after { display: none; }

/* ---------- 动画 ---------- */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
@keyframes ring {
    0% { transform: scale(1); opacity: .6; }
    100% { transform: scale(1.15); opacity: 0; }
}
@keyframes titleGlow {
    from { text-shadow: 0 0 20px rgba(212,175,55,.4), 0 4px 12px rgba(0,0,0,.8); }
    to { text-shadow: 0 0 40px rgba(212,175,55,.8), 0 4px 12px rgba(0,0,0,.8); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; }
.fade-in.visible { animation: fadeInUp .8s ease forwards; }

/* ---------- 图片放大查看 ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-gold);
}
.lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 32px;
    color: var(--color-gold);
    line-height: 1;
}

/* ---------- 响应式 移动端 ---------- */
@media (max-width: 767px) {
    .nav-links {
        position: fixed;
        top: 56px; left: 0; right: 0;
        background: rgba(15, 12, 26, 0.96);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform .3s, opacity .3s, visibility .3s;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 12px 16px;
        font-size: 16px;
        text-align: left;
        border-radius: var(--radius-sm);
    }
    .nav-links a:hover { background: rgba(212,175,55,.1); }
    .nav-links .nav-download {
        margin-top: 8px;
        padding: 12px 20px;
        font-size: 16px;
        text-align: center;
    }
    .nav-toggle { display: block; }
}

/* ---------- 响应式 平板/桌面 ---------- */
@media (min-width: 768px) {
    :root { --max-width: 960px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .welfare-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 60px; }
    .section-title h2 { font-size: 36px; }
    .page-hero h1 { font-size: 42px; }
    .article-list { grid-template-columns: 1fr 1fr; }
    .screenshot-item { width: 320px; }
    .screenshot-item img { height: 200px; }
    .nav-toggle { display: none; }
    .nav-download { padding: 7px 18px; font-size: 14px; }
}

@media (min-width: 1024px) {
    :root { --max-width: 1100px; }
    .feature-grid { grid-template-columns: repeat(4, 1fr); }
    .article-list { grid-template-columns: 1fr 1fr 1fr; }
}
