/* ===== 全局重置与变量 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0e17;
    --bg-panel: #111827;
    --bg-card: #1a2332;
    --border-glow: #2a4a6a;
    --text-primary: #e8edf5;
    --text-secondary: #94a3b8;
    --accent-red: #e63946;
    --accent-red-glow: #ff4d5a;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --font-main: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    --shadow-glow: 0 0 20px rgba(230, 57, 70, 0.3);
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(230, 57, 70, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ===== 布局容器 ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(42, 74, 106, 0.5);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-red);
    text-shadow: 0 0 12px rgba(230, 57, 70, 0.5);
    white-space: nowrap;
}

.nav-logo span {
    color: var(--text-primary);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-left: 6px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-glow);
    color: var(--text-primary);
    font-size: 1.4rem;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: #fff;
    background: rgba(230, 57, 70, 0.15);
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.2);
}

/* ===== 英雄区 ===== */
.hero {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(230, 57, 70, 0.12) 0%, transparent 60%),
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255, 255, 255, 0.015) 40px, rgba(255, 255, 255, 0.015) 41px);
    pointer-events: none;
}

.hero h1 {
    position: relative;
    font-size: clamp(2rem, 6vw, 3.8rem);
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #fff;
    text-shadow:
        0 0 30px rgba(230, 57, 70, 0.6),
        0 0 60px rgba(230, 57, 70, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero h1 .highlight {
    color: var(--accent-red);
}

.hero .subtitle {
    position: relative;
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.hero-cta {
    position: relative;
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
    background: var(--accent-red-glow);
    box-shadow: 0 0 32px rgba(230, 57, 70, 0.7);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-glow);
}

.btn-outline:hover {
    border-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.25);
    transform: translateY(-2px);
}

/* ===== 通用区块 ===== */
.section {
    padding: 60px 0;
    border-bottom: 1px solid rgba(42, 74, 106, 0.3);
}

.section:last-of-type {
    border-bottom: none;
}

.section-header {
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 28px;
    background: var(--accent-red);
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-red);
    flex-shrink: 0;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
    padding-left: 18px;
}

/* ===== 卡片通用 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(42, 74, 106, 0.6);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: rgba(230, 57, 70, 0.4);
    box-shadow: 0 0 24px rgba(230, 57, 70, 0.1);
}

/* ===== 游戏简介 ===== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.intro-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.intro-text p strong {
    color: var(--text-primary);
}

.intro-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(42, 74, 106, 0.5);
    border-radius: 6px;
    padding: 12px 16px;
}

.meta-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.meta-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.intro-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-side h3 {
    color: var(--accent-red);
    font-size: 1.1rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.intro-side ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 2.2;
}

/* ===== 下载区 ===== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(42, 74, 106, 0.6);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 28px rgba(230, 57, 70, 0.12);
    transform: translateY(-2px);
}

.download-card .platform {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.download-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.download-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.download-card .btn {
    width: 100%;
    padding: 10px 20px;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ===== MOD 区 ===== */
.mod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.mod-card {
    background: var(--bg-card);
    border: 1px solid rgba(42, 74, 106, 0.6);
    border-radius: var(--radius);
    padding: 22px;
    transition: all 0.3s ease;
}

.mod-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.12);
}

.mod-card .tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.mod-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 8px;
}

.mod-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 阵营区 ===== */
.faction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.faction-card {
    background: var(--bg-card);
    border: 1px solid rgba(42, 74, 106, 0.6);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faction-card:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.faction-card.allies {
    border-top: 3px solid var(--accent-blue);
}

.faction-card.soviet {
    border-top: 3px solid var(--accent-red);
}

.faction-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.faction-card.allies h3 {
    color: var(--accent-blue);
}

.faction-card.soviet h3 {
    color: var(--accent-red);
}

.faction-card .faction-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.faction-card .faction-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.faction-card .faction-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faction-card .faction-tags span {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.faction-card.allies .faction-tags span {
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.faction-card.soviet .faction-tags span {
    border-color: rgba(230, 57, 70, 0.3);
    color: #fca5a5;
}

/* ===== 截图区 ===== */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(42, 74, 106, 0.6);
    background: var(--bg-panel);
    transition: all 0.3s ease;
    aspect-ratio: 4 / 3;
}

.screenshot-item:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 24px rgba(230, 57, 70, 0.2);
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.screenshot-item:hover img {
    transform: scale(1.06);
}

.screenshot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    font-size: 0.8rem;
    color: #ddd;
    text-align: left;
}

.screenshot-note {
    font-size: 0.72rem;
    color: #4a5568;
    margin-top: 12px;
    text-align: center;
}

/* ===== 玩法区 ===== */
.gameplay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.gameplay-item {
    background: var(--bg-card);
    border: 1px solid rgba(42, 74, 106, 0.6);
    border-radius: var(--radius);
    padding: 22px;
    transition: all 0.3s ease;
}

.gameplay-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.gameplay-item .icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: block;
}

.gameplay-item h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.gameplay-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-panel);
    border-top: 1px solid rgba(42, 74, 106, 0.5);
    padding: 32px 0;
    text-align: center;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer .disclaimer {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #4a5568;
}

/* ===== 响应式 - 手机端 ===== */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 12px 16px;
        gap: 4px;
        border-bottom: 1px solid rgba(42, 74, 106, 0.5);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 16px;
        font-size: 0.95rem;
        border-radius: 6px;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .hero .subtitle {
        letter-spacing: 3px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 80%;
        max-width: 280px;
    }

    .section {
        padding: 40px 0;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .intro-meta {
        grid-template-columns: 1fr 1fr;
    }

    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .faction-grid {
        grid-template-columns: 1fr;
    }

    .gameplay-grid {
        grid-template-columns: 1fr 1fr;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
    }

    .gameplay-grid {
        grid-template-columns: 1fr;
    }

    .intro-meta {
        grid-template-columns: 1fr;
    }

    .nav-logo span {
        display: none;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }
}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}