/* ============================================================
   机电知识竞技场 — 赛博霓虹·全宽屏·闯关战士版 v3
   内容居中 | 玻璃拟态导航 | 卡片悬浮特效 | 字号≥17px
   ============================================================ */

:root {
    --page: #060712;
    --page-2: #0c0e1e;
    --surface: rgba(100, 110, 255, 0.05);
    --surface-2: rgba(120, 110, 255, 0.07);
    --elevated: rgba(8, 8, 24, 0.94);
    --border: rgba(100, 140, 255, 0.12);
    --border-strong: rgba(120, 160, 255, 0.2);
    --text: #e4e8ff;
    --muted: #8892b0;
    --accent: #00f5d4;
    --accent-2: #a855f7;
    --accent-3: #f472b6;
    --warn: #fbbf24;
    --danger: #fb7185;
    --success: #34d399;
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    --content-max: 1320px;
    --content-pad: 32px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    background-color: var(--page);
    background-image:
        radial-gradient(ellipse 90% 70% at 30% -15%, rgba(0, 245, 212, 0.07), transparent 55%),
        radial-gradient(ellipse 70% 50% at 70% -5%, rgba(168, 85, 247, 0.06), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 110%, rgba(244, 114, 182, 0.04), transparent 50%);
    display: flex;
    flex-direction: column;
}

/* ============================================================
   PARTICLE CANVAS + AMBIENT GRID
   ============================================================ */
#particle-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.ambient-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        linear-gradient(rgba(100, 130, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 130, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

/* ============================================================
   独立门户首页（无导航栏）
   ============================================================ */
body.body-landing {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.landing-shell {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px 48px;
    display: flex;
    flex-direction: column;
    animation: main-enter 0.45s var(--ease-out) both;
}

body.body-landing .landing-shell {
    padding: clamp(10px, 1.5vw, 18px) clamp(14px, 2vw, 28px) clamp(12px, 1.8vw, 22px);
}

.landing-shell:has(.landing-page) {
    justify-content: center;
    align-items: stretch;
}

/* ============================================================
   顶部导航 + 主内容区
   ============================================================ */
.app-shell {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.nav-top {
    flex-shrink: 0;
    width: 100%;
    padding: 14px 20px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(14, 16, 28, 0.98), rgba(8, 10, 22, 0.94));
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
}

/* 宽屏固定槽位：整块外框居中，内部按钮单行 */
.nav-top-wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
}

.nav-bar-frame {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 8px 12px 8px 14px;
    border-radius: 18px;
    border: 1px solid rgba(100, 140, 255, 0.28);
    background: linear-gradient(168deg, rgba(26, 30, 52, 0.95), rgba(8, 10, 22, 0.98));
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.07) inset,
        0 14px 36px rgba(0, 0, 0, 0.42),
        0 0 40px rgba(0, 245, 212, 0.06);
}

.nav-bar-frame::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 1px;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.35), rgba(168, 85, 247, 0.2), transparent);
    pointer-events: none;
    opacity: 0.85;
}

.app-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 212, 0.35) transparent;
    padding: 2px 0;
}

.app-nav::-webkit-scrollbar {
    height: 5px;
}

.app-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 212, 0.35);
    border-radius: 999px;
}

.nav-user-badge {
    flex: 0 0 auto;
    align-self: center;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    border: 1px solid rgba(100, 140, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-bar-frame .nav-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 12px;
}

.nav-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(165deg, rgba(55, 65, 120, 0.45), rgba(12, 14, 28, 0.92));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 10px 22px rgba(0, 0, 0, 0.45),
        0 3px 0 rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(0, 245, 212, 0.08);
    transition: transform 0.14s var(--ease-out), box-shadow 0.22s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.nav-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.55s var(--ease-out);
    pointer-events: none;
}

.nav-btn > * {
    position: relative;
    z-index: 1;
}

.nav-btn:hover::before {
    transform: translateX(100%);
}

.nav-btn:hover {
    transform: translateY(-3px) scale(1.02);
    color: #fff;
    border-color: rgba(0, 245, 212, 0.55);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 14px 32px rgba(0, 0, 0, 0.5),
        0 0 28px rgba(0, 245, 212, 0.22),
        0 3px 0 rgba(0, 0, 0, 0.5);
    filter: brightness(1.08);
}

.nav-btn:active {
    transform: translateY(2px) scale(0.96);
    box-shadow:
        0 3px 14px rgba(0, 0, 0, 0.65) inset,
        0 0 28px rgba(0, 245, 212, 0.35),
        0 0 24px rgba(168, 85, 247, 0.3);
    border-color: rgba(0, 245, 212, 0.65);
    filter: brightness(1.12);
    transition-duration: 0.05s;
}

.nav-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(8, 10, 22, 0.95),
        0 0 0 4px rgba(0, 245, 212, 0.55),
        0 10px 22px rgba(0, 0, 0, 0.45);
}

.nav-btn.is-active {
    color: #021c18;
    border-color: rgba(0, 245, 212, 0.75);
    background: linear-gradient(180deg, #6fffe9, #0d9488);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 5px 0 #0f766e,
        0 0 36px rgba(0, 245, 212, 0.45),
        0 14px 28px rgba(13, 148, 136, 0.4);
    animation: nav-active-pulse 2.4s ease-in-out infinite;
}

@keyframes nav-active-pulse {
    0%, 100% { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 5px 0 #0f766e, 0 0 28px rgba(0, 245, 212, 0.35), 0 14px 28px rgba(13, 148, 136, 0.35); }
    50% { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 5px 0 #0f766e, 0 0 44px rgba(0, 245, 212, 0.55), 0 14px 32px rgba(13, 148, 136, 0.45); }
}

.nav-btn svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.nav-btn.is-active svg {
    opacity: 1;
}

/* 主内容：导航下方可滚动区域 */
.stage {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    animation: main-enter 0.45s var(--ease-out) both;
}

.stage-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px 28px 48px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* 大厅 / PK 大厅 / 闯关地图 / 排行榜：主内容区视觉 90%，顶栏保持 100% */
body.body-scale-game .stage {
    overflow-x: hidden;
}

body.body-scale-game .stage-inner {
    --game-scale: 0.9;
    transform: scale(var(--game-scale));
    transform-origin: top center;
    width: calc(100% / var(--game-scale));
    max-width: calc(100% / var(--game-scale));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@keyframes main-enter {
    from { opacity: 0; transform: translateY(12px); filter: blur(3px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-banner {
    text-align: center;
    padding: 24px 32px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), var(--accent-3), transparent);
    opacity: 0.7;
}

.hero-banner h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 900; letter-spacing: -0.04em; line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #c0d0ff 35%, var(--accent) 75%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-banner .subtitle {
    font-size: 18px; color: var(--muted); margin-top: 8px;
}

/* ============================================================
   LOGIN SPLASH — 首页大登录区
   ============================================================ */
.login-splash {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}

.login-form-card, .info-card {
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
}

.login-form-card:hover, .info-card:hover {
    border-color: rgba(0, 245, 212, 0.25);
    box-shadow: 0 0 40px rgba(0, 245, 212, 0.06), 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.login-form-card h2, .info-card h3 { margin: 0 0 16px; font-size: 20px; font-weight: 800; }
.login-form-card h2 { color: var(--accent); }
.info-card h3 { color: var(--accent-2); }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.login-form-card input {
    flex: 1; min-width: 150px;
    padding: 14px 18px; border-radius: var(--radius-md);
    border: 1px solid var(--border); background: rgba(0, 0, 18, 0.55);
    color: var(--text); font: inherit; font-size: 17px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.login-form-card input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.08), 0 0 16px rgba(0, 245, 212, 0.06);
}

.info-card ul {
    margin: 0; padding-left: 20px; color: var(--muted); font-size: 17px; line-height: 2.2;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
.grid.four { grid-template-columns: 1fr 1fr 1fr 1fr; }
.grid.five { grid-template-columns: repeat(5, 1fr); }

/* ============================================================
   CARD — 核心卡片样式，悬浮动效
   ============================================================ */
.card {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: all 0.35s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.35), transparent);
    opacity: 0; transition: opacity 0.35s;
}

.card::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.25), transparent);
    opacity: 0; transition: opacity 0.35s;
}

.card:hover {
    border-color: rgba(0, 245, 212, 0.3);
    box-shadow: 0 0 50px rgba(0, 245, 212, 0.07), 0 8px 32px rgba(0, 0, 0, 0.35);
    transform: translateY(-3px);
}

.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 0.5; }

a.card-link { text-decoration: none; color: inherit; display: block; }
a.card-link:hover { border-color: rgba(168, 85, 247, 0.35); transform: translateY(-4px); }

.card-icon {
    width: 44px; height: 44px; border-radius: 13px;
    display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 12px;
    background: linear-gradient(145deg, rgba(0, 245, 212, 0.16), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(0, 245, 212, 0.16);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.card:hover .card-icon {
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(0, 245, 212, 0.15);
}

.card-icon.alt {
    background: linear-gradient(145deg, rgba(244, 114, 182, 0.16), rgba(168, 85, 247, 0.08));
    border-color: rgba(244, 114, 182, 0.16);
}

.card h2, .card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--text); }
.card p { color: var(--muted); font-size: 17px; margin: 0; line-height: 1.55; }

/* ============================================================
   FEATURE CARDS — 首页三大入口
   ============================================================ */
.feature-card {
    padding: 28px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transition: all 0.35s var(--ease-out);
    position: relative; overflow: hidden;
}

.feature-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 245, 212, 0.06), transparent 70%);
    opacity: 0; transition: opacity 0.35s;
}

.feature-card:hover {
    border-color: rgba(0, 245, 212, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 0 60px rgba(0, 245, 212, 0.1), 0 12px 36px rgba(0, 0, 0, 0.4);
}
.feature-card:hover::before { opacity: 1; }

.feature-card .fc-icon { font-size: 44px; line-height: 1; transition: transform 0.35s var(--ease-spring); }
.feature-card:hover .fc-icon { transform: scale(1.15) rotate(-5deg); }
.feature-card .fc-title { font-size: 21px; font-weight: 800; }
.feature-card .fc-desc { font-size: 17px; color: var(--muted); }

/* ============================================================
   CHIPS
   ============================================================ */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.chip {
    padding: 6px 14px; border-radius: 999px; font-size: 17px; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
    transition: border-color 0.2s, transform 0.15s;
}
.chip:hover { transform: translateY(-1px); }

.chip.live {
    border-color: rgba(0, 245, 212, 0.4); color: var(--accent);
    background: rgba(0, 245, 212, 0.06);
    animation: pulse-soft 2.5s ease-out infinite;
}
.chip.hot {
    border-color: rgba(251, 113, 133, 0.4); color: var(--danger);
    background: rgba(251, 113, 133, 0.06);
}
.chip.gold {
    border-color: rgba(251, 191, 36, 0.4); color: var(--warn);
    background: rgba(251, 191, 36, 0.06);
}

@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.18); }
    50% { box-shadow: 0 0 0 6px rgba(0, 245, 212, 0); }
}

/* ============================================================
   METRICS
   ============================================================ */
.metric-row { display: flex; gap: 14px; flex-wrap: wrap; }

.metric {
    flex: 1; min-width: 140px; padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--surface-2); border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}
.metric:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 245, 212, 0.25);
    box-shadow: 0 0 24px rgba(0, 245, 212, 0.06);
}

.metric strong {
    display: block; font-size: clamp(26px, 3vw, 36px); font-weight: 900;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 4px;
}
.metric span { color: var(--muted); font-size: 17px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.primary-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 30px; border-radius: 14px; border: none; cursor: pointer;
    font: inherit; font-size: 18px; font-weight: 700; text-decoration: none;
    color: #021a18;
    background: linear-gradient(135deg, #5eead4 0%, #00f5d4 40%, #0d9488 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 28px rgba(0, 245, 212, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.25s var(--ease-spring), box-shadow 0.3s, filter 0.3s, background-position 0.4s;
    letter-spacing: 0.02em;
}
.primary-btn:hover {
    background-position: 100% 0; filter: brightness(1.08);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 48px rgba(0, 245, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.primary-btn:active { transform: scale(0.96); transition-duration: 0.06s; }

.btn-ripple {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-expand 0.6s var(--ease-out) forwards;
    pointer-events: none;
    z-index: 2;
}

@keyframes ripple-expand {
    to { transform: translate(-50%, -50%) scale(25); opacity: 0; }
}

.btn-purple {
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.22); color: #fff;
}
.btn-danger {
    background: linear-gradient(135deg, #fb7185, #e11d48);
    box-shadow: 0 0 28px rgba(251, 113, 133, 0.22); color: #fff;
}

/* ============================================================
   LANDING — 首页主视觉
   ============================================================ */
.landing-page {
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
    min-height: calc(100vh - 140px);
}

.landing-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 36px;
    padding: 16px 8px 28px;
    min-height: min(50vh, 560px);
}

.landing-tagline {
    margin: 0;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    background: linear-gradient(105deg, #fff 0%, #d4f8ff 38%, var(--accent) 55%, var(--accent-2) 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 32px rgba(0, 245, 212, 0.28));
}

.landing-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 20px;
}

.landing-chip {
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 800;
    padding: 16px 26px;
    border-radius: 999px;
    border: 1px solid rgba(0, 245, 212, 0.28);
    background: linear-gradient(180deg, rgba(34, 42, 82, 0.95), rgba(10, 12, 26, 0.94));
    box-shadow:
        0 0 28px rgba(0, 245, 212, 0.14),
        0 5px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.2s var(--ease-out), box-shadow 0.28s ease, border-color 0.22s ease, filter 0.22s ease;
    cursor: default;
    white-space: nowrap;
}

.landing-chip:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(168, 85, 247, 0.45);
    filter: brightness(1.08);
    box-shadow:
        0 0 42px rgba(168, 85, 247, 0.22),
        0 10px 28px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(312px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-tile {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 30px 32px 34px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(100, 140, 255, 0.22);
    background: linear-gradient(168deg, rgba(48, 56, 100, 0.4), rgba(8, 10, 22, 0.94));
    box-shadow:
        0 16px 44px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(0, 245, 212, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: transform 0.24s var(--ease-out), box-shadow 0.3s ease, border-color 0.26s ease, filter 0.26s ease;
}

.landing-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(125deg, transparent 35%, rgba(0, 245, 212, 0.12) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform 0.55s var(--ease-out);
    pointer-events: none;
    z-index: 0;
}

.landing-tile:hover::after {
    transform: translateX(100%);
}

.landing-tile > * {
    position: relative;
    z-index: 1;
}

.landing-tile:hover {
    transform: translateY(-10px) scale(1.025);
    border-color: rgba(0, 245, 212, 0.48);
    filter: brightness(1.06);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 52px rgba(0, 245, 212, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.landing-tile:active {
    transform: translateY(-4px) scale(1.01);
    transition-duration: 0.08s;
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.55),
        0 0 36px rgba(168, 85, 247, 0.25),
        inset 0 2px 12px rgba(0, 0, 0, 0.35);
}

.landing-tile--static {
    cursor: default;
}

.landing-tile--static::after {
    display: none;
}

.landing-tile--static:hover {
    transform: translateY(-5px);
    filter: brightness(1.04);
}

.landing-tile--static:active {
    transform: translateY(-2px);
}

.landing-tile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
}

.landing-tile-title {
    margin: 0;
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #f8fafc;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.landing-tile-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: clamp(30px, 3.8vw, 44px);
    line-height: 1;
    filter: drop-shadow(0 0 14px rgba(0, 245, 212, 0.3));
}

.landing-ico {
    display: inline-block;
}

.landing-tile-desc {
    margin: 0;
    font-size: clamp(18px, 1.75vw, 22px);
    line-height: 1.65;
    color: #cbd5e1;
    font-weight: 700;
}

.landing-cta {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 12px 0 20px;
}

.landing-cta-btn.primary-btn {
    font-size: clamp(22px, 2.4vw, 28px);
    padding: 22px 48px;
    gap: 18px;
    min-width: 280px;
    font-weight: 900;
    letter-spacing: 0.1em;
    box-shadow:
        0 0 44px rgba(0, 245, 212, 0.38),
        0 10px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.landing-cta-btn.primary-btn:hover {
    box-shadow:
        0 0 56px rgba(0, 245, 212, 0.5),
        0 14px 40px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.landing-cta-icons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15em;
    line-height: 1;
}

.landing-cta-note {
    margin: 0;
    font-size: clamp(19px, 1.9vw, 24px);
    font-weight: 700;
    color: #a8b4d4;
    max-width: 560px;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .landing-tagline {
        white-space: normal;
        letter-spacing: 0.05em;
    }

    .landing-chip {
        white-space: normal;
        text-align: center;
    }

    .landing-page {
        min-height: auto;
    }

    .landing-hero {
        min-height: auto;
        padding-top: 8px;
    }
}

/* ============================================================
   VS BADGE
   ============================================================ */
.vs-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.18), rgba(168, 85, 247, 0.18));
    border: 2px solid rgba(0, 245, 212, 0.25);
    font-weight: 900; font-size: 18px; color: var(--accent);
    animation: vs-glow 2.5s ease-in-out infinite;
}

@keyframes vs-glow {
    0%, 100% { box-shadow: 0 0 16px rgba(0, 245, 212, 0.2); }
    50% { box-shadow: 0 0 32px rgba(168, 85, 247, 0.3); }
}

/* ============================================================
   LEADERBOARD — 三列排行榜
   ============================================================ */
.rank-podium {
    display: flex; gap: 18px; justify-content: center;
}

.podium-item {
    text-align: center; padding: 20px 28px; border-radius: var(--radius-xl);
    border: 1px solid var(--border); background: var(--surface);
    min-width: 170px;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, border-color 0.3s;
}
.podium-item:hover { transform: translateY(-5px); }

.podium-item.first {
    border-color: rgba(251, 191, 36, 0.4);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.1), rgba(6, 7, 18, 0.92));
    box-shadow: 0 0 48px rgba(251, 191, 36, 0.1);
    animation: king-glow 3s ease-in-out infinite;
}

@keyframes king-glow {
    0%, 100% { box-shadow: 0 0 48px rgba(251, 191, 36, 0.1); }
    50% { box-shadow: 0 0 72px rgba(251, 191, 36, 0.18); }
}

.podium-item .medal {
    font-size: 26px;
    line-height: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border-radius: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
}
.podium-item.first .medal {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.35), rgba(0, 0, 0, 0.4));
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
}
.podium-item .p-name { font-size: 19px; font-weight: 800; }
.podium-item .p-meta { font-size: 17px; color: var(--muted); }
.podium-item .p-score { font-size: 22px; font-weight: 900; margin-top: 6px; color: var(--warn); }
.podium-item.first .p-score { color: #fbbf24; }

/* Rank grid */
.rank-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px;
    flex: 1; overflow-y: auto; align-content: start;
    min-height: 0;
}

.rank-column {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 18px 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.rank-column:hover {
    border-color: rgba(0, 245, 212, 0.2);
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.04);
}

.rank-column h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--accent); }

.rank-list-compact { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

.rank-list-compact li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 10px; font-size: 17px;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
    border: 1px solid transparent;
}
.rank-list-compact li:hover {
    background: rgba(0, 245, 212, 0.04); border-color: var(--border); transform: translateX(4px);
}

.rank-list-compact .r-num {
    width: 30px; height: 30px; border-radius: 10px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 17px;
    background: rgba(251, 191, 36, 0.1); color: var(--warn);
    flex-shrink: 0;
}
.rank-list-compact li:nth-child(1) .r-num {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(251, 191, 36, 0.08));
    color: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}
.rank-list-compact li:nth-child(2) .r-num { color: #94a3b8; }
.rank-list-compact li:nth-child(3) .r-num { color: #fb923c; }

.rank-list-compact .r-info { flex: 1; min-width: 0; }
.rank-list-compact .r-name { font-weight: 700; font-size: 17px; }
.rank-list-compact .r-sub { font-size: 17px; color: var(--muted); }
.rank-list-compact .r-val { font-weight: 800; font-size: 17px; color: var(--accent); flex-shrink: 0; }

.expand-btn {
    display: block; width: 100%; margin-top: 10px; padding: 10px;
    border-radius: 10px; border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25); color: var(--muted);
    font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.expand-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 245, 212, 0.04); }

/* ============================================================
   PK ARENA STAGE
   ============================================================ */
.stage-area {
    display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px;
}

.pk-room-grid.stage-area {
    /* 左：场景图 ≈ 0.46fr，右：题目区 ≈ 1.54fr → 宽约比约 23% : 77%（在 minmax 未卡死时） */
    grid-template-columns: minmax(240px, 0.46fr) minmax(0, 1.54fr);
    gap: 20px;
}

.stage-canvas {
    border-radius: var(--radius-xl); border: 1px solid var(--border);
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 245, 212, 0.07), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.08), transparent 40%),
        linear-gradient(185deg, #0a0a1e 0%, #101530 40%, #0a1a1a 42%, #060712 100%);
    min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.stage-canvas:hover {
    border-color: rgba(0, 245, 212, 0.25);
    box-shadow: 0 0 36px rgba(0, 245, 212, 0.06);
}

.rope-line {
    width: 82%; height: 8px; border-radius: 999px;
    background: linear-gradient(90deg, #60efff, #00f5d4, #fbbf24, #f59e0b, #fbbf24, #00f5d4, #60efff);
    box-shadow: 0 0 18px rgba(0, 245, 212, 0.3);
    animation: rope-glow 2.5s ease-in-out infinite;
    position: relative;
}

.rope-marker {
    position: absolute;
    top: -10px;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border-radius: 10px;
    background: linear-gradient(180deg, #fef3c7, #f59e0b);
    border: 2px solid #fffbeb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rope-glow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(0, 245, 212, 0.3)); }
    50% { filter: drop-shadow(0 0 14px rgba(0, 245, 212, 0.6)); }
}

.stage-players { display: flex; justify-content: space-between; width: 82%; font-size: 18px; font-weight: 700; }
.stage-players .player-left { color: #60efff; }
.stage-players .player-right { color: #f472b6; }

/* Answer buttons */
.answer-grid { display: grid; gap: 8px; }

.answer-btn {
    width: 100%; min-height: 50px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: rgba(0, 0, 20, 0.4); color: var(--text);
    cursor: pointer; font: inherit; font-size: 17px;
    padding: 12px 16px; display: flex; align-items: center; gap: 10px;
    transition: all 0.2s var(--ease-out);
}
.answer-btn:hover {
    border-color: rgba(0, 245, 212, 0.45); background: rgba(0, 245, 212, 0.05);
    transform: scale(1.015); box-shadow: 0 0 20px rgba(0, 245, 212, 0.08);
}
.answer-btn span {
    width: 30px; height: 30px; border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #fbbf24, var(--accent));
    color: #021a18; font-weight: 900; font-size: 17px; flex-shrink: 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-stack { display: grid; gap: 14px; }

label { font-size: 17px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

input, select {
    width: 100%; padding: 14px 18px; border-radius: var(--radius-md);
    border: 1px solid var(--border); background: rgba(0, 0, 18, 0.5);
    color: var(--text); font: inherit; font-size: 17px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
input:focus, select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.08), 0 0 16px rgba(0, 245, 212, 0.06);
}
select option { background: #0c0e1e; color: var(--text); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-wrap {
    width: 100%; height: 8px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.05); overflow: hidden; margin-top: 10px;
}
.progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    background-size: 200% 100%;
    animation: progress-shimmer 2s ease-in-out infinite;
    transition: width 0.5s var(--ease-spring);
}
@keyframes progress-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================================
   STAT BAR + STAT CELL
   ============================================================ */
.stat-bar { display: flex; gap: 14px; flex-wrap: wrap; }

.stat-cell {
    flex: 1; min-width: 110px; padding: 16px 20px;
    border-radius: var(--radius-lg); background: var(--surface-2);
    border: 1px solid var(--border); text-align: center;
    transition: transform 0.25s var(--ease-spring), border-color 0.25s, box-shadow 0.25s;
}
.stat-cell:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 245, 212, 0.2);
    box-shadow: 0 0 18px rgba(0, 245, 212, 0.05);
}

.stat-cell strong { display: block; font-size: 24px; font-weight: 800; color: var(--warn); margin-bottom: 2px; }
.stat-cell span { font-size: 17px; color: var(--muted); }

/* ============================================================
   STREAK BADGE
   ============================================================ */
.streak-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px; border-radius: 999px;
    font-weight: 800; font-size: 17px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(251, 146, 60, 0.3); color: #fb923c;
    animation: streak-glow 1.5s ease-in-out infinite;
}
@keyframes streak-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(251, 146, 60, 0.12); }
    50% { box-shadow: 0 0 22px rgba(251, 146, 60, 0.25); }
}

/* ============================================================
   PILL
   ============================================================ */
.pill {
    padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 17px;
    background: var(--surface-2); border: 1px solid var(--border);
}
.pill.win { background: rgba(0, 245, 212, 0.08); border-color: rgba(0, 245, 212, 0.3); color: var(--accent); }
.pill.lose { background: rgba(251, 113, 133, 0.08); border-color: rgba(251, 113, 133, 0.3); color: var(--danger); }

/* ============================================================
   CONFETTI / SCORE FLOAT
   ============================================================ */
.confetti-piece {
    position: fixed; width: 10px; height: 10px; z-index: 999; pointer-events: none;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}
.score-float {
    position: fixed; z-index: 999; pointer-events: none;
    font-weight: 900; font-size: 28px; color: var(--warn);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    animation: score-float-up 1.2s ease-out forwards;
}
@keyframes score-float-up {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    50% { transform: translateY(-40px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-80px) scale(0.8); opacity: 0; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .cover-hero::before {
        animation: none !important;
    }
    .chip.live, .podium-item.first, .rope-line, .progress-fill, .streak-badge, .vs-badge {
        animation: none !important;
    }
    .stage { animation: none !important; }
    .card:hover, .card-link:hover, .feature-card:hover, .stat-cell:hover, .metric:hover, .login-form-card:hover, .info-card:hover {
        transform: none !important;
    }
}

/* ============================================================
   KNOWLEDGE BANK CONSOLE — 管理员题库配置台
   ============================================================ */
.kb-units-hint {
    margin: -8px 0 18px;
    padding: 0 4px;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}

.kb-console {
    position: relative;
    display: grid;
    gap: clamp(18px, 2vw, 28px);
    min-height: calc(100vh - 130px);
}

.kb-console::before {
    content: "";
    position: absolute;
    inset: -8% -3% auto;
    height: 420px;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 32%, rgba(55, 244, 255, 0.18), transparent 24%),
        radial-gradient(circle at 80% 24%, rgba(255, 209, 102, 0.12), transparent 22%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 80px);
    mask-image: linear-gradient(180deg, black, transparent);
}

.kb-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: clamp(12px, 1.4vw, 22px) clamp(18px, 2vw, 32px);
    border: 1px solid rgba(55, 244, 255, 0.26);
    border-radius: 8px;
    background:
        linear-gradient(110deg, rgba(55, 244, 255, 0.13), transparent 50%, rgba(255, 209, 102, 0.1)),
        linear-gradient(160deg, rgba(17, 27, 62, 0.9), rgba(4, 7, 18, 0.94));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.kb-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(55, 244, 255, 0.22);
    background: conic-gradient(from 120deg, transparent, rgba(55, 244, 255, 0.18), transparent, rgba(255, 209, 102, 0.15), transparent);
    animation: cover-spin 26s linear infinite;
}

.kb-hero > * {
    position: relative;
    z-index: 1;
}

.kb-hero h1 {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 34px);
    line-height: 1;
    font-weight: 950;
    color: #fff;
    text-shadow: 0 0 34px rgba(55, 244, 255, 0.28);
}

.kb-hero p:last-child {
    max-width: 760px;
    margin: 8px 0 0;
    color: #cbd8f6;
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 700;
}

.kb-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.kb-hero .game-kicker {
    margin-bottom: 6px;
    font-size: 10px;
}

.kb-hero .primary-btn,
.kb-hero .inline-btn {
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 13px;
}

.kb-metrics > div {
    border-radius: 6px;
}

.kb-bank-nav {
    position: sticky;
    top: 8px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(55, 244, 255, 0.22);
    border-radius: 8px;
    background: rgba(5, 8, 20, 0.78);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.kb-bank-nav a,
.kb-bank-nav-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    color: #eaf6ff;
    text-decoration: none;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(55, 244, 255, 0.16), rgba(255, 209, 102, 0.08), rgba(5, 8, 20, 0.92));
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    transition: transform 0.18s var(--ease-spring), border-color 0.18s ease, box-shadow 0.18s ease;
}

.kb-bank-nav a:hover,
.kb-bank-nav-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 209, 102, 0.55);
    box-shadow: 0 0 26px rgba(55, 244, 255, 0.16);
}

.kb-bank-nav-btn {
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
}

.kb-rule-dialog {
    max-width: min(680px, 92vw);
}

.kb-rule-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 20px);
}

.kb-rule-panel > div,
.kb-mainline {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 2vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(55, 244, 255, 0.1), rgba(5, 8, 22, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 32px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.kb-rule-panel h2,
.kb-mainline h2 {
    margin: 10px 0;
    font-size: clamp(20px, 1.8vw, 30px);
    color: #fff;
}

.kb-rule-panel p,
.kb-mainline p {
    margin: 0;
    color: #aebddd;
    font-weight: 700;
    line-height: 1.7;
}

.kb-rule-tag {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.kb-bank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.8vw, 28px);
}

.kb-bank-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 12px;
    min-height: 280px;
    padding: clamp(22px, 2.2vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(28, 42, 92, 0.86), rgba(5, 8, 22, 0.94)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 34px);
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%, 0 12%);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
    transition: transform 0.22s var(--ease-spring), border-color 0.22s ease, box-shadow 0.22s ease;
}

.kb-bank-card.public {
    background:
        linear-gradient(145deg, rgba(13, 148, 136, 0.32), rgba(5, 8, 22, 0.94)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 34px);
}

.kb-bank-card.major {
    background:
        linear-gradient(145deg, rgba(168, 85, 247, 0.28), rgba(5, 8, 22, 0.94)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 34px);
}

.kb-bank-card:hover {
    transform: translateY(-9px) scale(1.012);
    border-color: rgba(255, 209, 102, 0.52);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42), 0 0 38px rgba(55, 244, 255, 0.14);
}

.kb-bank-card > span {
    width: fit-content;
    padding: 7px 13px;
    border-radius: 999px;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-weight: 950;
}

.kb-bank-card h2 {
    margin: 0;
    font-size: clamp(25px, 2.3vw, 42px);
    line-height: 1.05;
}

.kb-bank-card p {
    margin: 0;
    color: #c3d0ee;
    font-weight: 700;
    line-height: 1.7;
}

.kb-bank-card strong {
    color: var(--game-gold);
}

.kb-bank-card .inline-btn {
    justify-self: start;
    align-self: end;
}

.kb-mainline {
    display: grid;
    gap: 20px;
}

.kb-mainline-head {
    max-width: 980px;
}

.kb-chapter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.kb-chapter-grid div,
.kb-difficulty-flow span {
    display: grid;
    gap: 5px;
    min-height: 82px;
    place-items: center;
    text-align: center;
    padding: 12px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.24);
}

.kb-chapter-grid strong {
    color: var(--game-gold);
    font-size: 22px;
}

.kb-chapter-grid span,
.kb-difficulty-flow span {
    color: #dbe7ff;
    font-weight: 850;
}

.kb-difficulty-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.kb-table-panel,
.kb-policy-grid article,
.kb-flow-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 2vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(21, 33, 70, 0.86), rgba(5, 8, 22, 0.94)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 32px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.kb-rule-table {
    min-width: 760px;
}

.kb-rule-table th {
    color: #dbeafe;
}

.kb-rule-table td:first-child {
    font-weight: 900;
    color: var(--game-gold);
}

.kb-policy-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 20px);
}

.kb-policy-grid article {
    min-height: 220px;
}

.kb-policy-grid h2 {
    margin: 12px 0 10px;
    font-size: clamp(20px, 1.6vw, 28px);
}

.kb-policy-grid p {
    margin: 0;
    color: #b8c7e8;
    font-weight: 700;
    line-height: 1.7;
}

.kb-flow-panel {
    display: grid;
    gap: 16px;
}

.kb-flow {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.kb-flow div {
    position: relative;
    display: grid;
    min-height: 78px;
    place-items: center;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(55, 244, 255, 0.18);
    background: rgba(0, 0, 0, 0.24);
    color: #eaf6ff;
    font-weight: 900;
}

.kb-flow div::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    width: 18px;
    height: 2px;
    background: var(--game-gold);
    box-shadow: 0 0 14px rgba(255, 209, 102, 0.48);
}

.kb-flow div:last-child::after {
    display: none;
}

.kb-grade-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 20px);
}

.kb-grade-card {
    position: relative;
    overflow: hidden;
    min-height: 156px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(55, 244, 255, 0.12), rgba(5, 8, 22, 0.9)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 30px);
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%, 0 12%);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
    transition: transform 0.24s var(--ease-spring), border-color 0.24s ease, box-shadow 0.24s ease;
}

.kb-grade-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 209, 102, 0.46);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38), 0 0 34px rgba(55, 244, 255, 0.14);
}

.kb-grade-card span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    color: #061018;
    font-weight: 950;
}

.kb-grade-card h2 {
    margin: 0 0 10px;
    font-size: clamp(17px, 1.25vw, 22px);
    line-height: 1.35;
}

.kb-grade-card p {
    margin: 0;
    color: #95a8ce;
    font-weight: 700;
}

.kb-main-grid {
    align-items: start;
}

.kb-panel {
    border-radius: 8px;
    background:
        linear-gradient(155deg, rgba(18, 28, 62, 0.86), rgba(5, 7, 17, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
}

.kb-list {
    display: grid;
    gap: 10px;
}

.kb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.kb-row:hover {
    transform: translateX(6px);
    border-color: rgba(55, 244, 255, 0.34);
    background: rgba(55, 244, 255, 0.055);
}

.kb-row strong {
    color: #f8fbff;
    font-size: 15px;
}

.kb-row span {
    color: #9fb1d7;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.nav-btn-admin {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.28), rgba(168, 85, 247, 0.18), rgba(8, 10, 22, 0.96)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 22px);
}

@media (max-width: 1100px) {
    .kb-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .kb-actions {
        justify-content: flex-start;
    }

    .kb-grade-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kb-bank-grid,
    .kb-rule-panel {
        grid-template-columns: 1fr;
    }

    .kb-chapter-grid,
    .kb-difficulty-flow,
    .kb-policy-grid,
    .kb-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .kb-grade-grid {
        grid-template-columns: 1fr;
    }
}

/* 题库 · 公共通识四子库 / 年级专属册 站内页 */
.kb-taxonomy-page .kb-taxonomy-total {
    text-align: center;
    padding: 22px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: rgba(8, 10, 22, 0.72);
    margin-bottom: 22px;
}

.kb-taxonomy-big {
    margin: 8px 0 0;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 900;
    color: var(--accent);
}

.kb-taxonomy-big span {
    font-size: 18px;
    font-weight: 700;
    color: var(--muted);
    margin-left: 6px;
}

.kb-taxonomy-warn {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--warn);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.kb-sublib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.kb-sublib-card {
    padding: 26px 22px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(100, 140, 255, 0.22);
    background: linear-gradient(168deg, rgba(34, 42, 82, 0.55), rgba(8, 10, 22, 0.94));
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 260px;
}

.kb-sublib-abbr {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #021c18;
    background: linear-gradient(90deg, #5eead4, #a855f7);
}

.kb-sublib-card h2 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.25;
}

.kb-sublib-card p {
    margin: 0;
    flex: 1;
    font-size: clamp(16px, 1.5vw, 19px);
    color: #94a3b8;
    line-height: 1.6;
}

.kb-sublib-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.kb-sublib-count strong {
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 900;
    color: var(--accent);
}

.kb-sublib-count span {
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--muted);
    font-weight: 700;
}

.kb-sublib-code {
    font-size: 13px;
    color: #64748b;
    word-break: break-all;
}

.kb-taxonomy-list {
    margin: 0;
    padding-left: 1.2em;
    color: #cbd5e1;
    line-height: 1.75;
}

.kb-grade-book-block {
    margin-bottom: 22px;
}

.kb-grade-book-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.kb-grade-book-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kb-grade-book-metrics > div {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

.kb-grade-book-metrics strong {
    display: block;
    font-size: 14px;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.kb-grade-book-metrics span {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent-2);
}

.kb-grade-book-metrics em {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
    font-style: normal;
}

.kb-subhead {
    margin: 0 0 6px;
    font-size: 16px;
    color: #f8fafc;
}

.kb-subhead-desc {
    margin: 0 0 14px;
    font-size: 12px;
    color: #64748b;
}

.kb-major-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.kb-major-chip {
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(0, 245, 212, 0.2);
    background: rgba(0, 245, 212, 0.06);
    min-width: 140px;
}

.kb-major-chip strong {
    display: block;
    font-size: 14px;
    color: #f1f5f9;
}

.kb-major-chip span {
    font-size: 18px;
    font-weight: 900;
    color: var(--accent);
}

/* ============================================================
   NAV ARENA FRAME — 不规则动态导航栏
   ============================================================ */
.nav-top {
    padding-left: clamp(12px, 1.4vw, 24px);
    padding-right: clamp(12px, 1.4vw, 24px);
}

.nav-top-wrap {
    max-width: min(1840px, calc(100vw - 24px));
}

.nav-bar-frame {
    min-height: 76px;
    padding: 12px clamp(18px, 2vw, 34px);
    border-radius: 6px;
    border-color: rgba(55, 244, 255, 0.36);
    background:
        linear-gradient(90deg, rgba(55, 244, 255, 0.13), transparent 18%, transparent 82%, rgba(255, 209, 102, 0.12)),
        linear-gradient(168deg, rgba(26, 35, 76, 0.96), rgba(5, 8, 20, 0.98));
    clip-path: polygon(2.2% 0, 97.8% 0, 100% 50%, 97.8% 100%, 2.2% 100%, 0 50%);
}

.nav-bar-frame::before {
    content: "";
    position: absolute;
    inset: 7px 14px;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: polygon(2.2% 0, 97.8% 0, 100% 50%, 97.8% 100%, 2.2% 100%, 0 50%);
    pointer-events: none;
}

.nav-bar-frame::after {
    top: auto;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--game-cyan), var(--game-gold), var(--game-red), transparent);
    animation: nav-energy-run 2.8s linear infinite;
}

.nav-edge-art {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: clamp(58px, 5vw, 96px);
    height: 48px;
    transform: translateY(-50%);
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.88), rgba(55, 244, 255, 0.5)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 14px);
    box-shadow: 0 0 26px rgba(55, 244, 255, 0.24), inset 0 0 18px rgba(255, 255, 255, 0.18);
    opacity: 0.9;
    animation: nav-edge-pulse 2.6s ease-in-out infinite;
}

.nav-edge-left {
    left: -4px;
    clip-path: polygon(0 50%, 30% 0, 100% 0, 72% 50%, 100% 100%, 30% 100%);
}

.nav-edge-right {
    right: -4px;
    clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%, 28% 50%);
    animation-delay: 0.5s;
}

.app-nav {
    position: relative;
    z-index: 2;
    gap: clamp(12px, 1.05vw, 20px);
}

.nav-bar-frame .nav-btn,
.nav-btn {
    min-width: clamp(116px, 8vw, 162px);
    justify-content: center;
    padding: 14px clamp(20px, 1.8vw, 32px);
    border-radius: 6px;
    border-color: rgba(255, 255, 255, 0.16);
    background:
        linear-gradient(135deg, rgba(55, 244, 255, 0.16), rgba(255, 209, 102, 0.08) 46%, rgba(8, 10, 22, 0.96)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 22px);
    clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
    font-size: clamp(15px, 0.95vw, 18px);
    transform-style: preserve-3d;
    animation: nav-btn-idle 4.6s ease-in-out infinite;
}

.nav-bar-frame .nav-btn:nth-child(2n) {
    clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
    animation-delay: 0.32s;
}

.nav-bar-frame .nav-btn:nth-child(3n) {
    animation-delay: 0.64s;
}

.nav-btn::after {
    content: "";
    position: absolute;
    inset: auto 14px 7px 14px;
    height: 2px;
    z-index: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(55, 244, 255, 0.86), transparent);
    opacity: 0.72;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-btn:hover {
    transform: translateY(-6px) scale(1.045) rotateX(5deg);
    border-color: rgba(255, 209, 102, 0.62);
}

.nav-btn:hover::after {
    opacity: 1;
    transform: scaleX(1.18);
    background: linear-gradient(90deg, transparent, var(--game-gold), var(--game-cyan), transparent);
}

.nav-btn:active {
    transform: translateY(1px) scale(0.97);
}

.nav-btn.is-active {
    color: #061018;
    background:
        linear-gradient(135deg, #fff1a6, #37f4ff 54%, #37ffb1),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 20px);
    border-color: rgba(255, 255, 255, 0.65);
}

.nav-btn svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 10px rgba(55, 244, 255, 0.35));
}

.nav-user-badge {
    position: relative;
    z-index: 2;
    border-radius: 6px;
    min-width: 132px;
    text-align: center;
    clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

@keyframes nav-energy-run {
    from { filter: hue-rotate(0deg); transform: translateX(-2%); }
    to { filter: hue-rotate(36deg); transform: translateX(2%); }
}

@keyframes nav-edge-pulse {
    0%, 100% { filter: brightness(1); transform: translateY(-50%) scaleX(1); }
    50% { filter: brightness(1.28); transform: translateY(-50%) scaleX(1.08); }
}

@keyframes nav-btn-idle {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -3px; }
}

@media (max-width: 900px) {
    .nav-bar-frame {
        clip-path: none;
        border-radius: 8px;
    }

    .nav-edge-art {
        display: none;
    }

    .nav-bar-frame .nav-btn,
    .nav-btn {
        min-width: 96px;
        padding: 11px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-bar-frame::after,
    .nav-edge-art,
    .nav-btn {
        animation: none !important;
    }
}

/* ============================================================
   DASHBOARD ARENA — 游戏大厅主菜单
   ============================================================ */
.dashboard-arena {
    position: relative;
    min-height: calc(100vh - 128px);
    display: grid;
    grid-template-rows: auto minmax(300px, 1fr) auto auto;
    gap: clamp(18px, 2vw, 30px);
    overflow: hidden;
    padding: clamp(12px, 1.5vw, 22px) 0 0;
}

.dashboard-arena::before {
    content: "";
    position: absolute;
    inset: -10% -4% 10%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 28%, rgba(55, 244, 255, 0.18), transparent 24%),
        radial-gradient(circle at 86% 20%, rgba(255, 209, 102, 0.12), transparent 22%),
        radial-gradient(circle at 48% 70%, rgba(168, 85, 247, 0.12), transparent 30%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 86px);
    mask-image: linear-gradient(180deg, black 0%, black 78%, transparent 100%);
}

.dashboard-hud {
    position: relative;
    z-index: 2;
    padding: 0 clamp(2px, 0.5vw, 8px);
}

.dashboard-hud > div {
    min-height: 88px;
    border-radius: 6px;
    animation: hud-float 4.2s ease-in-out infinite;
}

.dashboard-hud > div:nth-child(2) { animation-delay: 0.25s; }
.dashboard-hud > div:nth-child(3) { animation-delay: 0.5s; }
.dashboard-hud > div:nth-child(4) { animation-delay: 0.75s; }

.dashboard-mode-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(22px, 3.2vw, 58px);
    align-items: stretch;
    padding: clamp(8px, 1vw, 16px) clamp(4px, 0.7vw, 12px);
}

.dashboard-mode-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: clamp(300px, 39vh, 460px);
    padding: clamp(28px, 3vw, 46px);
    overflow: hidden;
    color: #f8fbff;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(150deg, rgba(21, 33, 70, 0.92), rgba(4, 7, 18, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 40px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 28px 70px rgba(0, 0, 0, 0.42),
        0 0 42px rgba(55, 244, 255, 0.08);
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%, 0 12%);
    transform-style: preserve-3d;
    animation: mode-hover-float 4.8s ease-in-out infinite;
    transition: transform 0.25s var(--ease-spring), border-color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.dashboard-mode-card:nth-child(2) {
    clip-path: polygon(0 0, 92% 0, 100% 14%, 92% 100%, 8% 100%, 0 86%);
    animation-delay: 0.28s;
}

.dashboard-mode-card:nth-child(3) {
    clip-path: polygon(0 0, 92% 0, 100% 12%, 100% 100%, 8% 100%, 0 0);
    animation-delay: 0.56s;
}

.dashboard-mode-card::before,
.dashboard-mode-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.dashboard-mode-card::before {
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.2), transparent 18%),
        linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.18) 48%, transparent 62%);
    transform: translateX(-105%);
    transition: transform 0.7s var(--ease-out);
}

.dashboard-mode-card::after {
    inset: auto 18px 18px 18px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--game-cyan), var(--game-gold), transparent);
    box-shadow: 0 0 22px rgba(55, 244, 255, 0.32);
}

.dashboard-mode-card:hover {
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-14px) scale(1.025);
    border-color: rgba(255, 209, 102, 0.58);
    filter: brightness(1.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 34px 90px rgba(0, 0, 0, 0.52),
        0 0 58px rgba(55, 244, 255, 0.22),
        0 0 34px rgba(255, 209, 102, 0.14);
}

.dashboard-mode-card:hover::before {
    transform: translateX(105%);
}

.dashboard-mode-card:active {
    transform: translateY(-4px) scale(0.99);
}

.dashboard-mode-card .mode-index {
    position: absolute;
    right: clamp(20px, 2vw, 34px);
    top: clamp(18px, 2vw, 28px);
    font-size: clamp(34px, 5vw, 70px);
    font-weight: 950;
    line-height: 1;
    color: rgba(255, 255, 255, 0.08);
}

.dashboard-mode-card .card-icon {
    width: clamp(64px, 7vw, 96px);
    height: clamp(64px, 7vw, 96px);
    margin: 0 0 clamp(18px, 2vw, 28px);
    border-radius: 10px;
    font-size: clamp(34px, 4vw, 56px);
    transform: rotate(-4deg);
}

.dashboard-mode-card h2 {
    margin: 0;
    font-size: clamp(36px, 4.2vw, 72px);
    line-height: 1;
    font-weight: 950;
    color: #ffffff;
    text-shadow: 0 0 32px rgba(55, 244, 255, 0.28);
}

.dashboard-mode-card p {
    align-self: center;
    max-width: 16em;
    margin: clamp(18px, 2vw, 28px) 0;
    color: #cbd8f6;
    font-size: clamp(18px, 1.45vw, 25px);
    font-weight: 750;
    line-height: 1.55;
}

.dashboard-mode-card .mode-enter {
    justify-self: start;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-weight: 950;
    letter-spacing: 0.12em;
    box-shadow: 0 0 28px rgba(255, 209, 102, 0.22);
}

.mode-card-1 {
    background:
        linear-gradient(150deg, rgba(0, 88, 215, 0.34), rgba(5, 8, 22, 0.95)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 40px);
}

.mode-card-2 {
    background:
        linear-gradient(150deg, rgba(10, 171, 123, 0.3), rgba(5, 8, 22, 0.95)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 40px);
}

.mode-card-3 {
    background:
        linear-gradient(150deg, rgba(255, 174, 51, 0.3), rgba(5, 8, 22, 0.95)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 40px);
}

.dashboard-stat-bar {
    position: relative;
    z-index: 2;
    gap: clamp(10px, 1.2vw, 18px);
    padding: 0 clamp(2px, 0.5vw, 8px);
}

.dashboard-stat-bar .stat-cell {
    overflow: hidden;
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(2, 6, 16, 0.68)),
        linear-gradient(90deg, rgba(55, 244, 255, 0.08), rgba(255, 209, 102, 0.06));
    animation: stat-breathe 3.8s ease-in-out infinite;
}

.dashboard-stat-bar .stat-cell:nth-child(2n) { animation-delay: 0.3s; }
.dashboard-stat-bar .stat-cell:nth-child(3n) { animation-delay: 0.6s; }

.dashboard-stat-bar .stat-cell::after {
    content: "";
    position: absolute;
    inset: auto 10px 8px 10px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.86), transparent);
    opacity: 0.72;
}

.dashboard-progress {
    position: relative;
    z-index: 2;
    width: calc(100% - clamp(4px, 1vw, 14px));
    margin: 0 clamp(2px, 0.5vw, 7px);
    height: 14px;
    border: 1px solid rgba(55, 244, 255, 0.18);
    background: rgba(0, 0, 0, 0.38);
    box-shadow: 0 0 28px rgba(55, 244, 255, 0.08);
}

.dashboard-bottom-fx {
    position: absolute;
    left: -28px;
    right: -28px;
    bottom: 0;
    height: clamp(120px, 17vh, 210px);
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(255, 118, 35, 0.24), transparent 58%),
        linear-gradient(180deg, transparent 0%, rgba(255, 84, 32, 0.08) 40%, rgba(255, 132, 31, 0.22) 100%);
    mask-image: linear-gradient(180deg, transparent 0%, black 36%, black 100%);
}

.dashboard-bottom-fx::before,
.dashboard-bottom-fx::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
}

.dashboard-bottom-fx::before {
    height: 86px;
    background:
        radial-gradient(ellipse at 6% 100%, rgba(255, 210, 88, 0.9) 0 16%, transparent 17%),
        radial-gradient(ellipse at 18% 100%, rgba(255, 86, 28, 0.9) 0 22%, transparent 23%),
        radial-gradient(ellipse at 32% 100%, rgba(255, 190, 72, 0.86) 0 18%, transparent 19%),
        radial-gradient(ellipse at 48% 100%, rgba(255, 86, 28, 0.92) 0 24%, transparent 25%),
        radial-gradient(ellipse at 66% 100%, rgba(255, 210, 88, 0.86) 0 17%, transparent 18%),
        radial-gradient(ellipse at 82% 100%, rgba(255, 86, 28, 0.9) 0 22%, transparent 23%),
        radial-gradient(ellipse at 96% 100%, rgba(255, 190, 72, 0.86) 0 18%, transparent 19%);
    filter: blur(1px) saturate(1.3);
    animation: flame-rise 1.8s ease-in-out infinite alternate;
}

.dashboard-bottom-fx::after {
    height: 32px;
    background: linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.55), rgba(255, 81, 36, 0.62), rgba(55, 244, 255, 0.26), transparent);
    filter: blur(8px);
    animation: flame-glow 2.4s ease-in-out infinite;
}

.dashboard-bottom-fx .bubble {
    position: absolute;
    bottom: -24px;
    width: var(--size, 24px);
    height: var(--size, 24px);
    border-radius: 50%;
    border: 1px solid rgba(255, 225, 132, 0.34);
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72), rgba(255, 209, 102, 0.16) 32%, rgba(55, 244, 255, 0.08) 68%, transparent);
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.18);
    animation: bubble-rise var(--dur, 6s) ease-in infinite;
}

.b1 { left: 10%; --size: 26px; --dur: 5.4s; animation-delay: 0.1s; }
.b2 { left: 28%; --size: 42px; --dur: 7.2s; animation-delay: 1.4s; }
.b3 { left: 52%; --size: 22px; --dur: 5.8s; animation-delay: 0.8s; }
.b4 { left: 72%; --size: 48px; --dur: 8s; animation-delay: 2.2s; }
.b5 { left: 90%; --size: 30px; --dur: 6.5s; animation-delay: 1s; }

@keyframes hud-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes mode-hover-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@keyframes stat-breathe {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.16); }
}

@keyframes flame-rise {
    from { transform: translateY(8px) scaleX(1.02); opacity: 0.74; }
    to { transform: translateY(-10px) scaleX(0.98); opacity: 1; }
}

@keyframes flame-glow {
    0%, 100% { opacity: 0.38; transform: translateX(-3%); }
    50% { opacity: 0.78; transform: translateX(3%); }
}

@keyframes bubble-rise {
    0% { transform: translateY(0) translateX(0) scale(0.7); opacity: 0; }
    12% { opacity: 0.72; }
    80% { opacity: 0.48; }
    100% { transform: translateY(-190px) translateX(28px) scale(1.25); opacity: 0; }
}

@media (max-width: 980px) {
    .dashboard-mode-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-mode-card {
        min-height: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-hud > div,
    .dashboard-mode-card,
    .dashboard-stat-bar .stat-cell,
    .dashboard-bottom-fx::before,
    .dashboard-bottom-fx::after,
    .dashboard-bottom-fx .bubble {
        animation: none !important;
    }
}

.stage::-webkit-scrollbar { width: 8px; }
.stage::-webkit-scrollbar-track { background: transparent; }
.stage::-webkit-scrollbar-thumb { background: rgba(100, 140, 255, 0.15); border-radius: 4px; }
.stage::-webkit-scrollbar-thumb:hover { background: rgba(100, 140, 255, 0.28); }

/* —— 页眉：标题 + 说明弹窗 —— */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.page-head .sub {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--muted);
    max-width: 52ch;
}

.btn-help {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    color: #cbd5e1;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-help:hover {
    border-color: rgba(0, 245, 212, 0.35);
    color: var(--accent);
}

.ui-dialog {
    max-width: min(520px, 92vw);
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: #0f1220;
    color: var(--text);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.ui-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.ui-dialog-inner {
    padding: 22px 24px 20px;
}

.ui-dialog h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.ui-dialog p {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.65;
}

.ui-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
}

.btn-sm {
    padding: 8px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}

.inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 11px;
    font-weight: 650;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35));
    color: #e2e8f0;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease, border-color 0.2s ease;
}

.inline-btn:hover {
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.login-arena {
    align-items: stretch;
    position: relative;
    min-height: min(680px, calc(100vh - 150px));
    padding: clamp(24px, 4vw, 58px);
    overflow: hidden;
    border: 1px solid rgba(55, 244, 255, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(5, 8, 18, 0.72), rgba(5, 8, 18, 0.38)),
        radial-gradient(circle at 18% 28%, rgba(55, 244, 255, 0.24), transparent 28%),
        radial-gradient(circle at 78% 22%, rgba(255, 209, 102, 0.18), transparent 26%),
        radial-gradient(circle at 54% 78%, rgba(168, 85, 247, 0.2), transparent 30%),
        linear-gradient(145deg, #091225 0%, #101634 48%, #080a15 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 70px rgba(0, 0, 0, 0.36);
}

.login-arena::before,
.login-arena::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.login-arena::before {
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(55, 244, 255, 0.08) 0 1px, transparent 1px 82px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 42px);
    mask-image: radial-gradient(ellipse 78% 62% at 50% 45%, black, transparent 76%);
    animation: game-scan 8s linear infinite;
}

.login-arena::after {
    width: min(44vw, 560px);
    height: min(44vw, 560px);
    right: -8%;
    top: -18%;
    border-radius: 50%;
    border: 1px solid rgba(55, 244, 255, 0.28);
    background:
        radial-gradient(circle, rgba(55, 244, 255, 0.12), transparent 42%),
        conic-gradient(from 180deg, transparent, rgba(55, 244, 255, 0.22), transparent, rgba(255, 209, 102, 0.18), transparent);
    filter: blur(0.2px);
    animation: cover-spin 24s linear infinite;
}

.login-student-card,
.login-admin-card,
.login-info-panel {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    background:
        linear-gradient(155deg, rgba(18, 28, 62, 0.86), rgba(5, 7, 17, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
}

.login-admin-card {
    border-color: rgba(168, 85, 247, 0.32);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 0 34px rgba(168, 85, 247, 0.08);
}

.form-alert {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 71, 111, 0.38);
    border-radius: 8px;
    background: rgba(255, 71, 111, 0.09);
    color: #ffd9e1;
}

.form-alert p {
    margin: 0;
    font-size: 14px;
    color: inherit;
}

.login-info-panel .battle-holo {
    min-height: 240px;
}

/* —— 首页大封面 —— */
.cover-hero {
    position: relative;
    min-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px 24px 64px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 245, 212, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 50%, rgba(168, 85, 247, 0.12), transparent 50%),
        linear-gradient(165deg, #070a14 0%, #0c1024 40%, #050810 100%);
}

.cover-hero::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 120deg, rgba(0, 245, 212, 0.06), transparent, rgba(168, 85, 247, 0.08), transparent, rgba(244, 114, 182, 0.05), transparent);
    animation: cover-spin 28s linear infinite;
    pointer-events: none;
}

@keyframes cover-spin {
    to { transform: rotate(360deg); }
}

.cover-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 3px);
    pointer-events: none;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, black, transparent);
}

.cover-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.cover-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 16px;
}

.cover-title {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #f8fafc;
}

.cover-line {
    width: 120px;
    height: 4px;
    margin: 0 auto 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 24px rgba(0, 245, 212, 0.35);
}

.cover-desc {
    margin: 0 0 32px;
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.7;
}

.cover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.cover-actions .primary-btn {
    min-width: 160px;
    padding: 16px 28px;
    font-size: 16px;
}

.cover-actions .inline-btn {
    min-width: 140px;
    padding: 14px 22px;
    font-size: 15px;
}

/* —— 数据表与分层面板 —— */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 18px 20px 20px;
}

.panel-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.data-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    max-height: min(62vh, 640px);
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 12, 24, 0.95);
    font-weight: 700;
    color: #94a3b8;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-table tbody tr:hover td {
    background: rgba(0, 245, 212, 0.04);
}

.data-table .num {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--warn);
}

.grade-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.level-grid .card-link {
    position: relative;
    overflow: hidden;
}

.level-grid .card-link::before {
    content: attr(data-level-emoji);
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 2rem;
    opacity: 0.12;
    pointer-events: none;
}

@media (max-width: 1400px) {
    .grade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .nav-top {
        padding: 10px 12px 12px;
    }

    .nav-bar-frame {
        padding: 6px 8px 6px 10px;
        gap: 8px;
        min-height: 54px;
    }

    .nav-bar-frame .nav-btn {
        padding: 9px 12px;
        font-size: 14px;
    }

    .nav-user-badge {
        max-width: 120px;
    }

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

/* ============================================================
   GAME UI OVERDRIVE — HUD 级界面增强
   ============================================================ */
:root {
    --game-cyan: #37f4ff;
    --game-mint: #37ffb1;
    --game-gold: #ffd166;
    --game-red: #ff476f;
    --game-blue: #5b8cff;
    --game-ink: #070915;
    --game-panel: rgba(9, 14, 31, 0.82);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(110deg, transparent 0 12%, rgba(55, 244, 255, 0.08) 12.2%, transparent 12.8% 48%, rgba(255, 209, 102, 0.06) 48.2%, transparent 49%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 96px);
    opacity: 0.38;
    mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 78%, transparent 100%);
}

body::after {
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px);
    mix-blend-mode: screen;
    opacity: 0.15;
    animation: game-scan 7s linear infinite;
}

@keyframes game-scan {
    from { transform: translateY(-24px); }
    to { transform: translateY(24px); }
}

.stage-inner,
.landing-shell {
    position: relative;
}

.game-page-head,
.hud-strip,
.card,
.panel,
.landing-tile,
.ui-dialog,
.nav-bar-frame {
    backdrop-filter: blur(16px) saturate(1.25);
}

.game-page-head {
    min-height: 96px;
    padding: 18px 20px;
    border: 1px solid rgba(55, 244, 255, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(55, 244, 255, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.game-page-head h1 {
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(55, 244, 255, 0.42);
}

.hud-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hud-strip > div {
    position: relative;
    overflow: hidden;
    min-height: 76px;
    padding: 14px 18px;
    border: 1px solid rgba(91, 140, 255, 0.28);
    border-radius: 8px;
    background: linear-gradient(150deg, rgba(21, 33, 70, 0.88), rgba(4, 6, 16, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.hud-strip > div::after {
    content: "";
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--game-cyan), var(--game-gold), transparent);
    animation: hud-runner 2.8s linear infinite;
}

.hud-strip span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #91a6c9;
}

.hud-strip strong {
    display: block;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1;
    color: #f8fbff;
    text-shadow: 0 0 18px rgba(55, 244, 255, 0.36);
}

@keyframes hud-runner {
    from { transform: translateX(-45%); }
    to { transform: translateX(45%); }
}

.game-cover {
    max-width: min(1880px, calc(100vw - 36px));
    gap: clamp(12px, 1.4vw, 20px);
    min-height: calc(100vh - 40px);
}

.game-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: clamp(16px, 2vw, 34px);
    width: 100%;
    min-height: clamp(320px, 47vh, 500px);
    padding: clamp(22px, 3vw, 42px) clamp(24px, 4vw, 68px);
    border: 1px solid rgba(55, 244, 255, 0.26);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(8, 14, 32, 0.78), rgba(7, 8, 18, 0.92)),
        linear-gradient(90deg, rgba(55, 244, 255, 0.08), transparent 50%, rgba(255, 71, 111, 0.07));
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.48),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.game-hero::before,
.game-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.game-hero::before {
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    clip-path: polygon(0 0, 18% 0, 18% 2px, 82% 2px, 82% 0, 100% 0, 100% 26%, calc(100% - 2px) 26%, calc(100% - 2px) 74%, 100% 74%, 100% 100%, 82% 100%, 82% calc(100% - 2px), 18% calc(100% - 2px), 18% 100%, 0 100%, 0 74%, 2px 74%, 2px 26%, 0 26%);
}

.game-hero::after {
    left: 0;
    right: 0;
    top: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(55, 244, 255, 0.72), transparent);
    animation: hero-sweep 4.6s ease-in-out infinite;
}

@keyframes hero-sweep {
    0%, 100% { transform: translateY(0); opacity: 0.18; }
    50% { transform: translateY(220px); opacity: 0.8; }
}

.game-hero-copy {
    position: relative;
    z-index: 1;
    text-align: left;
    min-width: 0;
}

.game-cover .game-kicker {
    opacity: 0;
    animation: cover-rise 0.55s var(--ease-out) 0.08s forwards;
}

.game-kicker {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.28em;
    color: var(--game-gold);
}

.game-hero .landing-tagline {
    white-space: nowrap;
    text-align: left;
    font-size: clamp(46px, 5.8vw, 104px);
    letter-spacing: 0.01em;
    line-height: 0.98;
    background: linear-gradient(100deg, #fff 0%, #bafcff 28%, var(--game-cyan) 46%, var(--game-gold) 76%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 32px rgba(55, 244, 255, 0.36));
    opacity: 0;
    animation: title-boot-in 0.9s cubic-bezier(0.18, 0.84, 0.28, 1) 0.18s forwards;
}

.game-subtitle {
    max-width: 620px;
    margin: 14px 0 0;
    font-size: clamp(17px, 1.45vw, 23px);
    font-weight: 700;
    color: #c6d4f4;
    opacity: 0;
    animation: cover-rise 0.62s var(--ease-out) 0.58s forwards;
}

.game-status-row {
    justify-content: flex-start;
    margin-top: clamp(24px, 2.6vw, 42px);
    gap: clamp(12px, 1.2vw, 20px);
}

.game-status-row .landing-chip {
    padding: clamp(12px, 1.15vw, 18px) clamp(18px, 1.6vw, 28px);
    border-radius: 8px;
    font-size: clamp(16px, 1.25vw, 23px);
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(18px) scale(0.92);
    animation: chip-pop-in 0.52s var(--ease-spring) forwards;
}

.game-status-row .landing-chip:nth-child(1) { animation-delay: 0.78s; }
.game-status-row .landing-chip:nth-child(2) { animation-delay: 0.9s; }
.game-status-row .landing-chip:nth-child(3) { animation-delay: 1.02s; }
.game-status-row .landing-chip:nth-child(4) { animation-delay: 1.14s; }

.game-arena-preview {
    position: relative;
    z-index: 1;
    aspect-ratio: 1;
    min-height: clamp(250px, 34vh, 390px);
    display: grid;
    place-items: center;
    perspective: 900px;
    opacity: 0;
    animation: arena-boot-in 0.9s cubic-bezier(0.18, 0.84, 0.28, 1) 0.35s forwards;
}

.arena-ring,
.arena-core,
.arena-orbit,
.arena-console {
    position: absolute;
}

.arena-ring {
    width: 82%;
    height: 82%;
    border: 2px solid rgba(55, 244, 255, 0.36);
    border-radius: 50%;
    transform: rotateX(68deg);
    box-shadow: 0 0 36px rgba(55, 244, 255, 0.22), inset 0 0 24px rgba(55, 244, 255, 0.14);
    animation: ring-boot 2.8s ease-in-out infinite;
}

.arena-core {
    width: 38%;
    height: 38%;
    border-radius: 50%;
    border: 1px solid rgba(255, 209, 102, 0.55);
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 14px),
        linear-gradient(180deg, rgba(255, 209, 102, 0.18), rgba(55, 244, 255, 0.1));
    transform: rotateX(62deg);
    animation: core-pulse 2.2s ease-in-out infinite;
}

.arena-orbit {
    width: 72%;
    height: 18%;
    border: 1px solid rgba(91, 140, 255, 0.52);
    border-radius: 50%;
}

.orbit-a { animation: orbit-tilt-a 6s linear infinite; }
.orbit-b { width: 58%; height: 78%; animation: orbit-tilt-b 7.5s linear infinite reverse; }

.arena-console {
    bottom: 8%;
    right: 7%;
    min-width: 146px;
    padding: 12px 14px 14px;
    border: 1px solid rgba(55, 255, 177, 0.34);
    border-radius: 8px;
    background: rgba(2, 8, 20, 0.76);
    box-shadow: 0 0 24px rgba(55, 255, 177, 0.18);
    opacity: 0;
    animation: console-snap 0.55s var(--ease-spring) 1.02s forwards;
}

.arena-console span {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: var(--game-mint);
}

.arena-console strong {
    display: block;
    margin-top: 4px;
    font-size: 34px;
    line-height: 1;
}

.boot-bar {
    display: block;
    height: 6px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.boot-bar i {
    display: block;
    width: 1%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--game-red), var(--game-gold), var(--game-cyan));
    box-shadow: 0 0 16px rgba(55, 244, 255, 0.5);
    animation: boot-load 1.8s cubic-bezier(0.18, 0.84, 0.28, 1) forwards;
}

@keyframes boot-load {
    to { width: 100%; }
}

@keyframes core-pulse {
    0%, 100% { transform: rotateX(62deg) scale(0.96); filter: brightness(1); }
    50% { transform: rotateX(62deg) scale(1.04); filter: brightness(1.35); }
}

@keyframes orbit-tilt-a {
    to { transform: rotateZ(360deg) rotateX(64deg); }
}

@keyframes orbit-tilt-b {
    to { transform: rotateZ(360deg) rotateY(58deg); }
}

@keyframes cover-rise {
    from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes title-boot-in {
    0% { opacity: 0; transform: translateX(-34px) scale(0.98); filter: blur(8px) drop-shadow(0 0 0 rgba(55, 244, 255, 0)); }
    58% { opacity: 1; transform: translateX(4px) scale(1.012); filter: blur(0) drop-shadow(0 0 46px rgba(55, 244, 255, 0.62)); }
    100% { opacity: 1; transform: none; filter: drop-shadow(0 0 32px rgba(55, 244, 255, 0.36)); }
}

@keyframes chip-pop-in {
    0% { opacity: 0; transform: translateY(18px) scale(0.92); filter: blur(4px); }
    70% { opacity: 1; transform: translateY(-4px) scale(1.04); filter: blur(0); }
    100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes arena-boot-in {
    from { opacity: 0; transform: translateX(38px) scale(0.88) rotate(-4deg); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes ring-boot {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(55, 244, 255, 0.32)); }
    50% { filter: drop-shadow(0 0 26px rgba(255, 209, 102, 0.35)); }
}

@keyframes console-snap {
    from { opacity: 0; transform: translateY(18px) scale(0.86); }
    to { opacity: 1; transform: none; }
}

.game-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(36px, 3.6vw, 72px);
}

.game-mode-grid .landing-tile {
    min-height: clamp(144px, 18vh, 190px);
    padding: clamp(18px, 1.7vw, 26px) clamp(20px, 1.9vw, 30px);
    gap: 12px;
    display: grid;
    grid-template-rows: auto minmax(48px, 1fr) auto;
    align-content: stretch;
    opacity: 0;
    animation: mode-card-in 0.62s var(--ease-spring) forwards;
}

.game-mode-grid .landing-tile:nth-child(1) { animation-delay: 1.18s; }
.game-mode-grid .landing-tile:nth-child(2) { animation-delay: 1.32s; }
.game-mode-grid .landing-tile:nth-child(3) { animation-delay: 1.46s; }

.game-mode-grid .landing-tile-title {
    font-size: clamp(20px, 1.65vw, 29px);
}

.game-mode-grid .landing-tile-desc {
    font-size: clamp(14px, 1.05vw, 18px);
    line-height: 1.52;
    min-height: 3.05em;
    display: flex;
    align-items: center;
}

.landing-tile,
.game-mode-card,
.game-level-card {
    border-radius: 8px;
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.landing-tile::before,
.game-mode-card::after,
.game-level-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 28%),
        repeating-linear-gradient(0deg, transparent 0 11px, rgba(255, 255, 255, 0.025) 11px 12px);
    opacity: 0.38;
}

.mode-badge {
    display: inline-grid;
    place-items: center;
    min-width: 58px;
    height: 42px;
    border-radius: 7px;
    border: 1px solid rgba(255, 209, 102, 0.48);
    background: rgba(255, 209, 102, 0.12);
    color: var(--game-gold);
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.18);
}

.mode-meter {
    display: block;
    width: calc(100% - 14px);
    margin: 2px auto 0;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.mode-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--game-red), var(--game-gold), var(--game-mint), var(--game-cyan));
    background-size: 220% 100%;
    animation: meter-flow 1.9s linear infinite;
}

@keyframes meter-flow {
    to { background-position: 220% 0; }
}

.game-start-panel {
    position: relative;
    padding: 6px 0 4px;
    gap: 10px;
    opacity: 0;
    animation: cover-rise 0.55s var(--ease-out) 1.64s forwards;
}

@keyframes mode-card-in {
    0% { opacity: 0; transform: translateY(34px) scale(0.94); filter: blur(6px); }
    72% { opacity: 1; transform: translateY(-5px) scale(1.015); filter: blur(0); }
    100% { opacity: 1; transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); filter: blur(0); }
}

.game-start-panel .landing-cta-btn.primary-btn {
    min-width: 240px;
    padding: 16px 38px;
    font-size: clamp(18px, 1.55vw, 24px);
}

.game-start-panel .landing-cta-note {
    font-size: clamp(14px, 1vw, 17px);
}

.game-start-panel .landing-cta-icons {
    font-size: 0.62em;
    letter-spacing: 0.18em;
}

.game-card-grid .card,
.game-stat-bar .stat-cell,
.game-loadout-card,
.battle-preview-card,
.question-console,
.game-level-card {
    background:
        linear-gradient(155deg, rgba(18, 28, 62, 0.86), rgba(5, 7, 17, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
}

.game-mode-card:hover,
.game-level-card:hover,
.battle-preview-card:hover,
.game-loadout-card:hover {
    border-color: rgba(255, 209, 102, 0.42);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42), 0 0 42px rgba(55, 244, 255, 0.18);
}

.game-versus-layout {
    align-items: stretch;
}

.battle-preview-card {
    min-height: 430px;
}

.battle-holo {
    position: relative;
    min-height: 220px;
    margin: -6px 0 18px;
    border: 1px solid rgba(55, 244, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(55, 244, 255, 0.08), transparent 58%),
        repeating-linear-gradient(90deg, rgba(55, 244, 255, 0.07) 0 1px, transparent 1px 38px);
}

.battle-holo-line {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--game-cyan), var(--game-gold), var(--game-red));
    box-shadow: 0 0 28px rgba(55, 244, 255, 0.3);
    animation: rope-glow 1.8s ease-in-out infinite;
}

.battle-holo-player,
.battle-holo-core {
    position: absolute;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.battle-holo-player {
    top: 34%;
    width: 74px;
    height: 74px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(2, 8, 20, 0.68);
}

.battle-holo-player.left {
    left: 12%;
    color: var(--game-cyan);
}

.battle-holo-player.right {
    right: 12%;
    color: var(--game-red);
}

.battle-holo-core {
    left: 50%;
    top: 50%;
    width: 76px;
    height: 76px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    box-shadow: 0 0 36px rgba(255, 209, 102, 0.38);
}

.map-route {
    height: 18px;
    margin: -6px 0;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(55, 244, 255, 0.18);
    background: rgba(0, 0, 0, 0.22);
}

.map-route span {
    display: block;
    width: 140%;
    height: 100%;
    background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(55, 244, 255, 0.7) 18px 38px, transparent 38px 56px);
    animation: route-run 4s linear infinite;
}

.challenge-chapter-board {
    display: grid;
    gap: 10px;
    padding: clamp(12px, 1.25vw, 18px);
    border: 1px solid rgba(55, 244, 255, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(55, 244, 255, 0.11), transparent 48%, rgba(255, 209, 102, 0.09)),
        linear-gradient(155deg, rgba(18, 28, 62, 0.86), rgba(5, 7, 17, 0.92));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.chapter-board-head h2 {
    margin: 0;
    font-size: clamp(18px, 1.45vw, 25px);
    line-height: 1;
}

.chapter-title-line {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chapter-title-line .kb-rule-tag {
    padding: 8px 16px;
    font-size: clamp(15px, 1.15vw, 22px);
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.24);
}

.chapter-board-head p {
    margin: 0;
    color: #aebddd;
    font-weight: 700;
}

.chapter-card-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 16px);
    align-items: end;
    perspective: 1100px;
}

.chapter-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 14px;
    min-height: clamp(330px, 39vh, 460px);
    padding: clamp(24px, 2.2vw, 36px) 20px;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(55, 244, 255, 0.12), rgba(5, 8, 22, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
    clip-path: polygon(12% 0, 100% 8%, 90% 100%, 0 92%, 0 16%);
    transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
    transform: rotateX(8deg) rotateZ(-1deg);
}

.chapter-card:hover {
    transform: rotateX(8deg) rotateZ(-1deg) translateY(-12px) scale(1.02);
    border-color: rgba(255, 209, 102, 0.48);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34), 0 0 30px rgba(55, 244, 255, 0.12);
}

.chapter-card::before {
    content: "";
    position: absolute;
    inset: 10px 12px auto 12px;
    height: 42%;
    z-index: -1;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 34%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px);
    opacity: 0.34;
    clip-path: inherit;
}

.chapter-card::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 10%;
    bottom: -8px;
    height: 26px;
    z-index: -2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
    filter: blur(4px);
    transform: skewX(-10deg);
}

.chapter-card:nth-child(1) { transform: rotateX(6deg) rotateZ(-0.8deg) translateY(0); }
.chapter-card:nth-child(2) { transform: rotateX(6deg) rotateZ(0.8deg) translateY(-10px); }
.chapter-card:nth-child(3) { transform: rotateX(6deg) rotateZ(-0.8deg) translateY(-20px); }
.chapter-card:nth-child(4) { transform: rotateX(6deg) rotateZ(0.8deg) translateY(-30px); }
.chapter-card:nth-child(5) { transform: rotateX(6deg) rotateZ(-0.8deg) translateY(-40px); }
.chapter-card:nth-child(6) { transform: rotateX(6deg) rotateZ(0.8deg) translateY(-50px); }

.chapter-card:nth-child(1):hover { transform: rotateX(6deg) rotateZ(-0.8deg) translateY(-12px) scale(1.012); }
.chapter-card:nth-child(2):hover { transform: rotateX(6deg) rotateZ(0.8deg) translateY(-22px) scale(1.012); }
.chapter-card:nth-child(3):hover { transform: rotateX(6deg) rotateZ(-0.8deg) translateY(-32px) scale(1.012); }
.chapter-card:nth-child(4):hover { transform: rotateX(6deg) rotateZ(0.8deg) translateY(-42px) scale(1.012); }
.chapter-card:nth-child(5):hover { transform: rotateX(6deg) rotateZ(-0.8deg) translateY(-52px) scale(1.012); }
.chapter-card:nth-child(6):hover { transform: rotateX(6deg) rotateZ(0.8deg) translateY(-62px) scale(1.012); }

.map-plate.is-locked {
    filter: grayscale(0.3) brightness(0.48) saturate(0.72);
    pointer-events: none;
}

.map-plate.is-locked .chapter-range,
.map-plate.is-locked h3,
.map-plate.is-locked .chapter-meta,
.map-plate.is-locked .chapter-module-list,
.map-plate.is-locked .chapter-unlock-note {
    opacity: 0.42;
}

.map-lock {
    position: absolute;
    left: 50%;
    top: 48%;
    width: clamp(48px, 5vw, 76px);
    height: clamp(42px, 4.4vw, 66px);
    transform: translate(-50%, -50%);
    z-index: 3;
    border-radius: 10px 10px 12px 12px;
    background:
        linear-gradient(180deg, #fff4c7, #ffd166 48%, #aa6b13);
    border: 2px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 0 0 4px rgba(0, 0, 0, 0.24),
        0 0 32px rgba(255, 209, 102, 0.35);
}

.map-lock::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 78%;
    width: 62%;
    height: 70%;
    transform: translateX(-50%);
    border: 8px solid #ffd166;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.24);
}

.map-lock::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 42%;
    width: 10px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(5, 8, 22, 0.72);
}

.chapter-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.chapter-card-head h3 {
    text-align: right;
}

.chapter-module-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.mini-module {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    min-height: 210px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.28)),
        rgba(0, 0, 0, 0.2);
}

.mini-module strong {
    color: #fff;
    font-size: clamp(15px, 1vw, 18px);
    line-height: 1.25;
}

.mini-module small {
    color: #aab9d8;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}

.mini-levels {
    display: grid;
    gap: 6px;
}

.mini-levels a {
    display: grid;
    place-items: center;
    min-height: 34px;
    padding: 6px 8px;
    color: #061018;
    text-decoration: none;
    font-size: 12px;
    font-weight: 950;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    box-shadow: 0 0 16px rgba(55, 244, 255, 0.16);
    transition: transform 0.16s ease, filter 0.16s ease;
}

.mini-levels a:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.chapter-unlock-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    color: #ffeab0;
    background: rgba(255, 209, 102, 0.1);
    border: 1px solid rgba(255, 209, 102, 0.2);
    font-size: 13px;
    font-weight: 850;
}

.chapter-enter-btn {
    justify-self: start;
    position: relative;
    z-index: 4;
}

.chapter-range {
    width: fit-content;
    padding: 8px 13px;
    border-radius: 999px;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-weight: 950;
    font-size: clamp(14px, 1vw, 18px);
}

.chapter-card h3 {
    margin: 0;
    font-size: clamp(23px, 1.8vw, 34px);
    line-height: 1.15;
}

.chapter-meta {
    display: grid;
    gap: 6px;
}

.chapter-meta span {
    padding: 9px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.24);
    color: #cbd8f6;
    font-size: clamp(13px, 0.92vw, 16px);
    font-weight: 800;
}

.challenge-mountain-fx {
    position: relative;
    min-height: clamp(210px, 25vh, 310px);
    margin-top: clamp(-44px, -3vw, -24px);
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(55, 244, 255, 0.12);
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 230, 146, 0.34), rgba(255, 177, 84, 0.16) 16%, transparent 34%),
        linear-gradient(115deg, transparent 0 38%, rgba(255, 230, 146, 0.16) 45%, transparent 56%),
        linear-gradient(70deg, transparent 0 44%, rgba(55, 244, 255, 0.08) 52%, transparent 64%),
        linear-gradient(180deg, transparent 0%, rgba(5, 8, 22, 0.35) 42%, rgba(5, 8, 22, 0.84) 100%);
}

.challenge-mountain-fx::before,
.challenge-mountain-fx::after {
    content: "";
    position: absolute;
    left: -6%;
    right: -6%;
    bottom: 0;
    pointer-events: none;
}

.challenge-mountain-fx::before {
    height: 72%;
    background:
        linear-gradient(135deg, transparent 0 12%, rgba(32, 52, 95, 0.92) 12% 20%, transparent 20% 28%, rgba(18, 34, 72, 0.96) 28% 38%, transparent 38% 46%, rgba(38, 60, 112, 0.9) 46% 58%, transparent 58% 66%, rgba(18, 34, 72, 0.96) 66% 78%, transparent 78%),
        linear-gradient(180deg, rgba(55, 244, 255, 0.08), rgba(5, 8, 22, 0.95));
    clip-path: polygon(0 100%, 0 58%, 8% 48%, 15% 66%, 23% 30%, 31% 62%, 40% 38%, 48% 70%, 57% 28%, 66% 58%, 76% 36%, 86% 66%, 94% 46%, 100% 60%, 100% 100%);
    filter: drop-shadow(0 -8px 18px rgba(55, 244, 255, 0.12));
    transform: translateY(-22px);
    animation: mountain-drift 9s ease-in-out infinite;
}

.challenge-mountain-fx::after {
    height: 50%;
    background:
        linear-gradient(180deg, rgba(255, 209, 102, 0.08), rgba(5, 8, 22, 0.96));
    clip-path: polygon(0 100%, 0 72%, 10% 52%, 20% 76%, 30% 44%, 42% 76%, 52% 50%, 64% 76%, 74% 42%, 86% 74%, 96% 56%, 100% 68%, 100% 100%);
    opacity: 0.9;
    transform: translateY(-18px);
    animation: mountain-drift 7s ease-in-out infinite reverse;
}

.challenge-mountain-fx .mist::before {
    content: "";
    position: absolute;
    left: 34%;
    top: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 229, 150, 0.36), rgba(255, 209, 102, 0.1) 42%, transparent 70%);
    filter: blur(8px);
    animation: sun-pulse 4.8s ease-in-out infinite;
}

.challenge-mountain-fx .mist {
    position: absolute;
    left: -20%;
    right: -20%;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(55, 244, 255, 0.18), rgba(255, 255, 255, 0.14), transparent);
    filter: blur(9px);
    animation: mist-flow 8s linear infinite;
}

.mist-a {
    bottom: 74px;
}

.mist-b {
    bottom: 116px;
    opacity: 0.72;
    animation-delay: -3s;
}

@keyframes mountain-drift {
    0%, 100% { translate: 0 0; }
    50% { translate: 18px -6px; }
}

@keyframes mist-flow {
    from { transform: translateX(-10%); opacity: 0.18; }
    45% { opacity: 0.78; }
    to { transform: translateX(10%); opacity: 0.18; }
}

@keyframes sun-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.94); }
    50% { opacity: 0.82; transform: scale(1.06); }
}

/* ============================================================
   CHAPTER DETAIL — 篇章内自由选关
   ============================================================ */
.chapter-detail-page {
    display: grid;
    gap: clamp(12px, 1.4vw, 20px);
}

.chapter-detail-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: clamp(12px, 1.4vw, 22px) clamp(18px, 2vw, 32px);
    border: 1px solid rgba(55, 244, 255, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(55, 244, 255, 0.14), transparent 48%, rgba(255, 209, 102, 0.11)),
        linear-gradient(155deg, rgba(18, 28, 62, 0.88), rgba(5, 7, 17, 0.94));
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

.chapter-detail-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: conic-gradient(from 120deg, transparent, rgba(55, 244, 255, 0.2), transparent, rgba(255, 209, 102, 0.16), transparent);
    animation: cover-spin 24s linear infinite;
}

.chapter-detail-hero > * {
    position: relative;
    z-index: 1;
}

.chapter-detail-hero h1 {
    margin: 6px 0 4px;
    font-size: clamp(24px, 2.8vw, 42px);
    line-height: 1;
    font-weight: 950;
    color: #fff;
    text-shadow: 0 0 34px rgba(55, 244, 255, 0.28);
}

.chapter-detail-hero p {
    margin: 0;
    color: #bfd0f0;
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 800;
}

.chapter-detail-hero .kb-rule-tag {
    padding: 5px 10px;
    font-size: 11px;
}

.chapter-free-rule {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.chapter-free-rule > div {
    min-height: 94px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(55, 244, 255, 0.1), rgba(5, 8, 22, 0.9)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px);
}

.chapter-free-rule strong {
    display: block;
    font-size: clamp(28px, 3.2vw, 48px);
    line-height: 1;
    color: var(--game-gold);
}

.chapter-free-rule span {
    display: block;
    margin-top: 6px;
    color: #aebddd;
    font-weight: 800;
}

.chapter-module-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 24px);
}

.chapter-module-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 16px;
    min-height: clamp(360px, 44vh, 520px);
    padding: clamp(18px, 1.6vw, 26px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(28, 42, 92, 0.86), rgba(5, 8, 22, 0.94)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%, 0 12%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    transition: transform 0.22s var(--ease-spring), border-color 0.22s ease, box-shadow 0.22s ease;
}

.chapter-module-card:hover {
    transform: translateY(-9px);
    border-color: rgba(255, 209, 102, 0.48);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.4), 0 0 34px rgba(55, 244, 255, 0.14);
}

.module-card-head span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-weight: 950;
}

.module-card-head h2 {
    margin: 0 0 10px;
    font-size: clamp(22px, 1.8vw, 32px);
    line-height: 1.1;
}

.module-card-head p {
    margin: 0;
    color: #aebddd;
    font-weight: 750;
    line-height: 1.65;
}

.module-level-pair {
    display: grid;
    gap: 10px;
}

.module-level-card {
    display: grid;
    gap: 5px;
    min-height: 84px;
    padding: 13px 14px;
    color: #f8fbff;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(55, 244, 255, 0.18);
    background: rgba(0, 0, 0, 0.28);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.module-level-card:hover,
.module-level-card.is-selected {
    transform: translateY(-3px);
    border-color: rgba(255, 209, 102, 0.55);
    background: rgba(55, 244, 255, 0.08);
}

.module-level-card strong {
    color: #fff;
    font-size: clamp(22px, 1.45vw, 30px);
}

.module-level-card span {
    color: #aebddd;
    font-size: clamp(16px, 1vw, 20px);
    font-weight: 800;
}

.module-level-card em {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-style: normal;
    font-size: clamp(15px, 0.95vw, 18px);
    font-weight: 950;
}

/* ============================================================
   CHALLENGE PLAY — 关卡答题页
   ============================================================ */
.challenge-play-page {
    display: grid;
    gap: 18px;
}

.play-topbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid rgba(55, 244, 255, 0.22);
    background:
        linear-gradient(120deg, rgba(55, 244, 255, 0.11), transparent 52%, rgba(255, 209, 102, 0.1)),
        rgba(5, 8, 20, 0.82);
}

.play-topbar h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 3vw, 48px);
    line-height: 1;
}

.play-timer {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 209, 102, 0.28);
    background: rgba(0, 0, 0, 0.28);
}

.timer-ring {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(5, 8, 20, 0.96) 0 54%, transparent 56%),
        conic-gradient(var(--game-gold), var(--game-cyan), var(--game-red), var(--game-gold));
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.24);
    animation: timer-spin 3s linear infinite;
}

.play-timer strong {
    display: block;
    font-size: 28px;
    color: var(--game-gold);
    line-height: 1;
}

.play-timer small {
    color: #aebddd;
    font-weight: 800;
}

.play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}

.play-question-card {
    min-height: 560px;
    padding: clamp(22px, 2.4vw, 36px);
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.question-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #061018;
    background: linear-gradient(135deg, var(--game-gold), var(--game-cyan));
    font-size: 13px;
    font-weight: 900;
}

.play-question-card h2 {
    margin: 0 0 24px;
    font-size: clamp(24px, 2.2vw, 38px);
    line-height: 1.45;
}

.play-options {
    display: grid;
    gap: 12px;
}

.play-options .answer-btn {
    min-height: 66px;
    font-size: clamp(18px, 1.15vw, 22px);
    font-weight: 800;
}

.play-options.is-locked .answer-btn {
    cursor: not-allowed;
    opacity: 0.56;
}

.play-options .answer-btn.is-selected {
    opacity: 1;
    border-color: rgba(255, 209, 102, 0.6);
    background: rgba(255, 209, 102, 0.12);
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.16);
}

.answer-result {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.28);
}

.answer-result.is-correct {
    border-color: rgba(55, 255, 177, 0.45);
    box-shadow: 0 0 24px rgba(55, 255, 177, 0.12);
}

.answer-result.is-wrong {
    border-color: rgba(255, 71, 111, 0.45);
    box-shadow: 0 0 24px rgba(255, 71, 111, 0.12);
}

.answer-result strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.answer-result p {
    margin: 6px 0 0;
    color: #cbd8f6;
    font-weight: 750;
}

.answer-board {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(55, 244, 255, 0.24);
    background:
        linear-gradient(155deg, rgba(18, 28, 62, 0.9), rgba(5, 7, 17, 0.94)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
}

.answer-board-head h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.answer-board-head p {
    margin: 0;
    color: #aebddd;
    font-weight: 800;
}

.answer-board-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
}

.answer-dot {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    color: #dbeafe;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.32);
    font-weight: 950;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.answer-dot:hover,
.answer-dot.is-current {
    transform: translateY(-3px);
    border-color: rgba(255, 209, 102, 0.55);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.18);
}

.answer-dot.is-answered {
    background: rgba(55, 244, 255, 0.12);
}

.answer-dot.is-correct {
    background: rgba(55, 255, 177, 0.18);
    color: var(--game-mint);
}

.answer-dot.is-wrong {
    background: rgba(255, 71, 111, 0.18);
    color: var(--game-red);
}

.answer-board-legend {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    color: #9fb1d7;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.success-dialog[open] {
    display: grid;
    max-width: min(760px, 92vw);
    overflow: hidden;
}

.success-visual {
    position: relative;
    min-height: 240px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 235, 160, 0.52), transparent 26%),
        radial-gradient(circle at 28% 22%, rgba(55, 244, 255, 0.24), transparent 24%),
        radial-gradient(circle at 76% 32%, rgba(255, 71, 111, 0.22), transparent 22%),
        linear-gradient(135deg, rgba(21, 33, 70, 0.96), rgba(5, 8, 22, 0.98));
}

.success-visual::before,
.success-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.success-visual::before {
    width: 220px;
    height: 220px;
    border: 2px solid rgba(255, 209, 102, 0.42);
    box-shadow: 0 0 40px rgba(255, 209, 102, 0.22), inset 0 0 34px rgba(55, 244, 255, 0.16);
    animation: success-ring 3s linear infinite;
}

.success-visual::after {
    width: 320px;
    height: 320px;
    background: conic-gradient(from 0deg, transparent, rgba(55, 244, 255, 0.18), transparent, rgba(255, 209, 102, 0.2), transparent);
    animation: cover-spin 9s linear infinite;
}

.success-medal {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    color: #061018;
    background: linear-gradient(135deg, #fff4bd, #ffd166 48%, #37f4ff);
    font-size: 28px;
    font-weight: 950;
    letter-spacing: 0.08em;
    box-shadow: 0 0 46px rgba(255, 209, 102, 0.44);
    animation: medal-pop 1.2s var(--ease-spring) both;
}

@keyframes success-ring {
    to { transform: rotate(360deg); }
}

@keyframes medal-pop {
    from { transform: scale(0.62); opacity: 0; filter: blur(8px); }
    to { transform: scale(1); opacity: 1; filter: blur(0); }
}

@keyframes timer-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
    .play-layout,
    .play-topbar {
        grid-template-columns: 1fr;
    }

    .answer-board {
        position: relative;
        top: auto;
    }
}

@media (max-width: 1200px) {
    .chapter-module-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .chapter-free-rule,
    .chapter-module-board {
        grid-template-columns: 1fr;
    }

    .chapter-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@keyframes route-run {
    to { transform: translateX(-220px); }
}

.game-level-grid {
    position: relative;
}

.game-level-card {
    min-height: 190px;
}

.game-level-card.is-locked {
    opacity: 0.42;
    filter: grayscale(0.35);
}

.battle-room-layout .stage-canvas {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border-radius: 8px;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(55, 244, 255, 0.08), transparent 50%),
        linear-gradient(165deg, #071227 0%, #0d1732 48%, #101014 49%, #070915 100%);
}

.battle-room-layout .tug-war-stage {
    min-height: clamp(430px, 58vh, 640px);
    justify-content: flex-end;
    padding: clamp(18px, 2vw, 28px);
    /* 背景图由 async_room.html 内联 {% static 'img/2.png' %} 提供，避免 /static 路径不一致 404 */
    background-color: #0a1024;
}

.tug-war-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(21, 104, 255, 0.1), transparent 38%, transparent 62%, rgba(255, 72, 53, 0.1)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 5px);
    mix-blend-mode: screen;
}

.tug-war-stage > * {
    position: relative;
    z-index: 1;
}

.tug-war-stage .arena-floor,
.tug-war-stage .arena-gate {
    display: none;
}

.tug-hud {
    position: absolute;
    left: clamp(18px, 4vw, 64px);
    right: clamp(18px, 4vw, 64px);
    top: clamp(16px, 2vw, 28px);
    z-index: 3;
    padding: 12px 16px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(90deg, rgba(24, 106, 255, 0.3), rgba(5, 8, 18, 0.72) 43%, rgba(5, 8, 18, 0.72) 57%, rgba(255, 75, 52, 0.3)),
        rgba(5, 8, 18, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 18px 40px rgba(0, 0, 0, 0.38),
        0 0 34px rgba(55, 244, 255, 0.14);
    backdrop-filter: blur(10px);
}

.tug-hud-labels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    font-weight: 900;
}

.tug-hud-labels span {
    font-size: clamp(13px, 1.1vw, 17px);
    color: #eaf6ff;
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.24);
}

.tug-hud-labels span:last-child {
    text-align: right;
}

.tug-hud-labels strong {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: clamp(13px, 1vw, 16px);
    color: #061018;
    background: linear-gradient(135deg, #fff7d6, #ffd166, #37f4ff);
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.32);
}

.tug-power-bar {
    position: relative;
    height: clamp(34px, 4vw, 54px);
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(90deg, #1268ff 0 50%, #ff4734 50% 100%);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.45),
        inset 0 8px 18px rgba(255, 255, 255, 0.16),
        0 0 28px rgba(55, 244, 255, 0.16);
}

.tug-power-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 34px),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    animation: tug-bar-shine 2.2s linear infinite;
}

.tug-blue,
.tug-red {
    position: absolute;
    inset: 0;
    transition: clip-path 0.55s var(--ease-spring), filter 0.3s ease;
}

.tug-blue {
    background: linear-gradient(90deg, #0a4dff, #37f4ff, rgba(255, 255, 255, 0.78));
    clip-path: polygon(0 0, var(--rope-pos) 0, calc(var(--rope-pos) + 20px) 50%, var(--rope-pos) 100%, 0 100%);
    filter: drop-shadow(0 0 16px rgba(55, 244, 255, 0.52));
}

.tug-red {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.78), #ff9d3d, #ff352f);
    clip-path: polygon(calc(var(--rope-pos) - 20px) 50%, var(--rope-pos) 0, 100% 0, 100% 100%, var(--rope-pos) 100%);
    filter: drop-shadow(0 0 16px rgba(255, 75, 52, 0.48));
}

.tug-center-mark {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.7);
}

.tug-puller {
    position: absolute;
    top: 50%;
    width: clamp(24px, 3vw, 40px);
    height: clamp(42px, 5vw, 66px);
    transform: translate(-50%, -50%);
    border-radius: 6px;
    background: linear-gradient(180deg, #fff7d6, #ff7a2f 45%, #d92b24);
    border: 2px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.32),
        0 0 28px rgba(255, 209, 102, 0.48);
    transition: left 0.55s var(--ease-spring);
    animation: tug-puller-pulse 1.3s ease-in-out infinite;
}

@keyframes tug-bar-shine {
    from { transform: translateX(-26%); }
    to { transform: translateX(26%); }
}

@keyframes tug-puller-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.22); }
}

.arena-floor {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: -18%;
    height: 56%;
    border: 1px solid rgba(55, 244, 255, 0.18);
    transform: perspective(720px) rotateX(66deg);
    background:
        repeating-linear-gradient(90deg, rgba(55, 244, 255, 0.18) 0 1px, transparent 1px 48px),
        repeating-linear-gradient(0deg, rgba(255, 209, 102, 0.12) 0 1px, transparent 1px 48px);
    box-shadow: 0 0 48px rgba(55, 244, 255, 0.1);
    z-index: -1;
}

.arena-gate {
    position: absolute;
    top: 22%;
    width: 86px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.28));
    box-shadow: inset 0 0 24px rgba(55, 244, 255, 0.12);
}

.gate-left { left: 10%; border-color: rgba(55, 244, 255, 0.36); }
.gate-right { right: 10%; border-color: rgba(255, 71, 111, 0.34); }

.battle-room-layout .rope-line {
    z-index: 1;
    height: 12px;
    margin-bottom: clamp(92px, 12vh, 150px);
    background: linear-gradient(90deg, rgba(96, 239, 255, 0.96), rgba(255, 209, 102, 0.96), rgba(255, 71, 52, 0.96));
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.26), 0 0 40px rgba(55, 244, 255, 0.14);
}

.battle-room-layout .stage-players {
    z-index: 1;
}

.question-console {
    border-radius: 8px;
}

.answer-btn {
    border-radius: 8px;
}

.answer-btn:hover {
    box-shadow: 0 0 26px rgba(55, 244, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.primary-btn {
    border-radius: 8px;
    text-transform: uppercase;
}

.fx-spark {
    position: fixed;
    z-index: 999;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    background: var(--game-cyan);
    box-shadow: 0 0 18px var(--game-cyan);
    animation: spark-pop 0.68s ease-out forwards;
}

@keyframes spark-pop {
    to {
        transform: translate(var(--sx), var(--sy)) scale(0);
        opacity: 0;
    }
}

@media (max-width: 980px) {
    .game-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .game-arena-preview {
        min-height: 260px;
    }

    .game-mode-grid,
    .hud-strip {
        grid-template-columns: 1fr 1fr;
    }

    .stage-area,
    .game-versus-layout {
        grid-template-columns: 1fr;
    }

    .chapter-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .landing-shell,
    .stage-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .game-hero {
        padding: 28px 18px;
    }

    .game-hero .landing-tagline {
        font-size: clamp(34px, 13vw, 58px);
    }

    .game-mode-grid,
    .hud-strip {
        grid-template-columns: 1fr;
    }

    .landing-tile {
        padding: 22px;
    }

    .battle-preview-card {
        min-height: auto;
    }

    .chapter-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::after,
    .game-hero::after,
    .arena-core,
    .orbit-a,
    .orbit-b,
    .mode-meter i,
    .map-route span,
    .hud-strip > div::after,
    .body-pk-swords::after {
        animation: none !important;
    }

    .game-cover .game-kicker,
    .game-hero .landing-tagline,
    .game-subtitle,
    .game-status-row .landing-chip,
    .game-arena-preview,
    .arena-console,
    .game-mode-grid .landing-tile,
    .game-start-panel {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ============================================================
   PK 刀光剑影 + 大厅 / 对战室增强
   ============================================================ */
@keyframes pk-blade-sweep {
    0% { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
    12% { opacity: 0.55; }
    50% { opacity: 0.22; }
    100% { transform: translateX(120%) skewX(-12deg); opacity: 0; }
}

@keyframes pk-spark-drift {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.35; }
    100% { transform: translate(-40px, 30px) rotate(25deg); opacity: 0; }
}

.body-pk-swords {
    position: relative;
}

.body-pk-swords::before,
.body-pk-swords::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.body-pk-swords::before {
    background:
        radial-gradient(ellipse 120% 40% at 10% 20%, rgba(0, 245, 212, 0.07), transparent 55%),
        radial-gradient(ellipse 100% 50% at 90% 70%, rgba(255, 71, 87, 0.06), transparent 50%);
    mix-blend-mode: screen;
}

.body-pk-swords::after {
    background: repeating-linear-gradient(
        125deg,
        transparent 0 180px,
        rgba(255, 255, 255, 0.04) 180px 181px,
        transparent 181px 360px
    );
    animation: pk-blade-sweep 7s ease-in-out infinite;
    opacity: 0.9;
}

.body-pk-swords .page-head,
.body-pk-swords .game-versus-layout,
.body-pk-swords .stage-area,
.body-pk-swords .stat-bar {
    position: relative;
    z-index: 1;
}

.pk-loadout-card .pk-loadout-title {
    font-size: clamp(26px, 2.4vw, 34px);
    margin-bottom: 14px;
}

.pk-loadout-form .pk-loadout-label {
    font-size: clamp(17px, 1.35vw, 21px);
    font-weight: 700;
    margin-top: 10px;
}

.pk-loadout-form .pk-loadout-input,
.pk-loadout-form select {
    font-size: clamp(17px, 1.35vw, 21px);
    padding: 14px 16px;
    min-height: 52px;
}

.pk-loadout-submit.primary-btn {
    font-size: clamp(18px, 1.5vw, 24px);
    padding: 16px 22px;
    margin-top: 8px;
}

.pk-lobby-sub {
    font-size: clamp(16px, 1.2vw, 19px);
}

.pk-history-title {
    font-size: clamp(22px, 2vw, 30px);
    margin-bottom: 12px;
}

.pk-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: min(62vh, 640px);
    overflow-y: auto;
}

.pk-history-row {
    border: 1px solid rgba(55, 244, 255, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.28);
}

.pk-history-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: clamp(16px, 1.25vw, 20px);
    font-weight: 700;
}

.pk-history-score {
    margin-left: auto;
    color: var(--game-gold);
    font-variant-numeric: tabular-nums;
}

.pk-history-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: clamp(14px, 1.1vw, 17px);
    color: var(--muted);
}

.pk-history-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.pk-history-dialog {
    border: none;
    border-radius: 14px;
    padding: 0;
    max-width: min(96vw, 720px);
    background: linear-gradient(165deg, rgba(18, 28, 62, 0.96), rgba(5, 7, 17, 0.98));
    color: #e2e8f0;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 48px rgba(55, 244, 255, 0.12);
}

.pk-history-dialog::backdrop {
    background: rgba(2, 6, 18, 0.72);
    backdrop-filter: blur(6px);
}

.pk-history-dialog-inner {
    position: relative;
    padding: 22px 22px 18px;
}

.pk-history-dialog-title {
    margin: 0 0 14px;
    font-size: 22px;
}

.pk-history-dialog-body {
    max-height: min(70vh, 560px);
    overflow: auto;
    font-size: 15px;
    line-height: 1.55;
}

.pk-dlg-summary p {
    margin: 6px 0;
}

.pk-dlg-pairs {
    margin: 12px 0 0;
    padding-left: 18px;
}

.pk-dlg-pairs li {
    margin-bottom: 12px;
}

.pk-dlg-stem {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 14px;
}

.pk-room-head .pk-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
}

.pk-room-title {
    margin: 0;
    font-size: clamp(20px, 2vw, 28px);
}

.battle-progress-lights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.battle-light {
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.28);
    background: rgba(100, 116, 139, 0.4);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.battle-light:hover:not(.is-disabled) {
    transform: scale(1.08);
}

.battle-light .battle-light-num {
    font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    color: #f8fafc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.battle-light--ok .battle-light-num {
    color: #052e16;
    text-shadow: 0 0 8px rgba(187, 247, 208, 0.9);
}

.battle-light--bad .battle-light-num {
    color: #450a0a;
    text-shadow: 0 0 8px rgba(254, 202, 202, 0.85);
}

.battle-light--current .battle-light-num {
    color: #082f49;
    text-shadow: 0 0 10px rgba(224, 242, 254, 0.95);
}

.battle-light--review .battle-light-num {
    color: #422006;
    text-shadow: 0 0 8px rgba(254, 240, 138, 0.8);
}

.battle-light--ok {
    background: radial-gradient(circle at 30% 30%, #bbf7d0, #22c55e 42%, #065f46);
    box-shadow:
        0 0 12px rgba(34, 197, 94, 0.85),
        0 0 28px rgba(52, 211, 153, 0.55),
        inset 0 0 8px rgba(255, 255, 255, 0.35);
    border-color: rgba(187, 247, 208, 0.9);
    animation: pk-light-pulse-green 1.6s ease-in-out infinite;
}

.battle-light--bad {
    background: radial-gradient(circle at 30% 30%, #fecaca, #ef4444 45%, #7f1d1d);
    box-shadow:
        0 0 12px rgba(248, 113, 113, 0.9),
        0 0 26px rgba(239, 68, 68, 0.55),
        inset 0 0 8px rgba(255, 255, 255, 0.25);
    border-color: rgba(254, 202, 202, 0.95);
    animation: pk-light-pulse-red 1.5s ease-in-out infinite;
}

.battle-light--current {
    background: radial-gradient(circle at 30% 30%, #e0f2fe, #38bdf8 50%, #0369a1);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.75);
    border-color: rgba(224, 242, 254, 0.95);
}

.battle-light--review {
    outline: 2px solid rgba(250, 204, 21, 0.95);
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.55);
}

.battle-light--pending.is-disabled {
    cursor: default;
    opacity: 0.45;
}

@keyframes pk-light-pulse-green {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
}

@keyframes pk-light-pulse-red {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.22); }
}

.pk-review-banner {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.35);
}

.pk-question-console.question-console {
    padding: clamp(18px, 2vw, 26px);
    font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

.pk-q-meta,
.pk-q-stem,
.pk-answer-grid .pk-answer-btn,
.pk-answer-grid .pk-answer-btn.is-static {
    font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
    font-weight: 700;
}

.pk-answer-grid .pk-answer-btn {
    font-size: clamp(22px, 2.1vw, 30px);
}

.pk-q-meta {
    display: block;
    color: var(--accent);
    margin-bottom: 10px;
    font-size: clamp(14px, 1.1vw, 18px);
    font-weight: 600;
}

/* 题干在 .card 内为 <p>，需压过 .card p { font-size: 17px } */
.pk-question-console .pk-q-stem {
    line-height: 1.58;
    margin: 12px 0 16px;
    font-size: clamp(26px, 2.65vw, 38px);
    color: var(--text);
}

.pk-answer-grid .pk-answer-btn {
    padding: 18px 20px;
    text-align: left;
}

.pk-answer-btn.is-static.is-correct {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.75);
}

.pk-answer-btn.is-static.is-pick-bad {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.75);
}

.pk-timer {
    font-size: clamp(16px, 1.25vw, 20px);
    font-weight: 600;
    color: var(--accent);
    margin-top: 10px;
}

.pk-feedback-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: min(94vw, 520px);
    width: min(94vw, 520px);
    background: linear-gradient(165deg, rgba(18, 28, 62, 0.98), rgba(5, 7, 17, 0.99));
    color: #e2e8f0;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6), 0 0 50px rgba(55, 244, 255, 0.14);
}

.pk-feedback-dialog::backdrop {
    background: rgba(2, 6, 18, 0.75);
    backdrop-filter: blur(8px);
}

.pk-feedback-inner {
    position: relative;
    padding: 28px 24px 22px;
    font-size: clamp(17px, 1.35vw, 20px);
}

.pk-dialog-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.35);
    color: #e2e8f0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.pk-feedback-icon {
    text-align: center;
    font-size: clamp(80px, 15vw, 128px);
    font-weight: 900;
    line-height: 1;
    margin: 8px 0 16px;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
}

.pk-feedback-icon.is-ok {
    color: #4ade80;
    filter: drop-shadow(0 0 24px rgba(74, 222, 128, 0.75));
}

.pk-feedback-icon.is-bad {
    color: #fb7185;
    filter: drop-shadow(0 0 24px rgba(251, 113, 133, 0.75));
}

.pk-feedback-options .pk-opt-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    font-size: clamp(17px, 1.45vw, 22px);
    line-height: 1.45;
}

.pk-feedback-options .pk-opt-row strong {
    font-size: 1.05em;
}

.pk-opt-row.is-correct-ring {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.85);
    border-color: rgba(74, 222, 128, 0.55);
}

.pk-opt-row.is-wrong-ring {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.9);
    border-color: rgba(248, 113, 113, 0.55);
}

.pk-feedback-expl {
    font-size: clamp(18px, 1.55vw, 24px);
    line-height: 1.55;
    margin: 12px 0 0;
    color: #cbd5e1;
}

.pk-feedback-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    justify-content: center;
}

.pk-feedback-actions .primary-btn,
.pk-feedback-actions .secondary-btn {
    font-size: clamp(17px, 1.25vw, 20px);
    padding: 14px 22px;
}

.profile-favorites-card {
    margin-top: 28px;
}

.profile-favorites-intro {
    margin-bottom: 14px;
}

.fav-review-start-form {
    margin-bottom: 18px;
}

.profile-favorites-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-favorites-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.profile-favorites-table th,
.profile-favorites-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.profile-favorites-table th {
    font-weight: 700;
    color: var(--accent);
    background: rgba(0, 0, 0, 0.2);
}

.profile-favorites-table tbody tr:hover {
    background: rgba(55, 244, 255, 0.06);
}

.fav-review-console {
    max-width: 920px;
    margin: 0 auto 24px;
}

.fav-review-summary-card {
    max-width: 1100px;
    margin: 0 auto;
}

.fav-review-result-table td:first-child {
    font-weight: 600;
}

.fav-row-ok td:last-child {
    color: #4ade80;
}

.fav-row-bad td:last-child {
    color: #fb7185;
}

.fav-review-done-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 22px;
}

.fav-review-done-actions .secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #e2e8f0;
    background: rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.fav-review-done-actions .secondary-btn:hover {
    border-color: rgba(55, 244, 255, 0.45);
    background: rgba(55, 244, 255, 0.08);
}

@media (max-width: 980px) {
    .pk-room-grid.stage-area {
        grid-template-columns: 1fr;
    }
}
