/* ========================================
   Word Clash | 名字对决
   Modern Big-Tech Interactive Design System
   (Light Theme Default · 浅色国风科技质感)
   ======================================== */

:root {
    /* Base Color Tokens (Modern High-End Dark Obsidian Theme Default) */
    --bg-page: #080c14;
    --bg-surface: rgba(13, 19, 34, 0.76);
    --bg-surface-elevated: rgba(22, 31, 54, 0.9);
    --bg-card: rgba(15, 23, 42, 0.72);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-glow: rgba(56, 189, 248, 0.35);

    /* Modern Typography & Text Tokens */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #080c14;

    /* Fighter Accents */
    --fighter-a: #06b6d4;
    --fighter-a-light: #38bdf8;
    --fighter-a-glow: rgba(6, 182, 212, 0.35);

    --fighter-b: #ec4899;
    --fighter-b-light: #f472b6;
    --fighter-b-glow: rgba(236, 72, 153, 0.35);

    /* Combat Accents */
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.45);

    --hp-high: #10b981;
    --hp-mid: #f59e0b;
    --hp-low: #ef4444;

    --ult-start: #06b6d4;
    --ult-mid: #6366f1;
    --ult-end: #ec4899;

    /* Five Elements */
    --wood: #10b981;
    --fire: #f97316;
    --earth: #f59e0b;
    --metal: #94a3b8;
    --water: #38bdf8;

    /* Glassmorphism & Shadow */
    --glass-blur: blur(28px);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* Light Theme Overrides (if switched) */
html.light-theme {
    --bg-page: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-surface-elevated: rgba(255, 255, 255, 0.98);
    --bg-card: rgba(255, 255, 255, 0.82);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.16);
    --border-glow: rgba(2, 132, 199, 0.25);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --fighter-a: #0284c7;
    --fighter-a-light: #0369a1;
    --fighter-a-glow: rgba(2, 132, 199, 0.25);

    --fighter-b: #9333ea;
    --fighter-b-light: #7e22ce;
    --fighter-b-glow: rgba(147, 51, 234, 0.25);

    --gold: #d97706;
    --gold-light: #b45309;
    --gold-glow: rgba(217, 119, 6, 0.28);
}

/* Global Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient Visual Background */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-glow {
    display: none !important;
}

.grid-overlay {
    display: none !important;
}

html.dark-theme .grid-overlay {
    display: none !important;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 60%, rgba(15, 23, 42, 0.04) 100%);
}

html.dark-theme .vignette {
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
}

/* Glassmorphism Panel Helper */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
}

.hidden {
    display: none !important;
}

/* ========================================
   App Header & Control Hub
   ======================================== */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: rgba(8, 12, 22, 0.92);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-title {
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.header-btn.active {
    background: var(--fighter-a-glow);
    border-color: var(--fighter-a);
    color: #ffffff;
}

.header-btn.icon-only {
    padding: 0.32rem 0.45rem;
    font-size: 0.85rem;
}

/* ========================================
   Main Game Container
   ======================================== */

.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding-top: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ========================================
   Setup Screen (Modern High-End Lobby)
   ======================================== */

#setup-screen {
    width: 92%;
    max-width: 520px;
    padding: 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(10, 16, 30, 0.94);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.15);
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100vh - 75px);
    max-height: calc(100dvh - 75px);
    overflow-y: auto;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.setup-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.setup-pill-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #38bdf8;
    background: rgba(6, 182, 212, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.45);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

.setup-title {
    font-size: 2.35rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 25px rgba(56, 189, 248, 0.6), 0 0 50px rgba(168, 85, 247, 0.35);
}

.lobby-view-deck {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

/* Players Input Cards */
.setup-players-deck {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 1.1rem;
    background: rgba(18, 27, 48, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-side-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card-side-tag.side-a { color: #38bdf8; }
.card-side-tag.side-b { color: #f472b6; }

.player-card.card-a:focus-within {
    border-color: #06b6d4;
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.4), inset 0 0 12px rgba(6, 182, 212, 0.15);
    background: rgba(18, 32, 58, 0.98);
}

.player-card.card-b:focus-within {
    border-color: #ec4899;
    box-shadow: 0 0 22px rgba(236, 72, 153, 0.4), inset 0 0 12px rgba(236, 72, 153, 0.15);
    background: rgba(32, 20, 48, 0.98);
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #ffffff;
    padding: 0.15rem 0;
}

.input-wrapper input::placeholder {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vs-badge {
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.2);
    padding: 0.55rem 0.65rem;
    border-radius: 50%;
    border: 1.5px solid rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* Primary Start Button (Modern Capsule) */
.glow-primary-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1.05rem 1.6rem;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.glow-primary-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    filter: brightness(1.1);
}

.glow-primary-btn:active {
    transform: translateY(1px) scale(0.99);
}

/* Tower & Tournament Lobby Cards */
.tower-intro-card, .tourn-intro-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

html.dark-theme .tower-intro-card,
html.dark-theme .tourn-intro-card {
    background: rgba(0, 0, 0, 0.25);
}

.tower-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gold);
}

.tower-input-box label {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}

.tower-input-box input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
}

.tower-preview-list {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 3px;
}

.tower-preview-item {
    flex: 1;
    min-width: 68px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 5px 3px;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.tower-preview-item .floor-num {
    display: block;
    font-weight: 800;
    color: var(--gold);
    font-size: 0.7rem;
}

.tourn-inputs-grid {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tourn-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tourn-fighter-input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    outline: none;
}

.tourn-vs-col {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--gold);
}

/* ========================================
   Arena Screen & Combat Battlefield
   ======================================== */

#arena-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    padding-top: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.arena-battlefield {
    width: min(94vw, 980px);
    flex: 1;
    min-height: 420px;
    max-height: 640px;
    position: relative;
    overflow: hidden !important;
    border-radius: 24px;
    background: radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.85) 0%, rgba(8, 12, 22, 0.96) 100%);
    border: 2px solid rgba(56, 189, 248, 0.45);
    box-shadow: 
        0 0 35px rgba(14, 165, 233, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(0, 0, 0, 0.85),
        inset 0 0 25px rgba(56, 189, 248, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-sizing: border-box;
}

/* Ground Ring Perspective Decal (擂台决斗圈) */
.arena-ground-ring {
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%) rotateX(65deg);
    width: 82%;
    height: 150px;
    border-radius: 50%;
    border: 1.5px dashed rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.15), inset 0 0 35px rgba(56, 189, 248, 0.08);
    pointer-events: none;
    z-index: 2;
}

/* =======================================================
   5 Distinct Duel Backgrounds (海洋、天空、宇宙太空、城市、大山)
   ======================================================= */

/* 1. 海洋 (Ocean - 浩瀚深海 / 碧波水光) */
.arena-battlefield[data-stage="ocean"] {
    background: 
        radial-gradient(ellipse at 50% 12%, rgba(56, 189, 248, 0.45) 0%, transparent 65%),
        radial-gradient(ellipse at 20% 85%, rgba(6, 182, 212, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 85%, rgba(6, 182, 212, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, #0369a1 0%, #0c4a6e 40%, #082f49 75%, #021a29 100%) !important;
    border: 2px solid rgba(56, 189, 248, 0.55) !important;
    box-shadow: 
        0 0 40px rgba(2, 132, 199, 0.4),
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 70px rgba(8, 47, 73, 0.85) !important;
}
.arena-battlefield[data-stage="ocean"] .arena-ground-ring {
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.25), inset 0 0 35px rgba(6, 182, 212, 0.15) !important;
}

/* 2. 天空 (Sky - 万里晴空 / 云海骄阳) */
.arena-battlefield[data-stage="sky"] {
    background: 
        radial-gradient(circle at 50% -10%, rgba(254, 240, 138, 0.6) 0%, rgba(56, 189, 248, 0.4) 40%, transparent 70%),
        radial-gradient(ellipse at 15% 65%, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 65%, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.25) 0%, transparent 55%),
        linear-gradient(180deg, #0284c7 0%, #38bdf8 38%, #7dd3fc 72%, #bae6fd 100%) !important;
    border: 2px solid rgba(254, 240, 138, 0.65) !important;
    box-shadow: 
        0 0 45px rgba(56, 189, 248, 0.45),
        0 20px 50px rgba(0, 0, 0, 0.75),
        inset 0 0 60px rgba(2, 132, 199, 0.35) !important;
}
.arena-battlefield[data-stage="sky"] .arena-ground-ring {
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.35), inset 0 0 35px rgba(254, 240, 138, 0.25) !important;
}

/* 3. 宇宙太空 (Cosmic Space - 浩瀚星空 / 星云极光) */
.arena-battlefield[data-stage="space"] {
    background: 
        radial-gradient(circle at 75% 25%, rgba(168, 85, 247, 0.4) 0%, transparent 55%),
        radial-gradient(circle at 25% 75%, rgba(236, 72, 153, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 50% 45%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(30, 27, 75, 0.95) 0%, #030712 100%) !important;
    border: 2px solid rgba(168, 85, 247, 0.6) !important;
    box-shadow: 
        0 0 45px rgba(147, 51, 234, 0.4),
        0 20px 50px rgba(0, 0, 0, 0.9),
        inset 0 0 80px rgba(0, 0, 0, 0.95) !important;
}
.arena-battlefield[data-stage="space"] .arena-ground-ring {
    border-color: rgba(168, 85, 247, 0.45) !important;
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.3), inset 0 0 35px rgba(236, 72, 153, 0.2) !important;
}

/* 4. 城市 (City - 赛博夜景 / 霓虹天际线) */
.arena-battlefield[data-stage="city"] {
    background: 
        radial-gradient(ellipse at 50% 95%, rgba(244, 63, 94, 0.35) 0%, rgba(251, 146, 60, 0.2) 45%, transparent 70%),
        radial-gradient(circle at 20% 40%, rgba(6, 182, 212, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 40%, rgba(236, 72, 153, 0.25) 0%, transparent 50%),
        linear-gradient(180deg, #09090b 0%, #18181b 45%, #27272a 80%, #3f3f46 100%) !important;
    border: 2px solid rgba(244, 63, 94, 0.6) !important;
    box-shadow: 
        0 0 40px rgba(244, 63, 94, 0.35),
        0 20px 50px rgba(0, 0, 0, 0.85),
        inset 0 0 70px rgba(9, 9, 11, 0.9) !important;
}
.arena-battlefield[data-stage="city"] .arena-ground-ring {
    border-color: rgba(244, 63, 94, 0.5) !important;
    box-shadow: 0 0 35px rgba(244, 63, 94, 0.3), inset 0 0 35px rgba(251, 146, 60, 0.2) !important;
}

/* 5. 大山 (Grand Mountain - 巍峨群山 / 云雾青峦) */
.arena-battlefield[data-stage="mountain"] {
    background: 
        radial-gradient(circle at 50% 12%, rgba(251, 146, 60, 0.45) 0%, rgba(254, 215, 170, 0.2) 35%, transparent 60%),
        radial-gradient(ellipse at 25% 70%, rgba(20, 83, 45, 0.5) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 70%, rgba(20, 83, 45, 0.5) 0%, transparent 55%),
        linear-gradient(180deg, #1e293b 0%, #0f172a 45%, #064e3b 80%, #022c22 100%) !important;
    border: 2px solid rgba(52, 211, 153, 0.6) !important;
    box-shadow: 
        0 0 40px rgba(16, 185, 129, 0.4),
        0 20px 50px rgba(0, 0, 0, 0.85),
        inset 0 0 70px rgba(2, 44, 34, 0.9) !important;
}
.arena-battlefield[data-stage="mountain"] .arena-ground-ring {
    border-color: rgba(52, 211, 153, 0.45) !important;
    box-shadow: 0 0 35px rgba(52, 211, 153, 0.3), inset 0 0 35px rgba(251, 191, 36, 0.18) !important;
}

/* =======================================================
   Realistic Dynamic Environmental Scenery (真实拟真环境层)
   ======================================================= */
.stage-env-scene {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

/* --- 1. REAL OCEAN (真实的浩瀚大海) --- */
.env-ocean-backdrop {
    position: absolute;
    inset: 0;
}

.ocean-sky-horizon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 42%;
    background: linear-gradient(180deg, #0284c7 0%, #38bdf8 60%, #bae6fd 100%);
    opacity: 0.85;
}

.ocean-sun-flare {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 90px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.9) 0%, rgba(254, 240, 138, 0.5) 45%, transparent 75%);
    filter: blur(12px);
}

.ocean-water-body {
    position: absolute;
    top: 38%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #0369a1 0%, #0c4a6e 40%, #082f49 75%, #021a29 100%);
    overflow: hidden;
}

.ocean-wave-svg {
    position: absolute;
    width: 200%;
    left: -50%;
    height: 60px;
}

.ocean-wave-svg.wave-back {
    top: -15px;
    fill: rgba(2, 132, 199, 0.7);
    animation: oceanWaveFlow 6s ease-in-out infinite alternate;
}

.ocean-wave-svg.wave-mid {
    top: 2px;
    fill: rgba(14, 165, 233, 0.55);
    animation: oceanWaveFlow 4.2s ease-in-out infinite alternate-reverse;
}

.ocean-wave-svg.wave-front {
    top: 18px;
    fill: rgba(3, 105, 161, 0.85);
    animation: oceanWaveFlow 3.4s ease-in-out infinite alternate;
}

@keyframes oceanWaveFlow {
    0%   { transform: translateX(0) scaleY(0.9); }
    100% { transform: translateX(50px) scaleY(1.2); }
}

.ocean-caustics {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 8px, transparent 8px, transparent 24px);
    opacity: 0.6;
    animation: causticsShimmer 4s ease-in-out infinite alternate;
}

@keyframes causticsShimmer {
    0%   { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

/* --- 2. REAL SKY (真实的晴空与浮云) --- */
.env-sky-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0284c7 0%, #38bdf8 45%, #7dd3fc 78%, #bae6fd 100%);
}

.sky-sun-core {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 20%, #fef08a 50%, rgba(254, 240, 138, 0.3) 75%, transparent 100%);
    filter: blur(10px);
}

.sky-god-rays {
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 80%;
    background: repeating-linear-gradient(75deg, rgba(255, 255, 255, 0.12) 0px, rgba(255, 255, 255, 0.12) 35px, transparent 35px, transparent 80px);
    opacity: 0.5;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, transparent 100%);
}

.sky-clouds-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cloud-cluster {
    position: absolute;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 9999px;
    filter: blur(14px);
}

.cloud-cluster.c1 { width: 320px; height: 90px; top: 22%; left: -60px; animation: cloudDrift 28s linear infinite; }
.cloud-cluster.c2 { width: 280px; height: 80px; top: 40%; left: 55%; animation: cloudDrift 34s linear infinite; }
.cloud-cluster.c3 { width: 380px; height: 100px; top: 58%; left: 15%; animation: cloudDrift 24s linear infinite; }
.cloud-cluster.c4 { width: 440px; height: 120px; top: 30%; left: 20%; background: rgba(255, 255, 255, 0.6); animation: cloudDrift 20s linear infinite; }
.cloud-cluster.c5 { width: 360px; height: 110px; top: 65%; left: 60%; background: rgba(255, 255, 255, 0.55); animation: cloudDrift 22s linear infinite; }

@keyframes cloudDrift {
    0%   { transform: translateX(-120px); }
    100% { transform: translateX(120px); }
}

.sky-horizon-haze {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
}

/* --- 3. REAL COSMIC SPACE (真实的宇宙星空) --- */
.env-space-backdrop {
    position: absolute;
    inset: 0;
    background: #030712;
}

.space-nebula-a {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 65%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(236, 72, 153, 0.2) 45%, transparent 70%);
    filter: blur(35px);
    animation: nebulaPulse 8s ease-in-out infinite alternate;
}

.space-nebula-b {
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 70%;
    height: 75%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(147, 51, 234, 0.25) 50%, transparent 70%);
    filter: blur(40px);
    animation: nebulaPulse 10s ease-in-out infinite alternate-reverse;
}

@keyframes nebulaPulse {
    0%   { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.1); }
}

.space-star-field {
    position: absolute;
    inset: 0;
}

.cosmic-star {
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
    animation: starTwinkle 2s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0%   { opacity: 0.25; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1.3); }
}

/* --- 4. REAL CITY (真实的都市摩天大楼夜景) --- */
.env-city-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #09090b 0%, #18181b 45%, #27272a 80%, #3f3f46 100%);
}

.city-skyline-far {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: 
        linear-gradient(90deg, 
            #1e1b4b 0%, #1e1b4b 6%, transparent 6%, transparent 8%,
            #1e1b4b 8%, #1e1b4b 16%, transparent 16%, transparent 18%,
            #1e1b4b 18%, #1e1b4b 28%, transparent 28%, transparent 30%,
            #1e1b4b 30%, #1e1b4b 42%, transparent 42%, transparent 44%,
            #1e1b4b 44%, #1e1b4b 58%, transparent 58%, transparent 60%,
            #1e1b4b 60%, #1e1b4b 72%, transparent 72%, transparent 74%,
            #1e1b4b 74%, #1e1b4b 86%, transparent 86%, transparent 88%,
            #1e1b4b 88%, #1e1b4b 100%);
    opacity: 0.6;
}

.city-skyline-near {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: 
        repeating-linear-gradient(90deg, 
            rgba(254, 240, 138, 0.18) 0px, rgba(254, 240, 138, 0.18) 2px, transparent 2px, transparent 8px),
        linear-gradient(90deg, 
            #0f172a 0%, #0f172a 10%, transparent 10%, transparent 12%,
            #0f172a 12%, #0f172a 24%, transparent 24%, transparent 26%,
            #0f172a 26%, #0f172a 40%, transparent 40%, transparent 42%,
            #0f172a 42%, #0f172a 56%, transparent 56%, transparent 58%,
            #0f172a 58%, #0f172a 75%, transparent 75%, transparent 78%,
            #0f172a 78%, #0f172a 94%, transparent 94%, transparent 96%,
            #0f172a 96%, #0f172a 100%);
    opacity: 0.85;
}

.beacon-light {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: beaconBlink 1.4s ease-in-out infinite alternate;
}
.beacon-light.b1 { top: 38%; left: 24%; }
.beacon-light.b2 { top: 32%; left: 52%; animation-delay: 0.5s; }
.beacon-light.b3 { top: 42%; left: 78%; animation-delay: 0.9s; }

@keyframes beaconBlink {
    0%   { opacity: 0.2; }
    100% { opacity: 1; }
}

.city-street-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(0deg, rgba(244, 63, 94, 0.4) 0%, rgba(251, 146, 60, 0.2) 50%, transparent 100%);
}

/* --- 5. REAL GRAND MOUNTAINS (真实的大山与云雾) --- */
.env-mountain-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 40%, #064e3b 80%, #022c22 100%);
}

.mountain-sunset-glow {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    height: 50%;
    background: radial-gradient(ellipse at 50% 20%, rgba(251, 146, 60, 0.55) 0%, rgba(254, 215, 170, 0.25) 45%, transparent 75%);
    filter: blur(15px);
}

.mountain-layer.peaks-far {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: 
        polygon(0 100%, 15% 35%, 32% 70%, 50% 25%, 68% 65%, 85% 30%, 100% 100%);
    clip-path: polygon(0 100%, 12% 40%, 28% 65%, 48% 28%, 68% 60%, 86% 32%, 100% 100%);
    background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
    opacity: 0.65;
}

.mountain-mist-layer {
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.25);
    filter: blur(20px);
    animation: mountainMistDrift 12s ease-in-out infinite alternate;
}

.mountain-mist-layer.mist-far { bottom: 35%; height: 60px; }
.mountain-mist-layer.mist-near { bottom: 15%; height: 80px; background: rgba(255, 255, 255, 0.35); animation-duration: 9s; }

@keyframes mountainMistDrift {
    0%   { transform: translateX(-40px) scaleY(0.9); opacity: 0.4; }
    100% { transform: translateX(40px) scaleY(1.15); opacity: 0.8; }
}

.mountain-layer.peaks-mid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48%;
    clip-path: polygon(0 100%, 8% 55%, 22% 30%, 40% 75%, 60% 35%, 78% 60%, 92% 42%, 100% 100%);
    background: linear-gradient(180deg, #14532d 0%, #064e3b 60%, #022c22 100%);
    opacity: 0.85;
}

.mountain-layer.ridge-near {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    clip-path: polygon(0 100%, 15% 60%, 35% 80%, 55% 50%, 75% 75%, 90% 55%, 100% 100%);
    background: linear-gradient(180deg, #064e3b 0%, #022c22 100%);
}

/* Pause Overlay */
.pause-overlay {
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.2s ease-out;
}

html.dark-theme .pause-overlay {
    background: rgba(9, 13, 22, 0.65);
}

.pause-card {
    text-align: center;
    padding: 1.6rem 2rem;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

html.dark-theme .pause-card {
    background: var(--bg-surface-elevated);
}

.pause-icon { font-size: 2.2rem; margin-bottom: 0.4rem; }
.pause-title { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }
.pause-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Fighter Entity (Pure Text) */
.fighter-container {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 90px;
    z-index: 10;
    will-change: transform;
}

/* ========================================
   Battle Top HUD (Fixed Top Fighting Game Bar)
   ======================================== */
body.in-battle .app-header {
    display: none !important;
}

.battle-top-hud,
.hud-fighter-name,
.hud-fighter-side,
.hud-bar-container,
.hud-vs-center,
.skill-popup,
.skill-callout-banner,
.ult-cutin-banner,
.clash-burst-banner,
.slowmo-mega-beam,
.mega-beam-core,
.clash-lightning-arc,
.beam-clash-sphere,
.vs-clash-overlay,
.vs-card,
.vs-center-burst,
.fighter-ghost,
.hud-bar-ghost,
.speed-line,
.combat-log-drawer,
.combat-log-feed,
.combat-log {
    display: none !important;
}

.battle-top-hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(94%, 840px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    z-index: 100;
    pointer-events: none;
    padding: 0.75rem 1.4rem;
    background: rgba(13, 19, 34, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(6, 182, 212, 0.1);
}

.hud-fighter-side {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.hud-side-b {
    justify-content: flex-end;
}

.hud-info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.hud-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    gap: 0.5rem;
}

.hud-fighter-name {
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 900;
}

.hud-hp-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.hud-bar-container {
    width: 100%;
    position: relative;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-bar-container.hp {
    height: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hud-bar-container.ult {
    height: 4px;
    margin-top: 1px;
    background: rgba(0, 0, 0, 0.4);
}

.hud-bar-ghost {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(244, 63, 94, 0.45);
    border-radius: var(--radius-full);
    transition: width 0.45s ease-out;
}

.hud-side-a .hud-bar-ghost { left: 0; }
.hud-side-b .hud-bar-ghost { right: 0; }

.hud-bar-fill {
    position: relative;
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.18s ease-out;
}

.hud-bar-fill.side-a {
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
}

.hud-side-b .hud-bar-fill.side-b {
    margin-left: auto;
    background: linear-gradient(90deg, #f43f5e, #ec4899);
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
}

.hud-bar-fill.mid {
    background: linear-gradient(90deg, #f59e0b, #eab308) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
}

.hud-bar-fill.low {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.8) !important;
    animation: hpFlashLow 0.6s ease-in-out infinite alternate;
}

@keyframes hpFlashLow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.4); }
}

.hud-ult-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.2s ease-out;
}

.hud-ult-fill.side-a {
    background: linear-gradient(90deg, #06b6d4, #f59e0b);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.hud-side-b .hud-ult-fill.side-b {
    margin-left: auto;
    background: linear-gradient(90deg, #ec4899, #f59e0b);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.5);
}

.hud-vs-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hud-vs-badge {
    font-size: 0.82rem;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(236, 72, 153, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
    letter-spacing: 0.08em;
}

/* Fighter Avatar Character (Pure Elegant Font & Glow) */
.fighter {
    position: relative;
    font-size: 4.8rem;
    font-weight: 900;
    line-height: 1;
    user-select: none;
    z-index: 5;
    transition: transform 0.08s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
}

.fighter-char {
    display: block;
    line-height: 1;
    animation: fighterFloat 3.2s ease-in-out infinite alternate;
}

@keyframes fighterFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-6px); }
}

#fighter-a {
    color: #ffffff;
    text-shadow: 0 0 25px var(--fighter-a), 0 0 50px rgba(6, 182, 212, 0.4);
}

#fighter-b {
    color: #ffffff;
    text-shadow: 0 0 25px var(--fighter-b), 0 0 50px rgba(236, 72, 153, 0.4);
}

/* Dynamic Martial Arts Stances & Combat Reactions */
#container-a .fighter.xf-battle {
    transform: scale(1.18) rotate(12deg);
    filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.85));
}

#container-b .fighter.xf-battle {
    transform: scale(1.18) rotate(-12deg);
    filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.85));
}

.fighter.xf-guard {
    transform: scale(0.92, 1.08);
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.9));
}

#container-a .fighter.xf-shadow {
    transform: scale(0.88) rotate(-14deg);
    opacity: 0.75;
    filter: blur(1px);
}

#container-b .fighter.xf-shadow {
    transform: scale(0.88) rotate(14deg);
    opacity: 0.75;
    filter: blur(1px);
}

.fighter.xf-awakening, .fighter-container.casting-ult .fighter {
    transform: scale(1.26);
    filter: drop-shadow(0 0 24px #fbbf24) drop-shadow(0 0 45px #f59e0b) brightness(1.25);
    animation: awakeningPulse 0.4s ease-in-out infinite alternate;
}

@keyframes awakeningPulse {
    0%   { transform: scale(1.22); filter: drop-shadow(0 0 20px #fbbf24); }
    100% { transform: scale(1.30); filter: drop-shadow(0 0 35px #f59e0b) drop-shadow(0 0 15px #fff); }
}

#container-a .fighter.hit {
    transform: translateX(-18px) scale(0.88, 1.15) rotate(-10deg);
    filter: brightness(1.4);
}

#container-b .fighter.hit {
    transform: translateX(18px) scale(0.88, 1.15) rotate(10deg);
    filter: brightness(1.4);
}

#container-a .fighter.critical-hit {
    transform: translateX(-30px) scale(0.78, 1.28) rotate(-18deg);
    filter: brightness(1.7) drop-shadow(0 0 22px #ef4444);
}

#container-b .fighter.critical-hit {
    transform: translateX(30px) scale(0.78, 1.28) rotate(18deg);
    filter: brightness(1.7) drop-shadow(0 0 22px #ef4444);
}

/* Direct On-Body Hit Spark (Centered on Target Character) */
.on-body-hit-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 60;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--hit-color, #ffffff);
    text-shadow: 0 0 18px var(--hit-color, #ffffff), 0 0 32px #ffffff;
    animation: hitSparkPop 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.on-body-hit-spark.crit {
    font-size: 3.8rem;
    text-shadow: 0 0 25px #fbbf24, 0 0 50px #ef4444, 0 0 15px #ffffff;
}

@keyframes hitSparkPop {
    0%   { transform: translate(-50%, -50%) scale(0.2) rotate(0deg); opacity: 1; }
    50%  { transform: translate(-50%, -50%) scale(1.35) rotate(35deg); opacity: 0.95; }
    100% { transform: translate(-50%, -50%) scale(1.7) rotate(70deg); opacity: 0; }
}

/* Floating Skill Move Badge Above Fighter's Head */
.fighter-head-skill-badge {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 900;
    padding: 0.22rem 0.75rem;
    border-radius: var(--radius-full);
    background: rgba(10, 15, 28, 0.92);
    color: #ffffff;
    border: 1.5px solid var(--skill-color, #38bdf8);
    box-shadow: 0 0 16px var(--skill-color, #38bdf8)88;
    text-shadow: 0 0 8px var(--skill-color, #38bdf8);
    pointer-events: none;
    z-index: 70;
    animation: headBadgeFloat 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headBadgeFloat {
    0%   { transform: translateX(-50%) translateY(12px) scale(0.65); opacity: 0; }
    20%  { transform: translateX(-50%) translateY(0px) scale(1.08); opacity: 1; }
    75%  { transform: translateX(-50%) translateY(-8px) scale(1); opacity: 0.95; }
    100% { transform: translateX(-50%) translateY(-22px) scale(0.85); opacity: 0; }
}

/* Attached Character Name Tags (Disabled - main fighter-char is the single name display) */
.fighter-name-tag {
    display: none !important;
}

/* Attached Fighter Health HUD */
.fighter-hp-hud {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 110px;
    z-index: 20;
    pointer-events: none;
}

.fighter-hp-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.fighter-hp-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fighter-hp-fill.side-a {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.fighter-hp-fill.side-b {
    background: linear-gradient(90deg, #db2777, #f472b6);
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.8);
}

.fighter-hp-fill.mid {
    background: linear-gradient(90deg, #d97706, #fbbf24) !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.8) !important;
}

.fighter-hp-fill.low {
    background: linear-gradient(90deg, #dc2626, #f87171) !important;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.9) !important;
}

.fighter-hp-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: #e2e8f0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Gorgeous Flying Elemental Projectile Orb */
.gorgeous-magic-orb {
    position: absolute;
    width: 38px;
    height: 38px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magic-orb-aura {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--orb-color, #38bdf8) 20%, transparent 70%);
    opacity: 0.75;
    filter: blur(6px);
}

.magic-orb-core {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 15%, var(--orb-color, #38bdf8) 70%, #000000 100%);
    box-shadow: 0 0 18px var(--orb-color, #38bdf8), 0 0 30px var(--orb-color, #38bdf8)88, 0 0 8px #ffffff;
    animation: magicCorePulse 0.25s ease-in-out infinite alternate;
}

@keyframes magicCorePulse {
    0%   { transform: scale(0.9); filter: brightness(1.1); }
    100% { transform: scale(1.15); filter: brightness(1.5); }
}

.magic-orb-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--orb-color, #38bdf8);
    box-shadow: 0 0 12px var(--orb-color, #38bdf8);
    animation: magicRingSpin 0.35s linear infinite;
}

@keyframes magicRingSpin {
    0%   { transform: rotate(0deg) scaleX(1.35); }
    100% { transform: rotate(360deg) scaleX(1.35); }
}

/* --- Modality 1: High Energy Laser / Beam (贯穿聚能冲击光波) --- */
.gorgeous-energy-beam {
    position: absolute;
    height: 18px;
    transform-origin: left center;
    background: linear-gradient(90deg, #ffffff 0%, var(--beam-color, #38bdf8) 40%, var(--beam-color, #38bdf8) 100%);
    border-radius: 9px;
    box-shadow: 0 0 25px var(--beam-color, #38bdf8), 0 0 50px var(--beam-color, #38bdf8)aa, 0 0 10px #ffffff;
    pointer-events: none;
    z-index: 155;
    animation: beamSurge 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes beamSurge {
    0%   { transform: scaleY(0.3); opacity: 0.6; }
    50%  { transform: scaleY(1.5); opacity: 1; filter: brightness(1.6); }
    100% { transform: scaleY(0.9); opacity: 0; }
}

/* --- Modality 2: Flying Blade Barrage (万剑/飞刃四连发) --- */
.gorgeous-flying-blade {
    position: absolute;
    width: 44px;
    height: 12px;
    pointer-events: none;
    z-index: 152;
    background: linear-gradient(90deg, #ffffff 15%, var(--blade-color, #38bdf8) 75%, transparent 100%);
    clip-path: polygon(0 35%, 75% 0, 100% 50%, 75% 100%, 0 65%);
    box-shadow: 0 0 16px var(--blade-color, #38bdf8), 0 0 25px var(--blade-color, #38bdf8)88;
    filter: drop-shadow(0 0 6px var(--blade-color, #38bdf8));
}

/* --- Modality 3: Skyfall Orbital Meteor (天降陨石/神罚打击) --- */
.gorgeous-skyfall-meteor {
    position: absolute;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 154;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 15%, var(--meteor-color, #f97316) 65%, #000000 100%);
    box-shadow: 0 0 35px var(--meteor-color, #f97316), 0 0 60px var(--meteor-color, #f97316)aa, 0 -30px 40px var(--meteor-color, #f97316);
}

/* --- Modality 4: Sine-Wave Spiral Vortex (螺旋风暴回旋法印) --- */
.gorgeous-spiral-vortex {
    position: absolute;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 153;
    border-radius: 50%;
    border: 3.5px dashed var(--vortex-color, #10b981);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, var(--vortex-color, #10b981) 45%, transparent 75%);
    box-shadow: 0 0 25px var(--vortex-color, #10b981), 0 0 45px var(--vortex-color, #10b981)88;
    animation: vortexRotateFast 0.18s linear infinite;
}

@keyframes vortexRotateFast {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Modality 5: Ground Chain Eruption (地脉三连连爆) --- */
.gorgeous-ground-eruption {
    position: absolute;
    width: 55px;
    height: 90px;
    transform: translate(-50%, -100%);
    pointer-events: none;
    z-index: 151;
    background: radial-gradient(ellipse at 50% 100%, #ffffff 10%, var(--burst-color, #ea580c) 45%, transparent 80%);
    filter: blur(1px);
    animation: groundPillarErupt 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes groundPillarErupt {
    0%   { transform: translate(-50%, -100%) scaleY(0.2); opacity: 0; }
    40%  { transform: translate(-50%, -100%) scaleY(1.4) scaleX(1.2); opacity: 1; filter: brightness(1.7); }
    100% { transform: translate(-50%, -100%) scaleY(1) scaleX(0.8); opacity: 0; }
}

/* Center Wave Clash Banner */
.center-clash-banner {
    position: absolute;
    top: 24%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 0.35rem 1.1rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.94);
    color: #fef08a;
    border: 2px solid #eab308;
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.8), 0 0 50px rgba(239, 68, 68, 0.5);
    text-shadow: 0 0 12px #eab308;
    z-index: 200;
    pointer-events: none;
    animation: clashBannerPop 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes clashBannerPop {
    0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
    20%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    75%  { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
    100% { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
}

/* Epic Dual-Color Wave Clash Core (双法球碰撞中心核心) */
.wave-clash-epic-core {
    position: absolute;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 160;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 15%, var(--color-a, #f97316) 45%, var(--color-b, #38bdf8) 75%, transparent 100%);
    box-shadow: 0 0 35px var(--color-a, #f97316), 0 0 50px var(--color-b, #38bdf8), 0 0 20px #ffffff;
    animation: waveClashVibrate 0.12s ease-in-out infinite alternate;
}

@keyframes waveClashVibrate {
    0%   { transform: translate(-50%, -50%) scale(0.9) rotate(-15deg); filter: brightness(1.2); }
    100% { transform: translate(-50%, -50%) scale(1.3) rotate(15deg); filter: brightness(1.8); }
}

.fighter-shadow {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.25), transparent 70%);
    z-index: 1;
    border-radius: 50%;
    filter: blur(4px);
    animation: shadowScale 3.2s ease-in-out infinite alternate;
}

#container-b .fighter-shadow {
    background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.25), transparent 70%);
}

@keyframes shadowScale {
    0% { transform: translateX(-50%) scale(1); opacity: 0.7; }
    100% { transform: translateX(-50%) scale(0.85); opacity: 0.4; }
}

.aura-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    opacity: 0.18;
    filter: blur(16px);
    z-index: -1;
    pointer-events: none;
}

/* Combo Counter */
.combo-display {
    position: absolute;
    top: -10px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold-glow);
    z-index: 25;
}

/* Stats Popover */
.stats-panel {
    position: absolute;
    top: -15px;
    left: 110%;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.74rem;
    color: var(--text-primary);
    z-index: 200;
    min-width: 130px;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

html.dark-theme .stats-panel {
    background: var(--bg-surface-elevated);
}

#container-b .stats-panel {
    left: auto;
    right: 110%;
}

.stats-panel-title {
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 3px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2px;
}

/* ========================================
   Combat Effects & Popups
   ======================================== */

.hit-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 175;
    background: rgba(255, 255, 255, 0.35);
    border-radius: inherit;
    animation: flashFade 0.18s ease-out forwards;
}

.hit-flash.crit {
    background: rgba(251, 191, 36, 0.45);
}

.crit-freeze {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 176;
    background: rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    animation: flashFade 0.18s ease-out forwards;
}

@keyframes flashFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.finish-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #fef08a;
    text-shadow: 0 0 30px #f59e0b, 0 0 60px #ea580c, 0 2px 8px #000;
    z-index: 500;
    pointer-events: none;
    white-space: nowrap;
    animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.damage-text {
    position: absolute;
    pointer-events: none;
    font-weight: 800;
    font-size: 1.15rem;
    color: #0f172a;
    z-index: 190;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
    animation: floatDamage 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.dark-theme .damage-text {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.damage-text.critical {
    color: #ea580c;
    font-size: 1.45rem;
    text-shadow: 0 0 12px rgba(234, 88, 12, 0.4), 0 1px 4px rgba(255, 255, 255, 0.9);
}

html.dark-theme .damage-text.critical {
    color: var(--gold-light);
    text-shadow: 0 0 14px var(--gold-glow), 0 2px 6px rgba(0, 0, 0, 0.9);
}

@keyframes floatDamage {
    0%   { opacity: 0; transform: translate(-50%, -20%) scale(0.85); }
    20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    80%  { opacity: 0.9; transform: translate(-50%, -75%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -100%) scale(0.95); }
}

.skill-popup {
    position: absolute;
    pointer-events: none;
    font-size: 1.15rem;
    font-weight: 900;
    z-index: 195;
    white-space: nowrap;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid currentColor;
    box-shadow: 0 2px 14px currentColor;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
    animation: skillPopupAnim 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.dark-theme .skill-popup {
    background: rgba(18, 26, 43, 0.92);
}

@keyframes skillPopupAnim {
    0%   { opacity: 0; transform: translate(-50%, 0) scale(0.8) rotate(var(--rot, 0deg)); }
    15%  { opacity: 1; transform: translate(-50%, -30px) scale(1.05) rotate(var(--rot, 0deg)); }
    75%  { opacity: 1; transform: translate(-50%, -48px) scale(1) rotate(var(--rot, 0deg)); }
    100% { opacity: 0; transform: translate(-50%, -70px) scale(0.9) rotate(var(--rot, 0deg)); }
}

/* ========================================
   Slow-Motion Magnificent Ranged Combat FX
   ======================================== */

/* Launch Muzzle Flare (Instant Explosive Release) */
.cast-sigil {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 10%, var(--proj-color, #f59e0b) 55%, transparent 80%);
    box-shadow: 0 0 45px var(--proj-color, #f59e0b), 0 0 15px #ffffff;
    pointer-events: none;
    z-index: 40;
    transform: translate(-50%, -50%);
    animation: launchFlare 0.32s ease-out forwards;
}

@keyframes launchFlare {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(2.0); opacity: 0; }
}

/* Flying Projectile Entity */
.ranged-projectile-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranged-projectile-core {
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--proj-color, #f59e0b) 60%, transparent 95%);
    box-shadow: 0 0 30px var(--proj-color, #f59e0b), 0 0 60px var(--proj-color, #f59e0b)88, 0 0 10px #ffffff;
    animation: projCorePulse 0.45s ease-in-out infinite alternate;
}

@keyframes projCorePulse {
    0% { transform: scale(0.9); filter: brightness(1.1); }
    100% { transform: scale(1.2); filter: brightness(1.6); }
}

.ranged-projectile-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--proj-color, #f59e0b);
    box-shadow: 0 0 14px var(--proj-color, #f59e0b);
    opacity: 0.9;
    animation: projRingSpin 0.5s linear infinite;
}

@keyframes projRingSpin {
    0% { transform: rotate(0deg) scaleX(1.45); }
    100% { transform: rotate(360deg) scaleX(1.45); }
}

/* Multi-Sword Swarm (万剑归宗) */
.spirit-sword-swarm {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform: translate(-50%, -50%);
}

.spirit-sword-item {
    position: absolute;
    width: 48px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--proj-color, #38bdf8) 40%, #ffffff 100%);
    box-shadow: 0 0 20px var(--proj-color, #38bdf8), 0 0 8px #ffffff;
    filter: drop-shadow(0 0 6px #ffffff);
    animation: swordSwarmBob 0.3s ease-in-out infinite alternate;
}

@keyframes swordSwarmBob {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(2px); }
}

/* Dragon / Phoenix Beast Entity (炎龙破 / 冰凤啸) */
.beast-head-entity {
    position: absolute;
    pointer-events: none;
    z-index: 172;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.beast-head-core {
    font-size: 3.8rem;
    filter: drop-shadow(0 0 28px var(--proj-color, #ef4444)) drop-shadow(0 0 12px #ffffff);
    animation: beastHeadRoar 0.35s ease-in-out infinite alternate;
}

@keyframes beastHeadRoar {
    0% { transform: scale(0.9) rotate(-3deg); }
    100% { transform: scale(1.22) rotate(4deg); }
}

/* Taiji Trigram Array (太极阴阳八卦印) */
.taiji-orb-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: conic-gradient(#ffffff 0deg 180deg, #090d16 180deg 360deg);
    border: 2px solid var(--proj-color, #8b5cf6);
    box-shadow: 0 0 35px var(--proj-color, #8b5cf6), 0 0 16px #ffffff;
    animation: taijiSpin 0.5s linear infinite;
}

@keyframes taijiSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Dharma Palm Projection (大荒梵天掌) */
.dharma-palm-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dharma-palm-core {
    font-size: 4.4rem;
    color: var(--proj-color, #fbbf24);
    text-shadow: 0 0 45px var(--proj-color, #fbbf24), 0 0 18px #ffffff;
    opacity: 0.95;
    animation: palmPulse 0.4s ease-in-out infinite alternate;
}

@keyframes palmPulse {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.22); }
}

/* Spiral Helix Wave (螺旋混元波) */
.spiral-helix-ring {
    position: absolute;
    width: 32px;
    height: 52px;
    border: 2.5px solid var(--proj-color, #38bdf8);
    box-shadow: 0 0 16px var(--proj-color, #38bdf8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 168;
    animation: helixSpin 0.4s linear infinite;
}

@keyframes helixSpin {
    0% { transform: rotate(0deg) scale(0.7); opacity: 0.85; }
    50% { transform: rotate(180deg) scale(1.3); opacity: 1; }
    100% { transform: rotate(360deg) scale(0.7); opacity: 0.85; }
}

/* Crescent Sword Ki Wave (月牙天冲) */
.sword-ki-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sword-ki-blade {
    width: 90px;
    height: 26px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--proj-color, #38bdf8) 50%, transparent 100%);
    box-shadow: 0 -6px 28px var(--proj-color, #38bdf8), 0 0 45px var(--proj-color, #38bdf8)aa;
    filter: drop-shadow(0 0 14px #ffffff);
}

/* Lightning Spear Bolt (雷霆神矛) */
.lightning-spear-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightning-spear-core {
    width: 100%;
    height: 18px;
    background: linear-gradient(90deg, transparent 0%, var(--proj-color, #fbbf24) 40%, #ffffff 100%);
    box-shadow: 0 0 25px var(--proj-color, #fbbf24), 0 0 50px #ffffff;
    border-radius: 9px;
    animation: lightningFlicker 0.15s ease-in-out infinite alternate;
}

@keyframes lightningFlicker {
    0% { filter: brightness(1.1); transform: scaleY(0.9); }
    100% { filter: brightness(1.7); transform: scaleY(1.2); }
}

/* =======================================================
   AAA Anime & Iconic Game Combat Visual Entities
   ======================================================= */

/* 1. Mega Anime Energy Beam (终极灭世神威光炮 - Kamehameha / Hyper Beam) */
.slowmo-mega-beam {
    position: absolute;
    height: 52px;
    transform-origin: left center;
    pointer-events: none;
    z-index: 180;
    display: flex;
    align-items: center;
}

.mega-beam-sheath {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: linear-gradient(90deg, #ffffff 0%, var(--beam-color, #f59e0b) 18%, var(--beam-color, #f59e0b) 85%, transparent 100%);
    box-shadow: 0 0 50px var(--beam-color, #f59e0b), 0 0 100px var(--beam-color, #f59e0b)bb, 0 0 25px #ffffff;
    opacity: 0.9;
    animation: beamSheathPulse 0.08s ease-in-out infinite alternate;
}

.mega-beam-core {
    position: relative;
    width: 100%;
    height: 20px;
    border-radius: 10px;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 75%, var(--beam-color, #f59e0b) 95%, transparent 100%);
    box-shadow: 0 0 25px #ffffff, 0 0 45px var(--beam-color, #f59e0b);
    animation: beamCoreVibrate 0.06s ease-in-out infinite alternate;
}

.mega-beam-drill {
    position: absolute;
    right: -24px;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle, #ffffff 30%, var(--beam-color, #f59e0b) 70%, transparent 100%);
    box-shadow: 0 0 40px #ffffff, 0 0 70px var(--beam-color, #f59e0b);
    animation: beamDrillPulse 0.1s ease-in-out infinite alternate;
}

.mega-beam-muzzle {
    position: absolute;
    left: -20px;
    top: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle, #ffffff 40%, var(--beam-color, #f59e0b) 80%, transparent 100%);
    box-shadow: 0 0 45px #ffffff, 0 0 80px var(--beam-color, #f59e0b);
}

@keyframes beamSheathPulse {
    0% { transform: scaleY(0.92); filter: brightness(1.2); }
    100% { transform: scaleY(1.18); filter: brightness(1.7); }
}

@keyframes beamCoreVibrate {
    0% { transform: scaleY(0.9); filter: brightness(1.3); }
    100% { transform: scaleY(1.15); filter: brightness(1.9); }
}

@keyframes beamDrillPulse {
    0% { transform: translateY(-50%) scale(0.85); }
    100% { transform: translateY(-50%) scale(1.35); }
}

/* 2. 七龙珠 · 宇宙超元气弹 (Cosmic Super Spirit Bomb) */
.genki-dama-entity {
    position: absolute;
    pointer-events: none;
    z-index: 180;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #38bdf8 40%, #0284c7 75%, #0369a1 95%, transparent 100%);
    box-shadow: 0 0 60px #38bdf8, 0 0 120px #0284c7, 0 0 35px #ffffff, inset 0 0 25px #ffffff;
    animation: genkiPulse 0.18s ease-in-out infinite alternate;
}

.genki-ring-1 {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2.5px solid rgba(56, 189, 248, 0.85);
    box-shadow: 0 0 20px #38bdf8;
    transform: rotateX(70deg) rotateZ(30deg);
    animation: genkiRingSpin1 0.4s linear infinite;
}

.genki-ring-2 {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px #ffffff;
    transform: rotateY(70deg) rotateZ(-30deg);
    animation: genkiRingSpin2 0.4s linear infinite;
}

@keyframes genkiPulse {
    0% { transform: translate(-50%, -50%) scale(0.92); filter: brightness(1.2); }
    100% { transform: translate(-50%, -50%) scale(1.15); filter: brightness(1.7); }
}

@keyframes genkiRingSpin1 {
    0% { transform: rotateX(70deg) rotateZ(0deg); }
    100% { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes genkiRingSpin2 {
    0% { transform: rotateY(70deg) rotateZ(0deg); }
    100% { transform: rotateY(70deg) rotateZ(-360deg); }
}

/* 3. 咒术 · 无下限虚式·茈 (Hollow Purple Singularity) */
.hollow-purple-entity {
    position: absolute;
    pointer-events: none;
    z-index: 185;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #020005 0%, #1e0836 28%, #a855f7 55%, #ec4899 78%, transparent 100%);
    box-shadow: 0 0 60px #a855f7, 0 0 110px #7c3aed, 0 0 40px #ec4899, inset 0 0 25px #ffffff;
    animation: hollowPurpleSpin 0.25s linear infinite;
}

@keyframes hollowPurpleSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.95); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.18); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(0.95); }
}

/* 4. 拳皇 · 能量喷泉 (Triple Power Geyser) */
.power-geyser-entity {
    position: absolute;
    pointer-events: none;
    z-index: 172;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.geyser-pillar {
    width: 26px;
    height: 100px;
    border-radius: 13px 13px 0 0;
    background: linear-gradient(180deg, #ffffff 0%, #f97316 35%, #ef4444 75%, #991b1b 100%);
    box-shadow: 0 0 40px #f97316, 0 0 70px #ef4444, 0 0 15px #ffffff;
    animation: geyserErupt 0.35s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}

@keyframes geyserErupt {
    0% { transform: scaleY(0.5); opacity: 0.75; }
    100% { transform: scaleY(1.3); opacity: 1; }
}

/* 5. 拳皇 · 大蛇·阳光普照 (Orochi Divine Sunshine) */
.orochi-light-entity {
    position: absolute;
    pointer-events: none;
    z-index: 178;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 25%, rgba(254, 240, 138, 0.9) 55%, rgba(251, 191, 36, 0.5) 80%, transparent 100%);
    box-shadow: 0 0 90px #ffffff, 0 0 160px #fbbf24;
    animation: orochiGlow 0.18s ease-in-out infinite alternate;
}

@keyframes orochiGlow {
    0% { transform: translate(-50%, -50%) scale(0.88); filter: brightness(1.2); }
    100% { transform: translate(-50%, -50%) scale(1.32); filter: brightness(2.1); }
}

/* 6. 任天堂 · 大师剑气·三角神力 (Triforce Sacred Slash) */
.triforce-slash-entity {
    position: absolute;
    pointer-events: none;
    z-index: 175;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.triforce-blade-crest {
    width: 0;
    height: 0;
    border-left: 36px solid transparent;
    border-right: 36px solid transparent;
    border-bottom: 64px solid #fbbf24;
    filter: drop-shadow(0 0 35px #fbbf24) drop-shadow(0 0 18px #ffffff);
    animation: triforcePulse 0.3s ease-in-out infinite alternate;
}

@keyframes triforcePulse {
    0% { transform: scale(0.9); filter: brightness(1.2); }
    100% { transform: scale(1.25); filter: brightness(1.8); }
}

/* 7. 死神 · 月牙十字冲 (Getsuga Cross) */
.getsuga-cross-entity {
    position: absolute;
    pointer-events: none;
    z-index: 175;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.getsuga-cross-blade {
    position: absolute;
    width: 120px;
    height: 28px;
    border-radius: 14px;
    background: linear-gradient(90deg, #ffffff 15%, #ef4444 65%, transparent 100%);
    box-shadow: 0 0 45px #ef4444, 0 0 80px #dc2626, 0 0 15px #ffffff;
}

/* 8. 火影 · 风遁·螺旋手里剑 (Rasen Shuriken) */
.rasenshuriken-entity {
    position: absolute;
    pointer-events: none;
    z-index: 175;
    width: 82px;
    height: 82px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 35%, #38bdf8 70%, transparent 100%);
    box-shadow: 0 0 50px #38bdf8, 0 0 95px #0284c7, 0 0 25px #ffffff;
    animation: shurikenSpin 0.1s linear infinite;
}

@keyframes shurikenSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.92); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1.18); }
}

/* 9. 七龙珠 · 界王拳炎龙破 (Kaio-ken Dragon Aura Blast) */
.dragon-fist-entity {
    position: absolute;
    pointer-events: none;
    z-index: 175;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dragon-flame-orb {
    width: 80px;
    height: 50px;
    border-radius: 50% 15% 15% 50% / 50% 15% 15% 50%;
    background: linear-gradient(90deg, #ffffff 10%, #f59e0b 45%, #ef4444 80%, transparent 100%);
    box-shadow: 0 0 45px #f59e0b, 0 0 85px #ef4444, 0 0 20px #ffffff;
    animation: dragonFlameWave 0.15s ease-in-out infinite alternate;
}

@keyframes dragonFlameWave {
    0% { transform: scale(0.92) scaleY(0.9); filter: brightness(1.2); }
    100% { transform: scale(1.25) scaleY(1.15); filter: brightness(1.8); }
}

/* 10. 拳皇 · 禁千二百十一式·八稚女紫炎 (Yaotome Dark Hellfire) */
.yaotome-hellfire-entity {
    position: absolute;
    pointer-events: none;
    z-index: 175;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 15%, #c084fc 45%, #9333ea 75%, transparent 100%);
    box-shadow: 0 0 50px #a855f7, 0 0 90px #7c3aed, 0 0 25px #ffffff;
    animation: hellfireFlicker 0.16s ease-in-out infinite alternate;
}

@keyframes hellfireFlicker {
    0% { transform: translate(-50%, -50%) scale(0.9); filter: brightness(1.2); }
    100% { transform: translate(-50%, -50%) scale(1.28); filter: brightness(1.9); }
}

/* 11. 大荒金刚神掌 (Dharma God Palm) */
.dharma-palm-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dharma-palm-core {
    width: 72px;
    height: 86px;
    border-radius: 20px 20px 10px 10px;
    background: linear-gradient(180deg, #ffffff 0%, var(--proj-color, #fbbf24) 45%, var(--proj-color, #d97706) 90%);
    box-shadow: 0 0 50px var(--proj-color, #fbbf24), 0 0 90px #ffffff, inset 0 0 20px #ffffff;
    animation: palmPulse 0.25s ease-in-out infinite alternate;
}

@keyframes palmPulse {
    0% { transform: scale(0.9); filter: brightness(1.2); }
    100% { transform: scale(1.25); filter: brightness(1.7); }
}

/* 12. 月牙剑气 (Crescent Sword Ki) */
.sword-ki-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sword-ki-blade {
    width: 105px;
    height: 32px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--proj-color, #38bdf8) 55%, transparent 100%);
    box-shadow: 0 -8px 35px var(--proj-color, #38bdf8), 0 0 60px var(--proj-color, #38bdf8)aa, 0 0 20px #ffffff;
    filter: drop-shadow(0 0 16px #ffffff);
}

/* 13. 雷霆神矛 (Lightning Spear) */
.lightning-spear-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightning-spear-core {
    width: 100%;
    height: 22px;
    background: linear-gradient(90deg, transparent 0%, var(--proj-color, #fbbf24) 35%, #ffffff 100%);
    box-shadow: 0 0 35px var(--proj-color, #fbbf24), 0 0 65px #ffffff;
    border-radius: 11px;
    animation: lightningFlicker 0.12s ease-in-out infinite alternate;
}

@keyframes lightningFlicker {
    0% { filter: brightness(1.2); transform: scaleY(0.85); }
    100% { filter: brightness(1.9); transform: scaleY(1.3); }
}

/* 14. 万剑归宗 (Spirit Sword Swarm) */
.spirit-sword-swarm {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform: translate(-50%, -50%);
}

.spirit-sword-item {
    position: absolute;
    width: 55px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, transparent 0%, var(--proj-color, #38bdf8) 40%, #ffffff 100%);
    box-shadow: 0 0 25px var(--proj-color, #38bdf8), 0 0 12px #ffffff;
    filter: drop-shadow(0 0 8px #ffffff);
    animation: swordSwarmBob 0.25s ease-in-out infinite alternate;
}

@keyframes swordSwarmBob {
    0% { transform: translateY(-3px); }
    100% { transform: translateY(3px); }
}

/* 15. Default High-Energy Projectile */
.ranged-projectile-entity {
    position: absolute;
    pointer-events: none;
    z-index: 170;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranged-projectile-core {
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--proj-color, #f59e0b) 55%, transparent 95%);
    box-shadow: 0 0 40px var(--proj-color, #f59e0b), 0 0 80px var(--proj-color, #f59e0b)aa, 0 0 15px #ffffff;
    animation: projCorePulse 0.3s ease-in-out infinite alternate;
}

@keyframes projCorePulse {
    0% { transform: scale(0.9); filter: brightness(1.2); }
    100% { transform: scale(1.25); filter: brightness(1.8); }
}

.ranged-projectile-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2.5px solid var(--proj-color, #f59e0b);
    box-shadow: 0 0 20px var(--proj-color, #f59e0b), 0 0 8px #ffffff;
    opacity: 0.95;
    animation: projRingSpin 0.35s linear infinite;
}

@keyframes projRingSpin {
    0% { transform: rotate(0deg) scaleX(1.5); }
    100% { transform: rotate(360deg) scaleX(1.5); }
}

/* Floating Skill Callout Banner */
.skill-callout-banner {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 220;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 12px;
    background: rgba(10, 14, 26, 0.9);
    border: 1.5px solid var(--skill-color, #f59e0b);
    box-shadow: 0 0 20px var(--skill-color, #f59e0b)88, inset 0 0 10px var(--skill-color, #f59e0b)44;
    text-shadow: 0 0 12px var(--skill-color, #f59e0b), 0 0 20px #ffffff;
    white-space: nowrap;
    animation: skillBannerFloat 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes skillBannerFloat {
    0% { transform: translate(-50%, -20%) scale(0.6); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    80% { transform: translate(-50%, -60%) scale(1); opacity: 0.95; }
    100% { transform: translate(-50%, -85%) scale(0.9); opacity: 0; }
}

/* Combat Melee & Impact FX Elements */
.attack-trail, .afterimage, .shockwave-ring, .speed-line, .impact-burst, .slash-mark {
    position: absolute !important;
    pointer-events: none !important;
    z-index: 160;
}

.shockwave-ring {
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringExpand 0.55s ease-out forwards;
}

@keyframes ringExpand {
    0% { width: 10px; height: 10px; opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    100% { width: 120px; height: 120px; opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

.speed-line {
    animation: speedLineFade 0.26s ease-out forwards;
}

@keyframes speedLineFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.impact-burst {
    animation: impactBurstPop 0.38s ease-out forwards;
}

@keyframes impactBurstPop {
    0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.slash-mark {
    font-weight: 900;
    line-height: 1;
    animation: slashMarkFade 0.48s ease-out forwards;
}

@keyframes slashMarkFade {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* ========================================
   Beam / Wave Clash Center Explosion FX (极峰对波)
   ======================================== */
.beam-clash-sphere {
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    background: radial-gradient(circle, #ffffff 0%, var(--clash-color-a, #f59e0b) 35%, var(--clash-color-b, #38bdf8) 70%, transparent 100%);
    box-shadow: 0 0 70px #ffffff, 0 0 130px var(--clash-color-a, #f59e0b), 0 0 130px var(--clash-color-b, #38bdf8);
    animation: clashSpherePulse 0.12s ease-in-out infinite alternate;
}

@keyframes clashSpherePulse {
    0% { transform: translate(-50%, -50%) scale(0.92); filter: brightness(1.3); }
    100% { transform: translate(-50%, -50%) scale(1.3); filter: brightness(2.2); }
}

.clash-burst-banner {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 215;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: #ffffff;
    text-shadow: 0 0 25px #fbbf24, 0 0 50px #ef4444, 0 2px 6px #000;
    animation: clashBannerPop 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes clashBannerPop {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
    75% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
    100% { transform: translate(-50%, -75px) scale(0.85); opacity: 0; }
}

.clash-lightning-arc {
    position: absolute;
    pointer-events: none;
    z-index: 195;
    transform-origin: center center;
    background: linear-gradient(90deg, transparent, #ffffff, var(--arc-color, #38bdf8), transparent);
    box-shadow: 0 0 18px var(--arc-color, #38bdf8);
    border-radius: 2px;
}

/* ========================================
   AAA VS Clash Face-off Screen
   ======================================== */

.vs-clash-overlay {
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 600;
    animation: clashEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.dark-theme .vs-clash-overlay {
    background: rgba(9, 13, 22, 0.9);
}

@keyframes clashEnter {
    from { opacity: 0; transform: scale(1.04); }
    to { opacity: 1; transform: scale(1); }
}

.vs-clash-fadeout {
    animation: clashExit 0.35s ease-in forwards !important;
}

@keyframes clashExit {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.96); }
}

.vs-card {
    width: 200px;
    padding: 1.5rem 1.2rem;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--border-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    position: relative;
}

html.dark-theme .vs-card {
    background: var(--bg-surface-elevated);
    box-shadow: var(--shadow-lg);
}

.vs-card-a {
    border-color: var(--fighter-a);
    box-shadow: 0 0 20px var(--fighter-a-glow);
    animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vs-card-b {
    border-color: var(--fighter-b);
    box-shadow: 0 0 20px var(--fighter-b-glow);
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.vs-card-tier-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(217, 119, 6, 0.15);
    color: var(--gold);
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.vs-card-char-glow {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.vs-card-a .vs-card-char-glow {
    color: var(--fighter-a);
    text-shadow: 0 2px 14px var(--fighter-a-glow);
}

.vs-card-b .vs-card-char-glow {
    color: var(--fighter-b);
    text-shadow: 0 2px 14px var(--fighter-b-glow);
}

.vs-card-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.vs-card-power {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
}

.vs-card-power span {
    color: var(--gold);
    font-weight: 800;
}

.vs-card-quote {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.5rem;
    width: 100%;
}

.vs-center-burst {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vs-text-3d {
    font-size: 3.2rem;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(135deg, #0f172a, var(--gold) 60%, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(217, 119, 6, 0.4));
    animation: pulseVs 0.8s ease-in-out infinite alternate;
}

html.dark-theme .vs-text-3d {
    background: linear-gradient(135deg, #ffffff, var(--gold-light) 60%, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
}

@keyframes pulseVs {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.vs-subtext {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.15em;
}

/* ========================================
   Awakening Ultimate Cut-in Banner
   ======================================== */

.ult-cutin-banner {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.8rem;
    background: rgba(10, 15, 28, 0.92);
    border: 1.5px solid var(--ult-color, #f59e0b);
    border-radius: var(--radius-full);
    box-shadow: 0 0 35px var(--ult-color, #f59e0b)88, inset 0 0 15px var(--ult-color, #f59e0b)44;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-shadow: 0 0 16px var(--ult-color, #f59e0b), 0 2px 4px #000;
    z-index: 800;
    pointer-events: none;
    animation: ultBadgePop 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ultBadgePop {
    0%   { transform: translate(-50%, -40%) scale(0.6); opacity: 0; }
    20%  { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    80%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -60%) scale(0.9); opacity: 0; }
}

/* ========================================
   Tower Floor Banner & Roguelike Modals
   ======================================== */

.tower-floor-banner {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid var(--gold);
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.3);
    border-radius: var(--radius-md);
    padding: 0.7rem 1.6rem;
    text-align: center;
    z-index: 300;
    animation: bannerPop 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.dark-theme .tower-floor-banner {
    background: rgba(18, 26, 43, 0.94);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

@keyframes bannerPop {
    0%   { opacity: 0; transform: translate(-50%, -15px) scale(0.9); }
    15%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
    80%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -15px) scale(0.95); }
}

.banner-floor-tag {
    font-size: 0.68rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 0.12em;
}

.banner-floor-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Boon Draft Modal */
.boon-draft-modal {
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    animation: fadeIn 0.3s ease-out;
}

html.dark-theme .boon-draft-modal {
    background: rgba(9, 13, 22, 0.88);
}

.boon-modal-content {
    width: 90%;
    max-width: 640px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

html.dark-theme .boon-modal-content {
    background: var(--bg-surface);
}

.boon-badge {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 0.15rem;
}

.boon-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text-primary);
}

.boon-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.boon-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.boon-card {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.2rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

html.dark-theme .boon-card {
    background: rgba(255, 255, 255, 0.03);
}

.boon-card:hover {
    background: rgba(254, 243, 199, 0.7);
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.2);
}

html.dark-theme .boon-card:hover {
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.boon-icon {
    font-size: 2rem;
}

.boon-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.boon-effect {
    font-size: 0.74rem;
    color: var(--text-secondary);
    flex: 1;
}

.boon-select-btn {
    width: 100%;
    padding: 0.4rem 0;
    background: var(--gold);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.boon-card:hover .boon-select-btn {
    background: #b45309;
    box-shadow: 0 0 10px var(--gold-glow);
}

/* ========================================
   Tournament Bracket Overlay
   ======================================== */

.tourn-bracket-overlay {
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    animation: fadeIn 0.3s ease-out;
}

html.dark-theme .tourn-bracket-overlay {
    background: rgba(9, 13, 22, 0.9);
}

.bracket-modal-content {
    width: 92%;
    max-width: 720px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

html.dark-theme .bracket-modal-content {
    background: var(--bg-surface);
}

.bracket-header {
    text-align: center;
}

.bracket-badge {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--fighter-b);
    margin-bottom: 0.15rem;
}

.bracket-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text-primary);
}

.bracket-tree-view {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.bracket-round {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.round-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
}

.bracket-match-card {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

html.dark-theme .bracket-match-card {
    background: rgba(255, 255, 255, 0.04);
}

.bracket-match-card.active-match {
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}

.p-item {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
}

html.dark-theme .p-item {
    background: rgba(0, 0, 0, 0.2);
}

.p-item.winner {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    font-weight: 800;
}

html.dark-theme .p-item.winner {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.bracket-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ========================================
   Manual Interactive Command Bar (Bottom HUD)
   ======================================== */

.manual-control-bar {
    height: 54px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 100;
    flex-shrink: 0;
}

html.dark-theme .manual-control-bar {
    background: rgba(9, 13, 22, 0.85);
    box-shadow: none;
}

.control-actions-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

html.dark-theme .control-btn {
    background: rgba(255, 255, 255, 0.06);
}

.control-btn:hover {
    background: rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

html.dark-theme .control-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.control-btn.auto-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #059669;
}

html.dark-theme .control-btn.auto-btn.active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.control-btn.ult-btn {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.3);
    color: #b45309;
}

html.dark-theme .control-btn.ult-btn {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--gold-light);
}

.control-btn.ult-btn.ready {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(217, 119, 6, 0.6);
    animation: pulseEnergy 1s infinite alternate;
}

.control-btn .key-hint {
    opacity: 0.65;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .control-btn .key-hint {
        display: none !important;
    }
}

/* ========================================
   Combat Log Drawer
   ======================================== */

.combat-log-drawer {
    position: fixed;
    right: 14px;
    bottom: 68px;
    width: 300px;
    height: 220px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark-theme .combat-log-drawer {
    background: rgba(18, 26, 43, 0.92);
}

.combat-log-drawer.collapsed {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.log-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.log-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.combat-log-feed {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.4;
}

.log-entry {
    display: flex;
    gap: 0.35rem;
}

.log-time {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    min-width: 26px;
}

.log-text {
    color: var(--text-secondary);
}

/* ========================================
   Victory & Analytics Screen
   ======================================== */

#game-over-screen {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 950;
    animation: fadeIn 0.3s ease-out;
}

html.dark-theme .game-over-screen {
    background: rgba(5, 8, 16, 0.92);
}

.result-modal {
    width: 90%;
    max-width: 420px;
    padding: 2.6rem 2.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    text-align: center;
    background: linear-gradient(180deg, #131b2e 0%, #0a0f1d 100%);
    border: 1.5px solid rgba(251, 191, 36, 0.45);
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-top-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.trophy-badge {
    font-size: 3.6rem;
    filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.8));
    animation: trophyFloat 2.5s ease-in-out infinite alternate;
}

@keyframes trophyFloat {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-8px) scale(1.08); }
}

.winner-avatar {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin: 0.2rem 0;
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.15);
    border: 1.5px solid #fbbf24;
    text-shadow: 0 0 20px #fbbf24, 0 0 40px rgba(245, 158, 11, 0.8), 0 2px 4px #000;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3), inset 0 0 15px rgba(245, 158, 11, 0.2);
}

.winner-announcement {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fef08a;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.8), 0 0 40px #f59e0b, 0 2px 4px #000;
}

.result-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.primary-action-btn {
    width: 100%;
    padding: 1rem 1.6rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-family: inherit;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.primary-action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 40px rgba(245, 158, 11, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    filter: brightness(1.15);
}

.secondary-action-btn {
    padding: 0.68rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

html.dark-theme .secondary-action-btn {
    background: rgba(255, 255, 255, 0.06);
}

.secondary-action-btn:hover {
    background: rgba(15, 23, 42, 0.08);
}

.subtle-action-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.subtle-action-btn:hover {
    color: var(--text-primary);
}

/* ========================================
   Comprehensive Mobile Responsive Queries
   ======================================== */

@media (max-width: 768px) {
    /* Header optimization for mobile */
    .app-header {
        height: 48px;
        padding: 0 0.6rem;
    }

    .app-logo .logo-title {
        font-size: 0.88rem;
    }

    .header-right {
        gap: 0.2rem;
    }

    .header-btn {
        padding: 0.28rem 0.45rem;
        font-size: 0.72rem;
        gap: 0.15rem;
    }

    .header-btn.icon-only {
        padding: 0.28rem 0.4rem;
        font-size: 0.8rem;
    }

    .battle-top-hud {
        top: 14px;
        width: calc(100% - 20px);
        max-width: 480px;
        padding: 0.5rem 0.85rem;
        gap: 0.6rem;
        border-radius: var(--radius-full);
    }

    .hud-fighter-name {
        font-size: 0.82rem;
        max-width: 85px;
    }

    .hud-hp-num {
        font-size: 0.68rem;
    }

    .hud-bar-container.hp {
        height: 8px;
    }

    .hud-bar-container.ult {
        height: 3px;
    }

    .hud-vs-badge {
        font-size: 0.72rem;
        padding: 0.25rem 0.45rem;
    }

    .game-container {
        padding-top: 0;
    }

    /* Setup Screen on Mobile */
    #setup-screen {
        width: 92%;
        max-width: 380px;
        padding: 1.6rem 1.2rem;
        gap: 1.1rem;
    }

    .setup-pill-tag {
        font-size: 0.6rem;
        padding: 2px 10px;
        letter-spacing: 0.16em;
    }

    .setup-title {
        font-size: 1.65rem;
    }

    .setup-players-deck {
        display: flex;
        align-items: center;
        gap: 0.45rem;
    }

    .player-card {
        padding: 0.75rem 0.75rem;
        gap: 0.25rem;
        border-radius: var(--radius-md);
    }

    .card-side-tag {
        font-size: 0.62rem;
    }

    .input-wrapper input {
        font-size: 1.05rem;
    }

    .vs-badge {
        font-size: 0.72rem;
        padding: 0.4rem 0.5rem;
    }

    .glow-primary-btn {
        padding: 0.88rem 1.2rem;
        font-size: 0.98rem;
    }

    /* Fighter & Battlefield on Mobile */
    .fighter-container {
        height: 80px;
        min-width: 55px;
    }

    .fighter-hud {
        width: 96px;
        top: -34px;
        gap: 2px;
    }

    .hud-top-row {
        font-size: 0.62rem;
    }

    .fighter-label {
        max-width: 50px;
    }

    .hp-text {
        font-size: 0.55rem;
    }

    .fighter-hud-bar.hp {
        height: 5px;
    }

    .fighter-hud-bar.ult {
        height: 3px;
    }

    .skill-slot {
        width: 13px;
        height: 13px;
    }

    .slot-icon {
        font-size: 0.45rem;
    }

    .damage-text {
        font-size: 0.95rem;
    }

    .damage-text.critical {
        font-size: 1.25rem;
    }

    .skill-popup {
        font-size: 0.85rem;
        padding: 0.18rem 0.45rem;
    }

    /* Bottom Manual Action Bar on Mobile */
    .manual-control-bar {
        height: 48px;
        padding: 0 0.4rem;
        gap: 0.25rem;
    }

    .control-actions-group {
        flex: 1;
        gap: 0.25rem;
        justify-content: space-between;
    }

    .control-btn {
        padding: 0.35rem 0.3rem;
        font-size: 0.68rem;
        gap: 0.15rem;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .control-btn.auto-btn {
        flex: none;
        min-width: 58px;
    }

    .control-btn .btn-label {
        font-size: 0.68rem;
    }

    /* VS Clash Face-off on Mobile: Horizontal Split */
    .vs-clash-overlay {
        flex-direction: row;
        gap: 0.4rem;
        padding: 0.6rem;
    }

    .vs-card {
        flex: 1;
        width: auto;
        min-width: 0;
        max-width: 155px;
        padding: 0.75rem 0.4rem;
        border-radius: var(--radius-md);
    }

    .vs-card-tier-badge {
        top: 4px;
        right: 5px;
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .vs-card-char-glow {
        font-size: 1.8rem;
        margin-bottom: 0.15rem;
    }

    .vs-card-title {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .vs-card-power {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }

    .vs-card-quote {
        font-size: 0.58rem;
        padding-top: 0.25rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .vs-center-burst {
        min-width: 32px;
    }

    .vs-text-3d {
        font-size: 1.7rem;
    }

    .vs-subtext {
        font-size: 0.55rem;
        letter-spacing: 0.05em;
    }

    /* Ultimate Cut-in on Mobile */
    .ult-cutin-banner {
        height: 75px;
        top: 30%;
    }

    .cutin-content {
        gap: 0.7rem;
        transform: skewX(12deg);
    }

    .cutin-avatar {
        font-size: 2rem;
    }

    .cutin-title {
        font-size: 0.7rem;
    }

    .cutin-ult-name {
        font-size: 1.25rem;
    }

    /* Boon Draft on Mobile */
    .boon-modal-content {
        width: 95%;
        padding: 1.2rem 0.8rem;
        gap: 0.75rem;
    }

    .boon-title {
        font-size: 1.25rem;
    }

    .boon-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .boon-card {
        padding: 0.65rem 0.8rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: 0.6rem;
    }

    .boon-icon {
        font-size: 1.5rem;
    }

    .boon-name {
        font-size: 0.88rem;
    }

    .boon-effect {
        font-size: 0.68rem;
    }

    .boon-select-btn {
        width: auto;
        padding: 0.35rem 0.75rem;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    /* Tournament Bracket on Mobile */
    .bracket-modal-content {
        width: 96%;
        padding: 1.1rem 0.8rem;
        gap: 0.7rem;
    }

    .bracket-title {
        font-size: 1.25rem;
    }

    .bracket-tree-view {
        flex-direction: column;
        gap: 0.6rem;
        max-height: 52vh;
        overflow-y: auto;
    }

    .bracket-round {
        gap: 0.35rem;
    }

    .round-label {
        font-size: 0.68rem;
        text-align: left;
    }

    .bracket-match-card {
        padding: 0.3rem 0.45rem;
    }

    .p-item {
        padding: 2px 5px;
        font-size: 0.68rem;
    }

    /* Combat Log Drawer on Mobile */
    .combat-log-drawer {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        bottom: 58px;
        height: 160px;
    }

    /* Result Modal on Mobile */
    .result-modal {
        width: 95%;
        padding: 1.1rem 0.8rem;
        gap: 0.7rem;
    }

    .trophy-badge { font-size: 1.8rem; }
    .winner-avatar { font-size: 2.8rem; }
    .winner-announcement { font-size: 1.1rem; }
    .match-time-badge { font-size: 0.68rem; }
    .analytics-card { padding: 0.65rem 0.7rem; gap: 0.45rem; }
    .analytics-row { font-size: 0.72rem; }
    .metric-label { font-size: 0.68rem; }
    .primary-action-btn { padding: 0.68rem; font-size: 0.85rem; }
    .secondary-action-btn { padding: 0.55rem; font-size: 0.78rem; }
}

@media (max-width: 400px) {
    .app-logo .logo-title {
        display: none;
    }
}
