:root {
    --bg-dark: #0a0d12;
    --primary: #ff5722;
    --primary-glow: rgba(255, 87, 34, 0.55);
    --primary-bright: #ff784e;
    --secondary: #00d4ff;
    --secondary-glow: rgba(0, 212, 255, 0.45);
    --accent: #10b981;
    --text-main: #f0f6fc;
    --text-muted: #8b9bb4;
    --glass-bg: rgba(18, 22, 28, 0.78);
    --glass-border: rgba(255, 100, 50, 0.22);
    --glass-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-heading);
    color: var(--text-main);
    touch-action: manipulation;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none;
}

@media (max-width: 768px) {
    /* Prevent iOS Safari and Chrome Android from zooming page on focus */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

#ui-root {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Panel Component */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 18px;
    pointer-events: auto;
}

/* Header */
#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    pointer-events: auto;
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-shadow: 0 0 16px var(--primary-glow);
}

.logo-text strong {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

.btn-icon:hover {
    transform: scale(1.08);
    background: rgba(255, 87, 34, 0.25);
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

/* Screen Management */
.screen {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

#screen-lobby {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 16px 48px 16px;
    width: 100%;
    pointer-events: auto;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
}

#screen-lobby::-webkit-scrollbar {
    width: 6px;
}
#screen-lobby::-webkit-scrollbar-track {
    background: transparent;
}
#screen-lobby::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
#screen-lobby::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 87, 34, 0.4);
}

.hidden {
    display: none !important;
}

/* Lobby Screen */
/* Header Telemetry */
.header-telemetry {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #cbd5e1;
    font-family: var(--font-mono);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.telemetry-sep {
    color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   FUTURISTIC LANDING COMMAND TERMINAL (SINGLE-WINDOW UNIFIED CARD)
   ========================================================================== */
.landing-command-station {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 660px;
    width: 95%;
    margin: 16px auto 40px auto;
    animation: fadeInScale 0.35s ease-out;
}

@media (max-width: 640px) {
    .landing-command-station {
        max-width: 100%;
        width: 100%;
        margin: 10px auto 24px auto;
    }
}

/* LEFT COLUMN: HERO WARZONE INTEL & SHOWCASE */
.landing-hero-col {
    flex: 1.15;
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: rgba(10, 16, 30, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), inset 0 0 24px rgba(255, 87, 34, 0.05);
}

.hero-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid #10b981;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #34d399;
    letter-spacing: 1px;
    margin-bottom: 12px;
    width: fit-content;
}

.pulse-beacon {
    box-shadow: 0 0 10px #10b981;
}

.landing-game-title {
    margin: 0 0 8px;
    line-height: 1.05;
}

.title-subhead {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #f59e0b;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.title-primary {
    display: block;
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-shadow: 0 0 24px rgba(255, 87, 34, 0.4);
}

.accent-title {
    background: linear-gradient(135deg, #ff8800, #ff3300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(255, 87, 34, 0.5);
}

.landing-tagline {
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

/* MIL-SAT Combat Telemetry HUD */
.warzone-telemetry-panel {
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
}

.telemetry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.telemetry-radar-tag {
    display: flex;
    align-items: center;
    gap: 7px;
}

.telemetry-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 1.4s infinite;
}

.telemetry-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #94a3b8;
    font-family: var(--font-mono);
}

.telemetry-freq {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.telemetry-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.telemetry-val {
    font-size: 1.35rem;
    font-weight: 900;
    font-family: var(--font-mono);
    line-height: 1.1;
}

.text-online {
    color: #34d399;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.text-battle {
    color: #f87171;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.35);
}

.text-standby {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.telemetry-lbl {
    font-size: 0.64rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 1px;
}

/* Tactical Feature Highlight Cards */
.tactical-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.feature-card {
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(255, 87, 34, 0.45);
    transform: translateY(-2px);
    background: rgba(255, 87, 34, 0.06);
}

.feature-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.feature-info strong {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 2px;
}

.feature-info small {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.25;
}

/* Controls Guide Strip */
.controls-guide-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-tag {
    font-size: 0.7rem;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
}

.guide-tag span {
    margin-right: 2px;
}

/* SINGLE UNIFIED COMMANDER TERMINAL CARD */
.landing-terminal-col {
    width: 100%;
    max-width: 660px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: rgba(8, 14, 28, 0.90);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 212, 255, 0.32);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 212, 255, 0.10);
    box-sizing: border-box;
}

.terminal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #cbd5e1;
    font-family: var(--font-mono);
}

.terminal-status-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid #00d4ff;
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* Terminal Nav Tabs */
.terminal-nav-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-tab {
    padding: 9px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.terminal-tab.active {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.25), rgba(255, 140, 0, 0.18));
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(255, 87, 34, 0.35);
}

.terminal-tab:hover:not(.active) {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.terminal-pane-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 14px;
}

/* Terminal Alert Banner */
.terminal-alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.78rem;
    line-height: 1.35;
    animation: fadeInScale 0.2s ease;
}

.terminal-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.terminal-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Form Group Terminal */
.form-group-terminal {
    margin-bottom: 12px;
}

.form-group-terminal label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 5px;
}

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 0.95rem;
    pointer-events: none;
    opacity: 0.7;
}

.input-icon-wrap input {
    width: 100%;
    padding: 10px 38px 10px 38px;
    background: rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.input-icon-wrap input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 12px rgba(255, 87, 34, 0.35);
    background: rgba(0, 0, 0, 0.7);
}

.btn-toggle-pass {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-toggle-pass:hover {
    opacity: 1;
}

.btn-terminal-action {
    width: 100%;
    padding: 12px;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: 8px;
    margin-top: 6px;
    letter-spacing: 0.4px;
}

.terminal-sublinks {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 0.75rem;
}

.terminal-sublinks a {
    color: #f59e0b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.terminal-sublinks a:hover {
    color: #fbbf24;
    text-decoration: underline;
}

.sublink-sep {
    color: rgba(255, 255, 255, 0.2);
}

.btn-link-demo {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link-demo:hover {
    color: #7dd3fc;
}

.terminal-hint-box {
    margin-top: 14px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    font-size: 0.72rem;
    color: #93c5fd;
    line-height: 1.4;
}

/* Inline OTP Terminal Pane */
.otp-instruction-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    color: #fed7aa;
}

.otp-badge-icon {
    font-size: 1.4rem;
}

.otp-instruction-banner strong {
    display: block;
    color: #ffffff;
    font-size: 0.84rem;
}

.otp-input-field {
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.6rem;
    letter-spacing: 8px;
    font-weight: 900;
    padding: 10px;
    background: rgba(0, 0, 0, 0.65);
    border: 2px dashed #ff471a;
    border-radius: 8px;
    color: #ffffff;
    transition: all 0.2s;
}

.otp-input-field:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 16px rgba(255, 71, 26, 0.5);
    outline: none;
}

.otp-sub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: space-between;
    align-items: center;
}

.auth-sub-telemetry {
    margin-bottom: 14px;
}

/* Commander Briefing Card (Post-Login WOW Info) */
.commander-briefing-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.12), rgba(0, 212, 255, 0.08));
    border: 1px solid rgba(255, 120, 50, 0.28);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 18px;
    text-align: left;
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.15);
}

.commander-avatar-wrap {
    position: relative;
}

.commander-rank-icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 2px;
}

.commander-identity {
    flex: 1;
}

.commander-greeting-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.commander-greeting {
    font-size: 0.65rem;
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 1.2px;
}

.badge-char-pill {
    background: rgba(255, 153, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 153, 0, 0.45);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.commander-callsign-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
}

.commander-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.badge-verified {
    font-size: 0.65rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 1px 6px;
}

.commander-rank-title {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.commander-rating-box {
    text-align: right;
    min-width: 90px;
}

.rating-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rating-value {
    font-size: 1.35rem;
    font-weight: 900;
    font-family: var(--font-mono);
    color: #ff9800;
    text-shadow: 0 0 12px rgba(255, 152, 0, 0.6);
}

.rating-tier-progress {
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.rating-tier-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800, #ff5722);
}

/* Daily Booster Card */
.daily-booster-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.12));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.booster-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.booster-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.booster-icon {
    font-size: 1.6rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.booster-text strong {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.booster-text small {
    display: block;
    color: #e2e8f0;
    font-size: 0.74rem;
    line-height: 1.3;
}

/* Enhanced Deploy Buttons */
.btn-deploy-pvp {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ff5722 0%, #b71c1c 100%);
    box-shadow: 0 8px 30px rgba(255, 87, 34, 0.45);
    border: 1px solid rgba(255, 180, 100, 0.4);
}

.btn-deploy-pvp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    animation: shineSweep 3s infinite;
}

@keyframes shineSweep {
    0% { left: -100%; }
    40%, 100% { left: 160%; }
}

.deploy-arrow {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffcc80;
    transition: transform 0.2s;
}

.btn-deploy-pvp:hover .deploy-arrow {
    transform: translateX(4px);
}

.btn-deploy-bot {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(59, 130, 246, 0.22) 100%);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-deploy-bot .deploy-arrow {
    color: #7dd3fc;
}

.btn-deploy-bot:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.32) 0%, rgba(59, 130, 246, 0.38) 100%);
    border-color: rgba(56, 189, 248, 0.85);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.btn-deploy-bot:hover .deploy-arrow {
    transform: translateX(4px);
}

.commander-footer-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.8rem;
}

.btn-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: color 0.15s;
    padding: 4px 6px;
}

.btn-link:hover {
    color: #fff;
    text-decoration: underline;
}

.btn-link.text-danger:hover {
    color: #ef4444;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.2);
}

.lobby-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.btn-primary, .btn-secondary, .btn-outline {
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 20px;
    text-align: left;
}

.btn-primary {
    background: linear-gradient(135deg, #ff5722, #d82b00);
    color: #fff;
    box-shadow: 0 8px 26px var(--primary-glow);
    border: 1px solid rgba(255, 200, 150, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px var(--primary-glow);
    background: linear-gradient(135deg, #ff7043, #e64a19);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 87, 34, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-icon-large {
    font-size: 1.8rem;
}

.btn-content strong {
    display: block;
    font-size: 1.05rem;
}

.btn-content small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.controls-guide {
    display: flex;
    justify-content: space-around;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Matchmaking Screen */
.matchmaking-card {
    padding: 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
}

.radar-scan {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 24px auto;
    border-radius: 50%;
    border: 2px solid rgba(255, 87, 34, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 87, 34, 0.7);
}

.radar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255, 87, 34, 0.6) 0deg, transparent 90deg);
    animation: rotateSweep 2s linear infinite;
}

.radar-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 14px var(--primary);
}

.mm-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 87, 34, 0.45);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffb74d;
    letter-spacing: 1px;
}

.mm-timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseBadge 1.4s infinite;
}

.mm-quick-bot-wrap {
    margin-top: 18px;
    animation: fadeIn 0.25s ease-out;
}

.btn-mm-instant-bot {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(255, 87, 34, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 10px 28px;
    margin-top: 20px;
}

.btn-outline:hover {
    border-color: #ff5722;
    color: #ff5722;
}

/* ==========================================================================
   ESPORTS DUEL BATTLE HEADER (Ultra-Compact, Top-Docked, Fixed Width HUD)
   ========================================================================== */
body.in-battle #game-header {
    display: none !important;
}

#hud-top.esports-battle-header {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 1080px;
    max-width: calc(100vw - 24px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    z-index: 50;
    pointer-events: none;
    box-sizing: border-box;
}

#hud-top.esports-battle-header * {
    pointer-events: auto;
    box-sizing: border-box;
}

/* Banner Halves (P1 on Left, P2 on Right) - Strictly Fixed Width */
.player-hud-banner {
    flex: 0 0 420px;
    width: 420px;
    height: auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 13, 22, 0.92) 100%);
    border-radius: 14px;
    padding: 15px;
    backdrop-filter: blur(14px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    box-sizing: border-box;
}

.player-hud-banner.p1-banner {
    border-left: 3px solid #f97316;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(249, 115, 22, 0.2);
}

.player-hud-banner.p2-banner {
    border-right: 3px solid #38bdf8;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(56, 189, 248, 0.2);
}

/* Ornate Circular Avatar Crest (Enlarged 64px for profile image clarity) */
.avatar-crest {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #1e293b 40%, #090d16 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.p1-crest {
    border: 3px solid #f97316;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.6), inset 0 0 10px rgba(220, 38, 38, 0.5);
}

.p2-crest {
    border: 3px solid #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.6), inset 0 0 10px rgba(2, 132, 199, 0.5);
}

.crest-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    line-height: 1;
    z-index: 2;
    border-radius: 50%;
    overflow: hidden;
}

.hud-crest-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* User requirement: "tidak perlu diberi info 'anda' atau 'lawan'" */
.crest-role-tag {
    display: none !important;
}

/* Banner Body */
.banner-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

/* Header Row: Identity, Card Count, HP Numbers - Strictly Fixed Sizes */
.player-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

.player-identity {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.p2-header-row .player-identity {
    justify-content: flex-end;
}

.banner-player-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    flex: 1 1 auto;
}

#hud-p2-name,
.p2-identity .banner-player-name {
    text-align: right;
}

/* Sub-bar Row: Character Name & 3 Mini Cards below Health Bar */
.player-sub-bar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: 3px;
}

.banner-char-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(239, 68, 68, 0.55);
    color: #fca5a5;
    flex-shrink: 0;
}

.p2-char-badge {
    background: rgba(14, 165, 233, 0.22);
    border: 1px solid rgba(14, 165, 233, 0.55);
    color: #7dd3fc;
}

/* Cards Count Badge (Deprecated - cards are directly shown in mini cards row) */
.cards-count-badge {
    display: none !important;
}

/* HP Numeric Display (Strict Fixed Width, Tabular Nums) */
.hp-number-display {
    flex: 0 0 52px;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    font-weight: 800;
    color: #f8fafc;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.p2-header-row .hp-number-display {
    text-align: left;
}

/* Health Bar Outer & Track */
.hp-bar-outer {
    width: 100%;
}

.hp-bar-track {
    width: 100%;
    height: 7px;
    background: rgba(8, 12, 20, 0.9);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
    position: relative;
}

.p1-hp-outer .hp-bar-track {
    border-color: rgba(249, 115, 22, 0.4);
}

.p2-hp-outer .hp-bar-track {
    border-color: rgba(56, 189, 248, 0.4);
}

.hp-bar-fill {
    height: 100%;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 3px;
}

.p1-hp-fill {
    background: linear-gradient(90deg, #991b1b 0%, #dc2626 40%, #f97316 75%, #fef08a 100%);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.p2-hp-fill {
    background: linear-gradient(90deg, #fef08a 0%, #38bdf8 30%, #0284c7 70%, #1e40af 100%);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.7);
}

.hp-bar-highlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
    border-radius: 3px 3px 0 0;
}

/* 3 Mini Cards Directly Below Health Indicator (LOGO ONLY) */
.hud-player-cards-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
}

.p2-cards {
    justify-content: flex-start;
}

/* Mini Card Container & 3D Flip (Compact 28px x 28px square, Logo Only) */
.hud-mini-card {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    perspective: 400px;
    cursor: default;
    border-radius: 6px;
    box-sizing: border-box;
}

.p1-cards .hud-mini-card.closed {
    cursor: pointer;
}

.p1-cards .hud-mini-card.closed:hover {
    transform: translateY(-2px);
    transition: transform 0.15s ease;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 6px;
}

/* When card is revealed/used: flip to front! */
.hud-mini-card.used .card-inner,
.hud-mini-card.revealed .card-inner {
    transform: rotateY(180deg);
}

/* When closed: show back face */
.hud-mini-card.closed .card-inner {
    transform: rotateY(0deg);
}

.card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Card Back (Closed / Sealed State - Rune Token) */
.card-face.card-back {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.p1-card-back {
    border-color: rgba(249, 115, 22, 0.45);
}

.p2-card-back {
    border-color: rgba(56, 189, 248, 0.45);
}

.card-seal {
    font-size: 0.95rem;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

/* Card Front (Revealed / Used State - LOGO ONLY) */
.card-face.card-front {
    transform: rotateY(180deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.card-face.card-front.card-attack {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(153, 27, 27, 0.98) 100%);
    border: 1.5px solid #f59e0b;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.card-face.card-front.card-shield {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.95) 0%, rgba(3, 105, 161, 0.98) 100%);
    border: 1.5px solid #38bdf8;
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
}

.card-face.card-front.card-heal {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.95) 0%, rgba(4, 120, 87, 0.98) 100%);
    border: 1.5px solid #34d399;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.card-icon {
    font-size: 0.95rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

/* Center Anchor: Match Status & Timer (Strict Fixed Width) */
.center-battle-status {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 10;
}

.battle-title-tag {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #c084fc;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.8);
    line-height: 1;
}

.match-timer-polygon {
    background: linear-gradient(180deg, #4c1d95 0%, #1e1b4b 100%);
    border: 1.5px solid #a855f7;
    border-radius: 8px;
    padding: 2px 14px;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5), inset 0 0 8px rgba(147, 51, 234, 0.4);
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.battle-clock {
    font-size: 1.25rem;
    font-weight: 900;
    font-family: var(--font-mono, monospace);
    color: #ffffff;
    text-shadow: 0 0 10px #e9d5ff;
    letter-spacing: 1px;
    line-height: 1.1;
    display: block;
}

.timer-flare {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmerTimer 3.5s infinite;
}

@keyframes shimmerTimer {
    0% { left: -100%; }
    25%, 100% { left: 200%; }
}

/* Row 1: Turn Timer Badge & Wind Badge centered ABOVE Turn Banner */
.center-timer-wind-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

/* Row 2: Turn Banner Pill centered on separate line BELOW Turn Timer */
.center-turn-banner-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hud-turn-pill,
.turn-banner {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.8px;
    padding: 3px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    white-space: nowrap;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
}

.hud-turn-pill.my-turn,
.turn-banner.my-turn {
    color: #4ade80;
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulseTurn 1.6s infinite;
}

.hud-turn-pill.opponent-turn,
.turn-banner.opponent-turn {
    color: #38bdf8;
    border-color: #0284c7;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.4);
}

.hud-turn-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
    color: #fef08a;
    white-space: nowrap;
}

.hud-wind-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
    color: #a5f3fc;
    white-space: nowrap;
}

/* Center 3-Second Animated Battle Countdown */
.battle-start-countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.battle-start-countdown.hidden {
    display: none !important;
}

.countdown-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.72) 0%, rgba(0, 0, 0, 0.45) 100%);
    backdrop-filter: blur(4px);
    animation: fadeInBackdrop 0.3s ease-out forwards;
}

.countdown-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: translateY(-20px);
}

.countdown-sub {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #ff9800;
    text-shadow: 0 0 14px rgba(255, 152, 0, 0.8);
    margin-bottom: 4px;
    text-transform: uppercase;
    animation: pulseSub 1s ease-in-out infinite;
}

.countdown-number {
    font-size: 7rem;
    font-weight: 900;
    line-height: 1;
    font-family: var(--font-display);
    color: #ffffff;
    background: linear-gradient(180deg, #ffffff 10%, #ff5722 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 35px rgba(255, 87, 34, 0.9)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.95));
}

.countdown-number.pop {
    animation: countPop 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.countdown-number.fire-text {
    font-size: 5.5rem;
    background: linear-gradient(180deg, #fff7ed 0%, #ef4444 55%, #b91c1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 45px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 20px #ffea00);
    letter-spacing: 3px;
}

.countdown-bar {
    width: 160px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #ff5722, transparent);
    margin-top: 14px;
    box-shadow: 0 0 12px var(--primary);
}

@keyframes countPop {
    0% {
        transform: scale(0.35) rotate(-5deg);
        opacity: 0;
    }
    40% {
        transform: scale(1.3) rotate(2deg);
        opacity: 1;
    }
    70% {
        transform: scale(1.0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.96);
        opacity: 0.9;
    }
}

@keyframes pulseSub {
    0%, 100% { opacity: 0.8; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes fadeInBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Bottom Controls */
#hud-bottom {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 960px;
    z-index: 50;
    pointer-events: none;
}

#hud-bottom * {
    pointer-events: auto;
}

/* ==========================================================================
   MOBILE CONSOLE GAMEPAD CHASSIS & TACTICAL CONTROLS
   ========================================================================== */
.controls-panel.console-gamepad-chassis {
    pointer-events: auto;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(9, 14, 26, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 2px solid rgba(255, 140, 0, 0.7);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 25px rgba(255, 87, 34, 0.15);
    padding: 10px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    backdrop-filter: blur(16px);
}

.console-top-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-brand-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.console-brand-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ff9800;
    text-transform: uppercase;
}

.console-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}

.console-frequency-txt {
    font-size: 0.65rem;
    color: #64748b;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.console-led-cluster {
    display: flex;
    gap: 6px;
}

.console-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.8;
}

.console-led.led-green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.console-led.led-amber { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.console-led.led-cyan  { background: #00d4ff; box-shadow: 0 0 6px #00d4ff; }

.console-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.35fr 1.35fr 1.1fr;
    gap: 14px;
    align-items: stretch;
}

.console-pod {
    background: rgba(6, 10, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.console-pill-badge {
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.45);
    color: #ffb74d;
    font-weight: 800;
    margin-right: 4px;
}

/* Console D-Pad Movement Housing (Depan / Belakang Rocker Pad) */
.console-dpad-housing {
    display: flex;
    gap: 4px;
    height: 58px;
    background: rgba(11, 16, 28, 0.9);
    border: 2px solid rgba(255, 140, 0, 0.35);
    border-radius: 14px;
    padding: 3px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 140, 0, 0.15);
}

.btn-console-move {
    flex: 1;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 140, 0, 0.22) 0%, rgba(180, 60, 0, 0.16) 100%);
    color: #ffb74d;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    padding: 2px 4px;
}

.btn-console-move .dpad-arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.btn-console-move .dpad-txt {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.btn-console-move .dpad-sub {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
}

.btn-console-move:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(255, 160, 0, 0.4) 0%, rgba(255, 87, 34, 0.35) 100%);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 140, 0, 0.35);
}

.btn-console-move:active:not(:disabled),
.btn-console-move.pressed {
    background: linear-gradient(180deg, #ff8c00 0%, #ff5722 100%);
    color: #ffffff;
    transform: translateY(2px);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.btn-console-move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dpad-divider {
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Stepper + Slider Row */
.console-slider-stepper-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.console-slider-track {
    flex: 1;
    display: flex;
    align-items: center;
}

.console-step-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.12s ease;
}

.console-step-btn:hover:not(:disabled) {
    border-color: #ff9800;
    color: #ffb74d;
    background: rgba(255, 152, 0, 0.25);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.console-step-btn:active:not(:disabled) {
    transform: scale(0.92);
    background: #ff5722;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 87, 34, 0.6);
}

/* Power Bar Preview */
.power-bar-preview {
    height: 8px;
    width: 100%;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 87, 34, 0.3);
    margin-top: 4px;
}

.power-fill-meter {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #f59e0b 55%, #ef4444 100%);
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
    transition: width 0.08s ease;
    border-radius: 6px;
}

.console-trigger-btn {
    min-height: 72px;
}

.control-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.control-value {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Custom Sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    outline: none;
    border: 1px solid rgba(255, 87, 34, 0.25);
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 14px var(--primary-glow);
    transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.angle-presets {
    display: flex;
    gap: 6px;
}

.btn-angle-preset {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-angle-preset:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Glowing Fire Button */
.btn-fire {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1 1 100%; /* fill the full height of its pod */
    min-height: 72px;
    border-radius: 16px;
    border: 1px solid rgba(255, 200, 150, 0.4);
    background: linear-gradient(135deg, #ff5722, #b71c1c);
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 32px var(--primary-glow);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn-fire:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 45px var(--primary);
    background: linear-gradient(135deg, #ff7043, #d32f2f);
}

.btn-fire:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-fire:disabled {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.45;
}

.fire-label {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.fire-hint {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    pointer-events: auto;
    overflow-y: auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

.modal-card {
    width: 90%;
    max-width: 420px;
    padding: 34px 28px;
    text-align: center;
    margin: auto 0;
    animation: fadeInScale 0.35s ease-out;
}

.result-badge {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.result-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.result-title.victory {
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.result-title.defeat {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.result-title.draw {
    color: #f59e0b;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
}

.result-reason {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-top: -4px;
    margin-bottom: 12px;
    font-weight: 500;
}

.rating-gain {
    color: #34d399;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.rating-loss {
    color: #f87171;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.rating-draw {
    color: #fbbf24;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.35);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-bright);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Leaderboard Modal */
.leaderboard-card {
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.leaderboard-container {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-rank {
    font-weight: 800;
    color: var(--primary);
    width: 32px;
}

.lb-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
    padding: 0 12px;
}

.lb-wins {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-right: 16px;
}

.lb-rating {
    font-weight: 700;
    color: #f59e0b;
    font-family: var(--font-mono);
}

/* Animations */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rotateSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseTurn {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.03); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

body.in-battle #canvas-container {
    touch-action: none;
}

/* Mobile Touch-Drag Aiming Telemetry Pill */
.touch-aim-hud {
    position: absolute;
    top: 106px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 26, 0.95));
    border: 1.5px solid rgba(255, 140, 0, 0.65);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 87, 34, 0.35);
    border-radius: 999px;
    padding: 6px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    backdrop-filter: blur(12px);
    animation: fadeInScale 0.15s ease-out;
}

.touch-aim-values {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono, monospace);
    font-size: 0.92rem;
    color: #f8fafc;
}

.touch-aim-chip strong {
    color: #fbbf24;
    font-weight: 900;
}

.touch-aim-sep {
    color: rgba(255, 255, 255, 0.3);
}

.touch-aim-sub {
    font-size: 0.62rem;
    color: #94a3b8;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Responsive Mobile Battle HUD & Ergonomic Dual-Thumb Controls */
@media (max-width: 768px) {
    /* Lobby Header & Character Roster Mobile Adjustments */
    #game-header {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 6px;
    }

    .logo {
        font-size: 1rem;
        gap: 6px;
    }

    .header-telemetry {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 4px 10px;
        font-size: 0.68rem;
        gap: 6px;
    }

    .header-actions {
        gap: 6px;
    }

    .btn-header-pill {
        padding: 5px 10px;
        font-size: 0.74rem;
        gap: 5px;
    }

    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .landing-hero-col {
        padding: 16px 14px;
    }

    .char-names-roster {
        grid-template-columns: repeat(5, minmax(56px, 1fr));
        gap: 4px;
    }

    .char-name-card {
        padding: 6px 2px;
    }

    .char-name-card .cnc-name {
        font-size: 0.58rem;
    }

    .char-name-card .cnc-role {
        display: none;
    }

    .touch-aim-hud {
        top: 68px;
        padding: 4px 14px;
    }

    .touch-aim-values {
        font-size: 0.82rem;
    }

    /* 1. Top Battle HUD: Ultra-Slim 1-Row Horizontal Header */
    #hud-top.esports-battle-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between;
        top: 6px;
        width: calc(100vw - 10px);
        max-width: calc(100vw - 10px);
        gap: 4px;
    }

    .player-hud-banner {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        min-height: 48px;
        padding: 5px 7px;
        gap: 6px;
        border-radius: 10px;
    }

    .avatar-crest {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        border-width: 2px;
    }

    .crest-avatar {
        font-size: 1rem;
    }

    .banner-body {
        gap: 2px;
    }

    .player-header-row {
        gap: 4px;
    }

    .banner-player-name {
        font-size: 0.7rem;
        max-width: 85px;
    }

    .hp-number-display {
        flex: 0 0 34px;
        width: 34px;
        min-width: 34px;
        max-width: 34px;
        font-size: 0.66rem;
    }

    .hp-bar-track {
        height: 5px;
    }

    .player-sub-bar-row {
        margin-top: 1px;
        gap: 4px;
    }

    .banner-char-badge {
        display: none;
    }

    .hud-player-cards-row {
        gap: 3px;
    }

    .hud-mini-card {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        border-radius: 4px;
    }

    .card-seal,
    .card-icon {
        font-size: 0.65rem;
    }

    .center-battle-status {
        flex: 0 0 auto;
        width: auto;
        min-width: 78px;
        max-width: 96px;
        gap: 2px;
    }

    .battle-title-tag {
        display: none;
    }

    .match-timer-polygon {
        padding: 1px 7px;
        border-radius: 6px;
    }

    .battle-clock {
        font-size: 0.82rem;
    }

    .center-timer-wind-row {
        gap: 3px;
    }

    .hud-turn-timer-badge,
    .hud-wind-badge {
        font-size: 0.58rem;
        padding: 1px 4px;
        border-radius: 5px;
        gap: 2px;
    }

    .hud-turn-pill,
    .turn-banner {
        font-size: 0.54rem;
        padding: 1.5px 6px;
        letter-spacing: 0.4px;
        border-radius: 6px;
    }

    /* 2. Special Power Cards Bar: 1-Row Compact Pills */
    #hud-bottom {
        bottom: 6px;
        width: calc(100vw - 10px);
    }

    .cards-bar {
        padding: 4px 6px;
        margin-bottom: 5px;
        gap: 4px;
        border-radius: 10px;
    }

    .cards-group,
    .cards-right-group {
        gap: 4px;
    }

    .card-btn {
        padding: 4px 6px;
        gap: 4px;
        border-radius: 8px;
    }

    .card-btn-icon {
        font-size: 0.92rem;
    }

    .card-title {
        font-size: 0.62rem;
        letter-spacing: 0.1px;
    }

    .card-stat {
        display: none;
    }

    .card-badge {
        font-size: 0.55rem;
        padding: 1px 3px;
        margin-left: 1px;
    }

    /* 3. Bottom Console Gamepad: Ergonomic Dual-Thumb Mobile Dock */
    .controls-panel.console-gamepad-chassis {
        padding: 4px 6px;
        border-radius: 12px;
        gap: 4px;
    }

    .console-top-strip,
    .angle-presets,
    .btn-console-move .dpad-sub,
    .fire-hint,
    .console-pill-badge {
        display: none !important;
    }

    .console-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 92px;
        grid-template-rows: auto auto;
        gap: 5px;
        align-items: stretch;
    }

    .angle-pod {
        grid-column: 1;
        grid-row: 1;
        padding: 3px 6px;
        gap: 2px;
    }

    .power-pod {
        grid-column: 2;
        grid-row: 1;
        padding: 3px 6px;
        gap: 2px;
    }

    .move-pod {
        grid-column: 1 / span 2;
        grid-row: 2;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .move-pod .control-header {
        display: none !important;
    }

    .fire-pod {
        grid-column: 3;
        grid-row: 1 / span 2;
        padding: 0;
    }

    .control-header {
        font-size: 0.60rem;
    }

    .control-value {
        font-size: 0.74rem;
    }

    .console-dpad-housing {
        height: 100%;
        min-height: 56px;
        padding: 2px;
        gap: 2px;
    }

    .btn-console-move .dpad-arrow {
        font-size: 0.95rem;
    }

    .btn-console-move .dpad-txt {
        font-size: 0.52rem;
        letter-spacing: 0;
    }

    .console-slider-stepper-wrap {
        gap: 4px;
    }

    .console-step-btn {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.90rem;
        border-radius: 5px;
    }

    input[type=range] {
        height: 6px;
    }

    input[type=range]::-webkit-slider-thumb {
        width: 17px;
        height: 17px;
    }

    .power-bar-preview {
        height: 3px;
        margin-top: 1px;
    }

    .btn-fire,
    .console-trigger-btn {
        height: 100%;
        min-height: 64px;
        border-radius: 10px;
        padding: 4px;
    }

    .fire-icon {
        font-size: 1.15rem;
        line-height: 1;
    }

    .fire-label {
        font-size: 0.82rem;
        margin-top: 1px;
    }
}

/* Extra-compact card labels on narrow portrait phones (<= 420px) */
@media (max-width: 420px) {
    .card-btn {
        padding: 3px 4px;
        gap: 2px;
    }

    .card-title {
        font-size: 0.54rem;
    }

    .card-btn-icon {
        font-size: 0.80rem;
    }

    .console-grid {
        grid-template-columns: 1fr 1fr 82px;
        gap: 4px;
    }
}

/* Mobile Landscape Optimization (Short Viewport Height <= 560px) */
@media (max-height: 560px) and (orientation: landscape), (max-height: 560px) and (pointer: coarse) {
    #hud-top.esports-battle-header {
        top: 2px;
        width: calc(100vw - 12px);
        gap: 6px;
    }

    .player-hud-banner {
        flex: 0 1 280px;
        min-height: 34px;
        padding: 3px 6px;
        gap: 5px;
    }

    .avatar-crest {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
    }

    .crest-avatar {
        font-size: 0.85rem;
    }

    .banner-player-name {
        font-size: 0.65rem;
        max-width: 75px;
    }

    .hp-number-display {
        font-size: 0.60rem;
    }

    .hp-bar-track {
        height: 4px;
    }

    .banner-char-badge,
    .battle-title-tag {
        display: none;
    }

    .hud-mini-card {
        flex: 0 0 15px;
        width: 15px;
        height: 15px;
    }

    #hud-bottom {
        bottom: 2px;
        width: calc(100vw - 12px);
        max-width: 860px;
    }

    .cards-bar {
        padding: 2px 6px;
        margin-bottom: 2px;
        border-radius: 8px;
    }

    .card-btn {
        padding: 2px 6px;
        gap: 3px;
        border-radius: 6px;
    }

    .card-title {
        font-size: 0.58rem;
    }

    .card-stat,
    .console-top-strip,
    .angle-presets,
    .fire-hint {
        display: none !important;
    }

    .controls-panel.console-gamepad-chassis {
        padding: 3px 8px;
        border-radius: 10px;
    }

    /* Single sleek inline bar on mobile landscape */
    .console-grid {
        grid-template-columns: 84px 1fr 1fr 88px;
        grid-template-rows: 1fr;
        gap: 5px;
        align-items: center;
    }

    .move-pod {
        grid-column: 1;
        grid-row: 1;
        padding: 2px 4px;
    }

    .angle-pod {
        grid-column: 2;
        grid-row: 1;
        padding: 2px 6px;
    }

    .power-pod {
        grid-column: 3;
        grid-row: 1;
        padding: 2px 6px;
    }

    .fire-pod {
        grid-column: 4;
        grid-row: 1;
        padding: 0;
    }

    .console-dpad-housing {
        min-height: 38px;
        height: 38px;
        padding: 1px;
    }

    .btn-console-move .dpad-arrow {
        font-size: 0.88rem;
    }

    .btn-fire,
    .console-trigger-btn {
        min-height: 38px;
        height: 38px;
        flex-direction: row;
        gap: 5px;
        padding: 2px 8px;
        border-radius: 8px;
    }

    .fire-icon {
        font-size: 1.05rem;
    }

    .fire-label {
        font-size: 0.80rem;
        margin-top: 0;
    }
}

/* ==========================================================================
   AUTHENTICATION & DOSSIER MODALS
   ========================================================================== */
.btn-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 20px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f1f5f9;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.btn-header-pill:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 71, 26, 0.5);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 71, 26, 0.3);
    transform: translateY(-1px);
}

.auth-pill {
    background: #3b1a0d;
    border-color: #ff7a3d;
    color: #ffd2b3;
}

.auth-pill:hover {
    background: #5a2610;
    border-color: #ff9d66;
    color: #ffffff;
}

.auth-pill.logged-in {
    background: #06382a;
    border-color: #34d399;
    color: #a7f3d0;
}

.badge-pill {
    background: #ff3b14;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(255, 59, 20, 0.6);
}

.auth-modal-card {
    max-width: 480px;
    width: 92%;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 71, 26, 0.2);
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.auth-alert {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    animation: fadeInScale 0.2s ease;
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.auth-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #94a3b8;
}

.form-group input,
.form-group textarea {
    padding: 12px 14px;
    background: rgba(11, 17, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff471a;
    box-shadow: 0 0 12px rgba(255, 71, 26, 0.4);
    background: rgba(15, 23, 42, 0.95);
}

.otp-input {
    font-family: var(--font-mono) !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 12px !important;
    text-align: center !important;
    color: #ff9d66 !important;
    padding: 14px !important;
    border: 2px dashed rgba(255, 71, 26, 0.5) !important;
    background: rgba(11, 17, 32, 0.95) !important;
}

.otp-input:focus {
    border-style: solid !important;
    border-color: #ff471a !important;
    box-shadow: 0 0 20px rgba(255, 71, 26, 0.6) !important;
}

.otp-instruction-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(255, 71, 26, 0.15);
    border: 1px solid #ff471a;
    color: #ff8c00;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.success-badge-top {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.otp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}

.otp-hint-box {
    margin-top: 18px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    line-height: 1.4;
}

.auth-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 0.82rem;
}

.auth-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links a strong {
    color: #ff8c00;
}

.auth-links a:hover {
    color: #ffffff;
}

.btn-block {
    width: 100%;
    margin-top: 6px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.text-center {
    text-align: center;
}

.highlight-text {
    color: #ff8c00;
}

.text-subtle {
    color: #64748b;
    font-size: 0.8rem;
    text-decoration: none;
}

.text-subtle:hover {
    color: #cbd5e1;
}

.form-row {
    display: flex;
    gap: 12px;
}

.flex-1 {
    flex: 1;
}

.modal-actions-split {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.modal-actions-split button {
    flex: 1;
}

.avatar-select-strip {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.avatar-choice {
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-choice:hover {
    border-color: rgba(255, 71, 26, 0.4);
    color: #ffffff;
}

.avatar-choice.selected {
    background: linear-gradient(135deg, rgba(255, 71, 26, 0.3), rgba(255, 140, 0, 0.2));
    border-color: #ff471a;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 71, 26, 0.4);
}

.avatar-upload-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(11, 17, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
}

.avatar-crop-container {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 2px solid #ff5722;
    box-shadow: 0 0 14px rgba(255, 87, 34, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-preview-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-action-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.avatar-size-note {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.3;
}


/* ==========================================================================
   MAILBOX MODAL (DEV QUEUE VIEWER)
   ========================================================================== */
.mailbox-card {
    max-width: 720px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(59, 130, 246, 0.25);
}

.mailbox-title-wrap h2 {
    margin: 0;
    font-size: 1.25rem;
}

.mailbox-subtitle {
    color: #64748b;
    font-size: 0.78rem;
}

.header-right-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mailbox-items {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    padding-right: 4px;
}

.mailbox-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.mail-item {
    background: rgba(11, 17, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
}

.mail-item:hover {
    border-color: rgba(255, 71, 26, 0.4);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.mail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mail-subject {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f1f5f9;
}

.mail-time {
    font-size: 0.72rem;
    color: #64748b;
    font-family: var(--font-mono);
}

.mail-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.mail-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.mail-otp-badge {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    color: #ff8c00;
    letter-spacing: 2px;
    padding: 2px 8px;
    background: rgba(255, 71, 26, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(255, 71, 26, 0.3);
}

.mail-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-subject {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
}

.mailbox-iframe {
    width: 100%;
    height: 480px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 14px;
    background: #0b0f19;
}

/* ==========================================================================
   FLOATING LIVE COMMS NOTIFICATION TOAST
   ========================================================================== */
.comms-toast {
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 105;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(11, 17, 32, 0.96);
    border: 1px solid #10b981;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 24px rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-radar-icon {
    font-size: 1.5rem;
    line-height: 1;
    animation: pulseDot 1.2s infinite;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #10b981;
    font-family: var(--font-mono);
}

.toast-text {
    font-size: 0.82rem;
    color: #f1f5f9;
}

.toast-text strong {
    color: #ff8c00;
    font-family: var(--font-mono);
    letter-spacing: 2px;
    font-size: 0.95rem;
}

.toast-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.btn-xs {
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    border-radius: 6px;
}

.btn-icon-xs {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s;
}

.btn-icon-xs:hover {
    color: #ffffff;
}

/* ==========================================================================
   NUSANTARA CHARACTER SELECTION CARDS & SPECIAL POWER CARDS SYSTEM
   ========================================================================== */

/* Character Selection Grid in Registration & Terminal */
.char-select-section {
    margin-top: 14px;
    margin-bottom: 14px;
}

.char-section-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

/* ==========================================================================
   INTERACTIVE CHARACTER SLIDER & SPIDER (RADAR) CHART
   ========================================================================== */
.char-slider-section {
    margin-bottom: 16px;
}

.char-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.char-slider-header .char-section-label {
    margin-bottom: 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.char-slider-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-char-nav {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.btn-char-nav:hover {
    background: #ff5722;
    border-color: #ff7043;
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

.char-slider-counter {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    font-weight: 800;
    color: #fbbf24;
    min-width: 38px;
    text-align: center;
}

/* Quick Select Thumbnail Strip */
.char-thumbs-strip {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.char-thumbs-strip::-webkit-scrollbar {
    height: 3px;
}

.char-thumbs-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.char-thumb-btn {
    flex: 1;
    min-width: 80px;
    padding: 6px 4px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.char-thumb-btn .thumb-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.char-thumb-btn .thumb-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-thumb-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 140, 0, 0.4);
    transform: translateY(-1px);
}

.char-thumb-btn.active {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.25), rgba(255, 140, 0, 0.15));
    border-color: #ffaa00;
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.35);
}

.char-thumb-btn.active .thumb-name {
    color: #fff;
    font-weight: 800;
}

/* Showcase Stage: 2 Columns Side-by-Side */
.char-showcase-stage {
    display: flex;
    gap: 12px;
    align-items: stretch;
    background: rgba(10, 16, 26, 0.75);
    border: 1.5px solid rgba(255, 170, 0, 0.35);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 0 20px rgba(255, 140, 0, 0.05);
}

@media (max-width: 500px) {
    .char-showcase-stage {
        flex-direction: column;
    }
}

/* Left: Character Portrait Box */
.char-portrait-box {
    flex: 0 0 185px;
    width: 185px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.char-img-frame {
    width: 100%;
    height: 190px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
    background: #090d16;
}

.char-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: opacity 0.25s ease, transform 0.35s ease;
}

.char-showcase-img.fade-switch {
    opacity: 0.3;
    transform: scale(0.96);
}

.char-img-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(9, 13, 22, 0.95) 100%);
    pointer-events: none;
}

.char-role-badge {
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: 8px;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #fef08a;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-selected-pill {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #0b111a;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.char-portrait-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.char-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.char-badge-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.char-showcase-name {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.6px;
}

.char-showcase-desc {
    margin: 0;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* Right: Spider / Radar Chart Box */
.char-spider-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.spider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spider-title {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #cbd5e1;
}

.spider-rating-badge {
    font-family: var(--font-mono, monospace);
    font-size: 0.68rem;
    font-weight: 900;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 1px 6px;
    border-radius: 4px;
}

.spider-svg-wrap {
    width: 100%;
    max-width: 210px;
    margin: 0 auto;
    position: relative;
}

.spider-chart-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.spider-ring {
    fill: none;
    stroke: rgba(255, 255, 255, 0.09);
    stroke-width: 1;
}

.spider-ring.ring-5 {
    stroke: rgba(0, 212, 255, 0.25);
    stroke-width: 1.2;
}

.spider-spoke {
    stroke: rgba(255, 255, 255, 0.12);
    stroke-dasharray: 2, 2;
    stroke-width: 1;
}

.spider-stat-polygon {
    fill: url(#spiderFillGrad);
    stroke: #ff9900;
    stroke-width: 2;
    stroke-linejoin: round;
    transition: points 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spider-dot {
    fill: #ffd54f;
    stroke: #ff6d00;
    stroke-width: 1.5;
    transition: cx 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), cy 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spider-label {
    font-size: 8px;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
    fill: #94a3b8;
    letter-spacing: 0.3px;
}

/* Stat Breakdown Pills */
.spider-stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 4px;
}

.spider-stat-pill {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.64rem;
}

.spider-stat-pill .lbl {
    color: #94a3b8;
    font-weight: 700;
}

.spider-stat-pill .val {
    color: #ffb74d;
    font-weight: 900;
    font-family: var(--font-mono, monospace);
}

.char-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
    border-radius: 12px;
    background: rgba(10, 16, 26, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.char-card {
    background: rgba(18, 26, 40, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.char-card:hover {
    background: rgba(30, 42, 64, 0.9);
    border-color: rgba(255, 170, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 136, 0, 0.2);
}

.char-card.selected {
    background: linear-gradient(145deg, rgba(255, 140, 0, 0.22), rgba(20, 30, 48, 0.95));
    border-color: #ffaa00;
    box-shadow: 0 0 18px rgba(255, 170, 0, 0.35), inset 0 0 12px rgba(255, 170, 0, 0.15);
}

.char-card.selected::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ffaa00;
    color: #0b111a;
    font-weight: 900;
    font-size: 0.68rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.char-card-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.char-card-identity {
    display: flex;
    flex-direction: column;
}

.char-card-identity strong {
    font-size: 0.78rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.char-card-identity small {
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.2;
}

.char-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
}

.stat-pill {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 5px;
    padding: 2px 5px;
    font-size: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-lbl {
    color: #94a3b8;
}

.stat-val {
    color: #ffb74d;
    font-weight: 800;
}

/* ==========================================================================
   SPECIAL POWER CARDS BAR (HUD BATTLE)
   ========================================================================== */
.cards-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(10, 16, 26, 0.75);
    border: 1px solid rgba(255, 170, 0, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.cards-bar::-webkit-scrollbar {
    display: none;
}

.enemy-cards-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.enemy-cards-icon {
    font-size: 1.2rem;
}

.enemy-cards-label {
    font-weight: 600;
}

.enemy-cards-val {
    color: #00f0ff;
    font-size: 1.05rem;
    font-weight: 900;
}

.cards-total {
    color: #64748b;
    font-size: 0.75rem;
}

.cards-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(18, 26, 40, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.card-attack {
    border-color: rgba(255, 68, 68, 0.45);
}
.card-attack:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.35);
    border-color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

.card-shield {
    border-color: rgba(0, 240, 255, 0.45);
}
.card-shield:hover:not(:disabled) {
    background: rgba(0, 200, 255, 0.28);
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.card-heal {
    border-color: rgba(34, 197, 94, 0.45);
}
.card-heal:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.28);
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.card-btn:disabled,
.card-btn.used {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.7);
    border-color: rgba(255, 255, 255, 0.08);
    transform: none !important;
}

.card-btn-icon {
    font-size: 1.3rem;
}

.card-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.card-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.card-stat {
    font-size: 0.65rem;
    color: #cbd5e1;
}

.card-badge {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 2px 5px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #ffaa00;
    margin-left: 4px;
}

.active-buffs-list {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
}

.buff-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    animation: pulseBadge 1.8s infinite;
}

.buff-shield {
    background: rgba(0, 240, 255, 0.22);
    border: 1px solid #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.buff-attack {
    background: rgba(255, 68, 68, 0.25);
    border: 1px solid #ff4444;
    color: #ff6666;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.35);
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.05); opacity: 1; }
}

.card-btn.buff-active {
    border-color: #38bdf8 !important;
    background: rgba(14, 165, 233, 0.28) !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.6), inset 0 0 8px rgba(56, 189, 248, 0.3) !important;
    animation: buffGlowPulse 1.4s infinite alternate !important;
    cursor: not-allowed !important;
    opacity: 0.95 !important;
}

.card-btn.buff-active.card-attack {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.28) !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.6), inset 0 0 8px rgba(245, 158, 11, 0.3) !important;
}

@keyframes buffGlowPulse {
    0% { filter: brightness(1); transform: scale(0.97); }
    100% { filter: brightness(1.25); transform: scale(1.02); }
}

/* Combat Event Announcement Banner */
.combat-banner {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(8, 16, 28, 0.94), rgba(24, 34, 52, 0.92));
    border: 1.5px solid rgba(255, 170, 0, 0.7);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 170, 0, 0.3);
    border-radius: 30px;
    padding: 10px 28px;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.6px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.combat-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   TURN TIMEOUT WARNING BADGE & CRITICAL TIMER (NON-INTRUSIVE)
   ========================================================================== */
.fire-col,
.fire-pod {
    position: relative;
    height: 100%;
}

.timeout-warning-badge {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(254, 202, 202, 0.8);
    pointer-events: none;
    z-index: 25;
    animation: warnBadgePulse 0.4s infinite alternate ease-in-out;
}

@keyframes warnBadgePulse {
    from {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    }
    to {
        transform: translateX(-50%) scale(1.08);
        box-shadow: 0 0 22px rgba(239, 68, 68, 1);
    }
}

.timer-critical {
    color: #ef4444 !important;
    text-shadow: 0 0 14px rgba(239, 68, 68, 0.9) !important;
    animation: warnTimerPulse 0.35s infinite alternate ease-in-out !important;
}

@keyframes warnTimerPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.15);
    }
}

.pulse-banner-warn {
    border-color: rgba(239, 68, 68, 0.85) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
    color: #fca5a5 !important;
    animation: warnTimerPulse 0.4s infinite alternate ease-in-out !important;
}

/* ==========================================================================
   INDONESIAN CULTURAL CHARACTER SLIDER & SPIDER (RADAR) CHART
   ========================================================================== */
.char-slider-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
    width: 100%;
}

.char-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.char-header-title-wrap {
    display: flex;
    flex-direction: column;
}

.char-slider-header .char-section-label {
    font-size: 0.88rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    margin: 0;
}

.char-header-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 1px;
}

.char-slider-counter {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.76rem;
    font-weight: 800;
    color: #f59e0b;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 1px;
}

/* 1. CLEAR CHARACTER NAMES SELECTOR ROSTER (ALL 5 VISIBLE) */
.char-names-roster {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    width: 100%;
    margin-top: 2px;
}

.char-name-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-sizing: border-box;
}

.char-name-card .cnc-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    line-height: 1;
}

.char-name-card .cnc-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 100%;
}

.char-name-card .cnc-name {
    font-size: 0.7rem;
    font-weight: 900;
    color: #e2e8f0;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.char-name-card .cnc-role {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1.1;
}

.char-name-card .cnc-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #10b981;
    color: #064e3b;
    font-size: 0.55rem;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
}

.char-name-card:hover {
    border-color: rgba(245, 158, 11, 0.6);
    background: rgba(30, 41, 59, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.char-name-card.active {
    border-color: #f59e0b;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.3), rgba(220, 38, 38, 0.22));
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), inset 0 0 10px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}

.char-name-card.active .cnc-name {
    color: #fef08a;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

.char-name-card.active .cnc-role {
    color: #fef3c7;
}

.char-name-card.active .cnc-check {
    display: flex;
}

/* 2. INTERACTIVE SLIDER CONTROLS WITH PREV/NEXT NAMES */
.char-slider-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
}

.btn-char-slide {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.9), rgba(11, 19, 32, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-char-slide.next {
    justify-content: flex-end;
}

.btn-char-slide:hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(20, 30, 48, 0.95));
    color: #ffffff;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.btn-char-slide:active {
    transform: scale(0.97);
}

.slide-nav-arr {
    font-size: 0.95rem;
    color: #f59e0b;
    font-weight: 900;
}

.slide-nav-text {
    display: flex;
    flex-direction: column;
}

.slide-nav-sub {
    font-size: 0.58rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}

.slide-nav-name {
    font-size: 0.74rem;
    color: #fef08a;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.slider-center-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.slider-dots-strip {
    display: flex;
    gap: 5px;
    align-items: center;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-dot.active {
    background: #f59e0b;
    width: 20px;
    border-radius: 999px;
    box-shadow: 0 0 10px #f59e0b;
}

/* Character Showcase Stage */
.char-showcase-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: linear-gradient(145deg, rgba(11, 19, 32, 0.92), rgba(20, 30, 48, 0.96));
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), inset 0 0 30px rgba(245, 158, 11, 0.08);
    position: relative;
    overflow: hidden;
}

.char-showcase-stage::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Left Side: Portrait Box */
.char-portrait-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.char-img-frame {
    position: relative;
    width: 100%;
    height: 195px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    background: #0b111a;
}

.char-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.char-showcase-img.switching {
    opacity: 0.25;
    transform: scale(0.95);
}

.char-img-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 45%, rgba(10, 16, 26, 0.92) 100%);
    pointer-events: none;
}

.char-role-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(8, 14, 24, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.65);
    color: #fef08a;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.char-selected-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    color: #064e3b;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
    letter-spacing: 0.5px;
    pointer-events: none;
}

.char-portrait-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.char-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.char-badge-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.char-showcase-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.6px;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.char-showcase-desc {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* Right Side: Spider / Radar Chart Box */
.char-spider-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.spider-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spider-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.spider-rating-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #0b111a;
    font-weight: 900;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    letter-spacing: 0.4px;
}

.spider-svg-wrap {
    width: 100%;
    max-width: 175px;
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spider-chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.spider-ring {
    fill: none;
    stroke: rgba(148, 163, 184, 0.2);
    stroke-width: 0.8;
}

.spider-ring.ring-5 {
    stroke: rgba(245, 158, 11, 0.35);
    stroke-width: 1.1;
}

.spider-spoke {
    stroke: rgba(148, 163, 184, 0.25);
    stroke-width: 0.8;
    stroke-dasharray: 2 2;
}

.spider-stat-polygon {
    fill: url(#spiderFillGrad);
    stroke: #ff9900;
    stroke-width: 2.2;
    stroke-linejoin: round;
    transition: points 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spider-dot {
    fill: #ffffff;
    stroke: #ff7700;
    stroke-width: 2;
    transition: cx 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), cy 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 4px rgba(255, 170, 0, 0.8));
}

.spider-label {
    fill: #cbd5e1;
    font-size: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
}

/* Stat Breakdown Mini Pills */
.spider-stats-strip {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    margin-top: 4px;
}

.spider-stat-pill {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 2px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.62rem;
}

.spider-stat-pill .lbl {
    color: #94a3b8;
    font-weight: 700;
}

.spider-stat-pill .val {
    color: #fef08a;
    font-weight: 800;
}

@media (max-width: 580px) {
    .char-showcase-stage {
        grid-template-columns: 1fr;
    }
    .char-img-frame {
        height: 160px;
    }
    .spider-svg-wrap {
        max-width: 150px;
    }
}

/* ========================================================
   TACTICAL COMPACT CARD ACTIVATION TOAST (NEVER BLOCKS BATTLEFIELD)
   ======================================================== */
.card-activation-splash {
    position: fixed;
    top: 74px;
    bottom: auto !important;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.25s ease;
    width: auto;
    max-width: 92vw;
}

.card-activation-splash.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.card-splash-backdrop {
    display: none !important; /* Zero blur, zero darkening */
}

.card-splash-card {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    min-width: 0;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.94);
    border-radius: 999px;
    border: 1.5px solid rgba(245, 158, 11, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.35);
    opacity: 0;
    animation: splashToastEnterExit 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

@keyframes splashToastEnterExit {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.9);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Card Themes */
.card-splash-card.theme-attack {
    border-color: rgba(245, 158, 11, 0.85);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5), 0 0 18px rgba(245, 158, 11, 0.4);
}
.card-splash-card.theme-attack .card-splash-icon-wrap {
    background: linear-gradient(135deg, #7f1d1d, #b91c1c);
    border-color: #f59e0b;
    color: #fef08a;
}
.card-splash-card.theme-attack .card-splash-tag {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
}
.card-splash-card.theme-attack .card-splash-title {
    background: linear-gradient(90deg, #fef08a, #f97316, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-splash-card.theme-shield {
    border-color: rgba(56, 189, 248, 0.85);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.5), 0 0 18px rgba(99, 102, 241, 0.4);
}
.card-splash-card.theme-shield .card-splash-icon-wrap {
    background: linear-gradient(135deg, #0c4a6e, #0284c7);
    border-color: #38bdf8;
    color: #e0f2fe;
}
.card-splash-card.theme-shield .card-splash-tag {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
}
.card-splash-card.theme-shield .card-splash-title {
    background: linear-gradient(90deg, #e0f2fe, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-splash-card.theme-healing {
    border-color: rgba(74, 222, 128, 0.85);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5), 0 0 18px rgba(16, 185, 129, 0.4);
}
.card-splash-card.theme-healing .card-splash-icon-wrap {
    background: linear-gradient(135deg, #14532d, #15803d);
    border-color: #4ade80;
    color: #bbf7d0;
}
.card-splash-card.theme-healing .card-splash-tag {
    color: #86efac;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(74, 222, 128, 0.4);
}
.card-splash-card.theme-healing .card-splash-title {
    background: linear-gradient(90deg, #dcfce7, #4ade80, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-splash-glow,
.card-splash-pulse-ring,
.card-splash-desc,
.card-splash-author {
    display: none !important;
}

.card-splash-icon-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
}

.card-splash-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.card-splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.card-splash-tag {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid;
}

.card-splash-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

/* ========================================================
   HEALTH BAR HEAL PULSE & FLOATING NUMBERS
   ======================================================== */
@keyframes hpHealPulseAnimation {
    0% {
        box-shadow: 0 0 4px #22c55e, 0 0 12px #22c55e;
        filter: brightness(1.2);
    }
    40% {
        box-shadow: 0 0 25px #4ade80, 0 0 45px #22c55e, inset 0 0 15px rgba(255, 255, 255, 0.6);
        filter: brightness(1.7);
    }
    100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
        filter: brightness(1);
    }
}

.hp-heal-active {
    animation: hpHealPulseAnimation 1.4s ease-out forwards !important;
}

@keyframes floatHealNumber {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.6);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -10px) scale(1.25);
    }
    75% {
        opacity: 1;
        transform: translate(-50%, -26px) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -38px) scale(0.9);
    }
}

.floating-heal-text {
    position: absolute;
    left: 50%;
    top: -8px;
    font-size: 1.25rem;
    font-weight: 900;
    color: #4ade80;
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.95), 0 0 24px rgba(34, 197, 94, 0.8), 0 2px 4px #000;
    pointer-events: none;
    z-index: 200;
    animation: floatHealNumber 1.6s ease-out forwards;
    letter-spacing: 1.5px;
}

/* ==========================================================================
   QUICK DEMO & GUEST MODE INTERACTIVE GUIDE STYLES
   ========================================================================== */

/* 1. Quick Demo Hero Box in Terminal */
.quick-demo-banner-box {
    position: relative;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(99, 102, 241, 0.15) 50%, rgba(249, 115, 22, 0.18) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-demo-banner-box:hover {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.demo-box-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 100%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 65%);
    pointer-events: none;
    filter: blur(20px);
}

.demo-box-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.demo-badge-pill {
    background: linear-gradient(90deg, #0284c7, #2563eb);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.demo-badge-guide {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #34d399;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
}

.demo-badge-guest {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
}

.demo-box-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.demo-box-text {
    flex: 1;
}

.demo-box-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.demo-box-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #cbd5e1;
    margin: 0;
}

.btn-demo-launch-glow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    border: 1px solid rgba(254, 215, 170, 0.4);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(249, 115, 22, 0.45);
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-demo-launch-glow:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 26px rgba(249, 115, 22, 0.65);
    background: linear-gradient(135deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
}

.btn-demo-launch-glow:active {
    transform: translateY(1px) scale(0.98);
}

.demo-launch-icon {
    font-size: 1.4rem;
}

.demo-launch-lbl {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.demo-launch-lbl strong {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
}

.demo-launch-lbl small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.demo-launch-arrow {
    font-size: 1.2rem;
    margin-left: 4px;
    transition: transform 0.25s ease;
}

.btn-demo-launch-glow:hover .demo-launch-arrow {
    transform: translateX(4px);
}

/* 2. Header Guest Pill */
.btn-header-pill.guest-pill {
    background: #3d2a05;
    border: 1px solid #f59e0b;
    color: #fde68a;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-header-pill.guest-pill:hover {
    background: #5c3f08;
    border-color: #fbbf24;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* 3. Compact Lobby Guest Incentive Banner */
.lobby-guest-warning-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.lgw-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-align: left;
}

.lgw-gift-icon {
    font-size: 1.4rem;
    line-height: 1;
    animation: gentleBounce 2s infinite ease-in-out;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.lgw-text strong {
    display: block;
    font-size: 0.82rem;
    color: #fef3c7;
    font-weight: 800;
}

.lgw-text small {
    display: block;
    font-size: 0.7rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.lgw-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-banner-signup {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #111;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
    white-space: nowrap;
    transition: transform 0.2s;
}

.btn-banner-signup:hover {
    transform: scale(1.05);
}

.btn-banner-info {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Game Feature Highlights Strip */
.game-feature-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.25s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 87, 34, 0.3);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.feature-text strong {
    display: block;
    font-size: 0.78rem;
    color: #f8fafc;
    font-weight: 700;
}

.feature-text small {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
}
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.lgw-title-row strong {
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    color: #fde68a;
}

.lgw-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.35;
}

.lgw-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

/* Deploy Demo Button in Lobby Actions */
.btn-deploy-demo {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.3) 100%);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 8px;
}

.btn-deploy-demo:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(59, 130, 246, 0.45) 100%);
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

.badge-guest-tag {
    background: #b45309;
    color: #fef3c7;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    border: 1px solid rgba(245, 158, 11, 0.6);
}

/* 4. Guest Profile Dossier Modal */
.guest-modal-card {
    max-width: 580px;
    width: 90%;
    padding: 26px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(245, 158, 11, 0.2);
}

.guest-modal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guest-shield-icon {
    font-size: 1.8rem;
}

.guest-modal-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    display: block;
}

.guest-info-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    padding: 16px 20px;
    margin: 18px 0;
}

.guest-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.guest-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid rgba(254, 240, 138, 0.7);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

.guest-status-pill {
    background: #b45309;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.6px;
}

.guest-info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guest-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.guest-callsign {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
}

.guest-id-tag {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
}

.guest-char-row, .guest-storage-row {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guest-meta-lbl {
    color: #94a3b8;
}

.guest-char-val {
    color: #38bdf8;
    font-weight: 700;
}

.guest-storage-val {
    color: #fbbf24;
    font-weight: 600;
}

.guest-comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}

.comp-col {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 14px 16px;
}

.comp-guest {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.comp-registered {
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.05);
}

.comp-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.comp-col-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

.comp-guest h4 { color: #fca5a5; }
.comp-registered h4 { color: #86efac; }

.comp-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comp-list li {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #cbd5e1;
}

.guest-modal-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 18px;
}

.guest-modal-actions #btn-guest-modal-reset {
    margin-right: auto;
}

/* 5. Right Action Buttons In-Battle (#hud-cards-bar: Panduan + Menyerah) */
.cards-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.card-guide {
    border-color: rgba(14, 165, 233, 0.55);
}

.card-guide:hover:not(:disabled) {
    background: rgba(14, 165, 233, 0.28);
    border-color: #0ea5e9;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.card-surrender {
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.card-surrender:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.25);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Surrender Confirmation Modal */
.surrender-modal-card {
    max-width: 440px;
    text-align: center;
    padding: 24px 28px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.22), 0 20px 40px rgba(0, 0, 0, 0.8);
}

.surrender-icon-wrap {
    font-size: 2.8rem;
    margin-bottom: 12px;
    line-height: 1;
    animation: surrenderFloat 2s ease-in-out infinite;
}

@keyframes surrenderFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.surrender-warning-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
    line-height: 1.4;
}

.surrender-consequence-text {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 22px;
}

.surrender-consequence-text strong {
    color: #fca5a5;
}

.surrender-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-danger-action {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(220, 38, 38, 0.45) !important;
}

.btn-danger-action:hover {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.65) !important;
    transform: translateY(-1px);
}

.guide-btn-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: guidePulse 1.5s infinite;
}

@keyframes guidePulse {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* Interactive Demo Guide Spotlight Box */
.demo-guide-overlay {
    position: fixed;
    top: 74px;
    bottom: auto !important;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    width: 92%;
    max-width: 440px;
    pointer-events: auto;
    animation: guideOverlaySlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes guideOverlaySlideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -15px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.demo-guide-box {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 25px rgba(14, 165, 233, 0.25);
    backdrop-filter: blur(16px);
    max-height: 38vh;
    overflow-y: auto;
}

.guide-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.guide-header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-beacon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: beaconPulse 1.2s infinite;
}

@keyframes beaconPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.3); }
}

.guide-header-tag {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #7dd3fc;
    text-transform: uppercase;
}

.btn-guide-close-icon {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.btn-guide-close-icon:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.1);
}

.guide-box-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.guide-step-graphic {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
}

.guide-step-text-wrap {
    flex: 1;
}

.guide-step-title {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.25;
}

.guide-step-desc {
    margin: 0 0 6px 0;
    font-size: 0.80rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.guide-step-tip-box {
    font-size: 0.74rem;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.1);
    border-left: 3px solid #38bdf8;
    padding: 4px 8px;
    border-radius: 0 6px 6px 0;
    line-height: 1.35;
}

.guide-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-step-dots {
    display: flex;
    gap: 6px;
}

.guide-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.guide-dot.active {
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    transform: scale(1.2);
}

.guide-step-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .demo-box-main {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-demo-launch-glow {
        justify-content: center;
    }
    .guest-comparison-box {
        grid-template-columns: 1fr;
    }
    .demo-guide-overlay {
        top: 74px !important;
        bottom: auto !important;
        width: calc(100vw - 16px);
        max-width: 440px;
    }
}

/* ==========================================================================
   LIVE ONLINE PLAYERS & GUESTS ROSTER (LOBBY RADAR)
   ========================================================================== */
.online-roster-box {
    margin: 0 20px 14px 20px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(10, 16, 28, 0.72);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.online-roster-sub {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.online-roster-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.online-roster-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #94a3b8;
    text-transform: uppercase;
}

.online-roster-title strong {
    color: #10b981;
}

.online-roster-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 92px;
    overflow-y: auto;
}

.online-roster-empty {
    font-size: 0.78rem;
    color: #64748b;
    font-style: italic;
}

.online-roster-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(18, 26, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    color: #e2e8f0;
}

.online-roster-chip.is-me {
    border-color: rgba(255, 170, 0, 0.55);
    background: rgba(255, 140, 0, 0.12);
}

.roster-char-icon {
    font-size: 0.88rem;
}

.roster-name {
    font-weight: 700;
    color: #f8fafc;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-role-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}

.roster-role-tag.tag-guest {
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.roster-role-tag.tag-member {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.roster-status {
    font-size: 0.68rem;
    font-weight: 700;
}

.roster-status.status-standby {
    color: #34d399;
}

.roster-status.status-battle {
    color: #fb923c;
}

.btn-roster-watch {
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid #38bdf8;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
    transition: all 0.18s ease;
}

.btn-roster-watch:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}

/* ==========================================================================
   CINEMATIC 3D CAMERA SWITCHER, LIVE SPECTATOR & REPLAY DOCK
   ========================================================================== */
.hud-spectator-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(244, 63, 94, 0.55);
    font-size: 0.7rem;
    font-weight: 800;
    color: #fda4af;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
}

.hud-spectator-names {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
    color: #fecdd3;
}

.hud-spectator-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 85;
    min-width: 155px;
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(244, 63, 94, 0.6);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75);
    text-align: left;
}

.spec-pop-title {
    font-size: 0.68rem;
    font-weight: 900;
    color: #fda4af;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
    margin-bottom: 5px;
}

.spec-pop-item {
    font-size: 0.7rem;
    font-weight: 700;
    color: #f8fafc;
    padding: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact Tactical Tools Bar (Camera & Emote Drop-Ups docked above bottom HUD) */
.hud-tactical-tools {
    position: absolute;
    bottom: 162px;
    right: 14px;
    z-index: 56;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.hud-tactical-tools.sr-mode-active {
    bottom: 96px;
}

.hud-tool-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-hud-tool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    height: 28px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-emote-toggle {
    border-color: rgba(251, 191, 36, 0.55);
    color: #fef08a;
}

.btn-autofit {
    border-color: rgba(52, 211, 153, 0.55);
    color: #a7f3d0;
}

.btn-autofit:hover,
.btn-autofit:active {
    border-color: #34d399;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

.btn-hud-tool:hover {
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.95);
    color: #ffffff;
}

.tool-caret {
    font-size: 0.6rem;
    opacity: 0.75;
}

.hud-tool-popover {
    position: absolute;
    bottom: calc(100% + 7px);
    right: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
}

.hud-cam-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 118px;
}

.btn-cam-mode {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.75);
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-align: left;
}

.btn-cam-mode:hover {
    border-color: #38bdf8;
    color: #ffffff;
}

.btn-cam-mode.active {
    background: linear-gradient(135deg, #ff5722, #f59e0b);
    border-color: #fef08a;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

/* Spectator & Chess-Style Replay Dock */
.spectator-replay-dock {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 880px;
    z-index: 60;
    pointer-events: auto;
    padding: 12px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 14, 24, 0.98) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), 0 0 24px rgba(14, 165, 233, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sr-dock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sr-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.sr-step-summary {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1f5f9;
    text-align: center;
}

.btn-sr-exit {
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.55);
    color: #fca5a5;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-sr-exit:hover {
    background: #dc2626;
    color: #ffffff;
}

.replay-timeline-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

.replay-turns-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.btn-replay-turn-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn-replay-turn-chip:hover {
    border-color: #38bdf8;
    color: #ffffff;
}

.btn-replay-turn-chip.active {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border-color: #7dd3fc;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
    transform: translateY(-1px);
}

.replay-transport-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-replay-ctrl {
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-replay-ctrl:hover {
    border-color: #f59e0b;
    color: #fef08a;
}

.btn-replay-primary {
    background: linear-gradient(135deg, #ff5722, #d97706);
    border-color: #fbbf24;
}

@media (max-width: 768px) {
    .hud-tactical-tools {
        bottom: 104px;
        right: 6px;
        gap: 4px;
    }

    .hud-tactical-tools.sr-mode-active {
        bottom: 74px;
    }

    .btn-hud-tool {
        height: 24px;
        padding: 2px 7px;
        font-size: 0.60rem;
        gap: 3px;
    }

    .hud-spectator-names {
        max-width: 72px;
        font-size: 0.58rem;
    }

    .spectator-replay-dock {
        bottom: 6px;
        width: calc(100vw - 12px);
        padding: 8px 10px;
        gap: 6px;
    }

    .sr-step-summary {
        width: 100%;
        order: 3;
        font-size: 0.72rem;
    }

    .btn-replay-ctrl {
        padding: 5px 10px;
        font-size: 0.68rem;
    }
}

@media (max-height: 560px) and (orientation: landscape), (max-height: 560px) and (pointer: coarse) {
    .hud-tactical-tools {
        bottom: 48px;
        right: 8px;
        gap: 4px;
    }

    .hud-tactical-tools.sr-mode-active {
        bottom: 44px;
    }

    .btn-hud-tool {
        height: 22px;
        padding: 2px 6px;
        font-size: 0.58rem;
        gap: 2px;
    }
}

/* ======================================================================
   DIRECT 1v1 DUEL CHALLENGE, QUICK EMOTES & SHAREABLE REPLAY LINKS
   ====================================================================== */

/* Roster "⚔️ Tantang" Button */
.btn-roster-challenge {
    margin-left: 4px;
    padding: 2px 8px;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.7);
    background: linear-gradient(135deg, #ea580c, #d97706);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.45);
    transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-roster-challenge:hover {
    transform: scale(1.06);
    filter: brightness(1.15);
}

/* Outgoing Challenge Floating Banner */
.challenge-outgoing-banner {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    min-width: 300px;
    max-width: 92vw;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid rgba(245, 158, 11, 0.7);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.25);
    backdrop-filter: blur(12px);
}

.chal-out-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chal-out-pulse {
    font-size: 1.35rem;
    animation: pulse 1.2s infinite;
}

.chal-out-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.chal-out-info strong {
    font-size: 0.85rem;
    color: #fef08a;
}

.chal-out-info small {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* Incoming 1v1 Challenge Modal Card */
.challenge-incoming-card {
    max-width: 400px;
    text-align: center;
    border: 2px solid rgba(251, 191, 36, 0.75);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.35);
}

.chal-inc-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fde047;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.chal-inc-challenger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.chal-inc-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.chal-inc-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.chal-inc-meta strong {
    font-size: 1.1rem;
    color: #ffffff;
}

.chal-inc-desc {
    font-size: 0.84rem;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.chal-inc-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 16px;
}

.chal-inc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #fde047);
    transition: width 0.95s linear;
}

.chal-inc-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
}

/* Social / Share Feedback Toast */
.social-toast {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9800;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid rgba(56, 189, 248, 0.7);
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.7), 0 0 16px rgba(56, 189, 248, 0.35);
    pointer-events: none;
}

/* Replay Share Buttons */
.sr-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sr-share {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #bae6fd;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-sr-share:hover {
    background: #0284c7;
    color: #ffffff;
}

.replay-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* In-Battle Quick Emote Drop-Up Tray */
.hud-emote-tray {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    min-width: 215px;
}

.btn-emote-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.88);
    color: #f8fafc;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease;
    white-space: nowrap;
}

.btn-emote-item span {
    font-size: 0.64rem;
    font-weight: 700;
    color: #cbd5e1;
}

.btn-emote-item:hover {
    transform: translateY(-1px);
    border-color: #fbbf24;
    background: rgba(245, 158, 11, 0.22);
}

/* Player 1 & Player 2 Comic Emote Speech Bubbles */
.hud-emote-bubble {
    position: absolute;
    bottom: -34px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1.5px solid #fbbf24;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65), 0 0 14px rgba(251, 191, 36, 0.4);
    pointer-events: none;
    white-space: nowrap;
}

.p1-emote-bubble {
    left: 14px;
}

.p2-emote-bubble {
    right: 14px;
    border-color: #38bdf8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65), 0 0 14px rgba(56, 189, 248, 0.4);
}

.emote-bubble-icon {
    font-size: 0.98rem;
}

.emote-pop-anim {
    animation: emoteBubblePop 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes emoteBubblePop {
    0% {
        opacity: 0;
        transform: scale(0.4) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Live Spectator Crowd Reactions Feed */
.hud-spectator-reactions {
    position: absolute;
    bottom: 198px;
    right: 14px;
    z-index: 44;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    pointer-events: none;
}

.spectator-reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #e2e8f0;
    font-size: 0.7rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    animation: specReactFloat 3.4s ease forwards;
}

@keyframes specReactFloat {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.9);
    }
    12% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    82% {
        opacity: 1;
        transform: translateY(-6px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-18px) scale(0.95);
    }
}

@media (max-width: 768px) {
    .hud-emote-tray {
        min-width: 185px;
        gap: 4px;
    }

    .btn-emote-item {
        padding: 4px 6px;
        font-size: 0.78rem;
    }

    .btn-emote-item span {
        font-size: 0.58rem;
    }

    .hud-spectator-reactions {
        bottom: 156px;
        right: 8px;
    }
}






/* ==========================================================================
   MOBILE UX OVERRIDES (FINAL PASS) - must stay at END of file so it wins the cascade
   Covers both Mobile Portrait (max-width: 960px) and Mobile Landscape (max-height: 560px, e.g. 800x360)
   ========================================================================== */
.lobby-mobile-nav,
.tools-menu-group {
    display: none;
}

@media (max-width: 960px), (max-height: 560px) {
    /* --- 1. Tactical tools (Emote / Cam / Full / Fit): collapse into single gear button under top HUD --- */
    .hud-tactical-tools,
    .hud-tactical-tools.sr-mode-active {
        top: 76px;
        bottom: auto !important;
        right: 8px;
        gap: 4px;
        flex-direction: row-reverse !important;
        align-items: center !important;
    }

    .tools-menu-group {
        display: inline-flex;
    }

    .hud-tactical-tools:not(.tools-open) .hud-tool-group:not(.tools-menu-group) {
        display: none !important;
    }

    .hud-tactical-tools.tools-open #btn-tools-menu {
        border-color: #38bdf8;
        background: rgba(14, 165, 233, 0.35);
    }

    .hud-tool-popover {
        bottom: auto !important;
        top: calc(100% + 6px);
        right: 0;
        max-width: calc(100vw - 16px);
    }

    .btn-hud-tool .tool-lbl {
        display: none;
    }

    .btn-hud-tool {
        height: 28px;
        min-width: 28px;
        padding: 0 7px;
        justify-content: center;
        font-size: 0.78rem;
        opacity: 0.94;
    }

    /* --- 2. Floating Compact Cards Bar (transparent container, compact pills, zero bulk) --- */
    #hud-bottom {
        bottom: 4px;
        width: calc(100vw - 12px);
    }

    .cards-bar,
    #hud-cards-bar.cards-bar {
        justify-content: center;
        padding: 0 4px !important;
        margin-bottom: 3px !important;
        gap: 5px;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .cards-group,
    .cards-right-group {
        gap: 5px;
    }

    .card-btn {
        padding: 3px 8px !important;
        gap: 4px !important;
        border-radius: 999px !important;
        min-height: 26px !important;
        height: 26px !important;
        background: rgba(15, 23, 42, 0.88) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
    }

    .card-btn .card-info {
        display: none !important;
    }

    .card-btn-icon {
        font-size: 0.95rem !important;
    }

    .card-badge {
        font-size: 0.58rem !important;
        padding: 1px 4px !important;
    }

    /* Hide duplicate timeout badge above FIRE button (top HUD already shows SISA 3 DETIK!) */
    #hud-turn-timeout-warning,
    .timeout-warning-badge {
        display: none !important;
    }

    /* --- 3. Clean D-Pad & Unmistakable Single-Line FIRE Button --- */
    .console-top-strip,
    .angle-presets,
    .move-pod .control-header,
    .btn-console-move .dpad-txt,
    .btn-console-move .dpad-sub,
    .fire-hint,
    .console-pill-badge,
    .power-bar-preview {
        display: none !important;
    }

    .btn-console-move {
        padding: 0 !important;
        justify-content: center;
        align-items: center;
    }

    .btn-console-move .dpad-arrow {
        font-size: 1.25rem !important;
        line-height: 1;
    }

    .btn-fire,
    .console-trigger-btn {
        white-space: nowrap !important;
        overflow: hidden;
    }

    .fire-label {
        white-space: nowrap !important;
        font-weight: 900 !important;
        letter-spacing: 0.5px !important;
    }

    /* --- 4. Messages & Card Splash: compact, never cover controls --- */
    .combat-banner {
        top: 108px;
        width: calc(100vw - 24px);
        max-width: 420px;
        padding: 5px 14px;
        font-size: 0.72rem;
        line-height: 1.3;
        text-align: center;
        border-radius: 16px;
        white-space: normal;
    }

    .card-activation-splash {
        top: 74px !important;
        padding-top: 0 !important;
        bottom: auto !important;
    }

    .card-splash-backdrop {
        display: none !important;
    }

    .card-splash-card {
        min-width: 0;
        width: calc(100vw - 28px);
        max-width: 380px;
        gap: 10px;
        padding: 8px 12px;
        border-radius: 14px;
    }

    .card-splash-glow,
    .card-splash-pulse-ring {
        display: none;
    }

    .card-splash-icon-wrap {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .card-splash-icon {
        font-size: 1.5rem;
    }

    .card-splash-tag {
        font-size: 0.52rem;
        letter-spacing: 1px;
        padding: 1px 6px;
    }

    .card-splash-title {
        font-size: 0.98rem;
        letter-spacing: 0.5px;
    }

    .card-splash-desc {
        font-size: 0.70rem;
        margin-top: 2px;
    }

    .card-splash-author {
        font-size: 0.62rem;
        margin-top: 2px;
    }

    /* --- 5. Interactive Guide & Replay Dock --- */
    .demo-guide-overlay {
        top: 108px;
        bottom: auto;
        width: calc(100vw - 16px);
        max-width: 440px;
    }

    .demo-guide-box {
        padding: 8px 12px;
        border-radius: 12px;
        max-height: 34vh;
        overflow-y: auto;
    }

    .guide-box-header {
        margin-bottom: 4px;
    }

    .guide-step-graphic,
    .guide-step-tip-box {
        display: none !important;
    }

    .guide-step-title {
        font-size: 0.80rem;
    }

    .guide-step-desc {
        font-size: 0.68rem;
        line-height: 1.3;
    }

    .guide-box-footer {
        margin-top: 6px;
    }

    .spectator-replay-dock {
        padding: 5px 8px;
        gap: 4px;
        border-radius: 12px;
    }

    .sr-step-summary {
        font-size: 0.64rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-sr-exit,
    .btn-sr-share {
        padding: 4px 8px;
        font-size: 0.62rem;
    }

    .replay-turns-strip {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .btn-replay-ctrl {
        padding: 4px 8px;
        font-size: 0.62rem;
    }

    /* --- 6. Modals --- */
    .modal-overlay {
        padding: 12px 8px;
    }

    .modal-card {
        width: 100%;
        padding: 16px 14px;
    }

    .result-badge {
        font-size: 2.2rem;
        margin-bottom: 6px;
    }

    .result-title {
        font-size: 1.5rem;
    }
}

/* --- Mobile Portrait Specifics (<= 768px width, vertical) --- */
@media (max-width: 768px) and (orientation: portrait), (max-width: 500px) {
    .controls-panel.console-gamepad-chassis {
        padding: 5px 6px !important;
        border-radius: 14px !important;
    }

    .console-top-strip,
    .angle-presets,
    .btn-console-move .dpad-sub,
    .fire-hint,
    .console-pill-badge {
        display: none !important;
    }

    /* 2-Row Ergonomic Mobile Grid: Top row sliders, bottom row wide move D-pad + tall FIRE trigger */
    .console-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr 92px !important;
        grid-template-rows: auto auto !important;
        gap: 5px !important;
        align-items: stretch !important;
    }

    /* Row 1, Col 1: Sudut Bidik */
    .angle-pod {
        grid-column: 1 !important;
        grid-row: 1 !important;
        padding: 4px 6px !important;
        gap: 2px !important;
    }

    /* Row 1, Col 2: Power Serangan */
    .power-pod {
        grid-column: 2 !important;
        grid-row: 1 !important;
        padding: 4px 6px !important;
        gap: 2px !important;
    }

    .control-header {
        font-size: 0.60rem !important;
        margin-bottom: 2px !important;
    }

    .control-value {
        font-size: 0.74rem !important;
    }

    .console-slider-stepper-wrap {
        gap: 3px !important;
    }

    .console-step-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 0.90rem !important;
        border-radius: 6px !important;
    }

    input[type=range] {
        height: 6px !important;
    }

    /* Row 2, Spanning Col 1 & 2: Wide Ergonomic Movement D-Pad for Left Thumb */
    .move-pod {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .move-pod .control-header {
        display: none !important;
    }

    .console-dpad-housing {
        display: flex !important;
        flex-direction: row !important;
        height: 44px !important;
        min-height: 44px !important;
        gap: 6px !important;
        padding: 2px !important;
        background: rgba(11, 16, 28, 0.85) !important;
        border: 1.5px solid rgba(255, 140, 0, 0.45) !important;
        border-radius: 12px !important;
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
    }

    .dpad-divider {
        display: none !important;
    }

    .btn-console-move {
        flex: 1 !important;
        height: 100% !important;
        min-height: 40px !important;
        border-radius: 9px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 0 10px !important;
        background: linear-gradient(180deg, rgba(255, 140, 0, 0.28) 0%, rgba(180, 60, 0, 0.2) 100%) !important;
        border: 1px solid rgba(255, 140, 0, 0.4) !important;
    }

    .btn-console-move:active {
        background: linear-gradient(180deg, rgba(255, 140, 0, 0.45) 0%, rgba(180, 60, 0, 0.35) 100%) !important;
        transform: scale(0.97) !important;
    }

    .btn-console-move .dpad-arrow {
        font-size: 1.15rem !important;
        line-height: 1 !important;
    }

    .btn-console-move .dpad-txt {
        display: inline !important;
        font-size: 0.78rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
    }

    /* Col 3, Spanning Row 1 & 2: Chunky Prominent Fire Button for Right Thumb */
    .fire-pod {
        grid-column: 3 !important;
        grid-row: 1 / span 2 !important;
        padding: 0 !important;
        height: 100% !important;
    }

    .btn-fire,
    .console-trigger-btn {
        width: 100% !important;
        height: 100% !important;
        min-height: 82px !important;
        border-radius: 12px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 6px 4px !important;
        gap: 4px !important;
        background: linear-gradient(135deg, #ef4444 0%, #f97316 60%, #eab308 100%) !important;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
    }

    .fire-icon {
        font-size: 1.5rem !important;
    }

    .fire-label {
        font-size: 0.95rem !important;
        font-weight: 900 !important;
        letter-spacing: 1px !important;
    }
}

/* --- Mobile Landscape Ultra-Slim Bar (e.g. Samsung Galaxy A55 800x360) --- */
@media (max-height: 560px) and (orientation: landscape), (max-height: 560px) {
    .hud-tactical-tools,
    .hud-tactical-tools.sr-mode-active {
        top: 44px !important;
        right: 8px !important;
        bottom: auto !important;
    }

    .combat-banner {
        top: 44px;
    }

    .demo-guide-overlay {
        top: 44px;
        left: 8px;
        transform: none;
        width: 44vw;
        animation: none;
    }

    .card-activation-splash {
        padding-top: 12vh;
    }

    #hud-bottom {
        bottom: 3px !important;
        width: calc(100vw - 16px) !important;
        max-width: 820px !important;
    }

    .controls-panel.console-gamepad-chassis {
        padding: 4px 8px !important;
        border-radius: 12px !important;
        background: rgba(11, 17, 30, 0.88) !important;
    }

    .console-grid {
        grid-template-columns: 86px 1fr 1fr 96px !important;
        grid-template-rows: 36px !important;
        gap: 6px !important;
        align-items: center !important;
    }

    .move-pod,
    .angle-pod,
    .power-pod,
    .fire-pod {
        height: 36px !important;
        min-height: 36px !important;
        padding: 2px 6px !important;
        justify-content: center !important;
    }

    .move-pod {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .console-dpad-housing {
        height: 36px !important;
        min-height: 36px !important;
        padding: 2px !important;
        gap: 3px !important;
    }

    /* Single-row inline angle & power pods in landscape: value badge + stepper + slider */
    .angle-pod,
    .power-pod {
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .angle-pod .control-header,
    .power-pod .control-header {
        margin: 0 !important;
        flex: 0 0 auto;
    }

    .angle-pod .control-title,
    .power-pod .control-title {
        display: none !important;
    }

    .angle-pod .control-value::before {
        content: "📐 ";
        font-size: 0.68rem;
    }

    .power-pod .control-value::before {
        content: "⚡ ";
        font-size: 0.68rem;
    }

    .control-value {
        font-size: 0.72rem !important;
        min-width: 42px;
        text-align: left;
    }

    .console-slider-stepper-wrap {
        flex: 1 1 auto;
        gap: 4px !important;
    }

    .console-step-btn {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        font-size: 0.85rem !important;
    }

    .fire-pod {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .btn-fire,
    .console-trigger-btn {
        height: 36px !important;
        min-height: 36px !important;
        width: 100% !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
    }

    .fire-icon {
        font-size: 0.95rem !important;
        line-height: 1 !important;
    }

    .fire-label {
        font-size: 0.78rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }
}

/* --- Lobby (authenticated): bottom tab bar on mobile --- */
@media (max-width: 768px) {
    #screen-lobby:has(#lobby-auth-view:not(.hidden)) .lobby-mobile-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 120;
        justify-content: space-around;
        gap: 2px;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(10, 16, 28, 0.96);
        border-top: 1px solid rgba(255, 140, 0, 0.5);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    #screen-lobby:has(#lobby-auth-view:not(.hidden)) {
        padding-bottom: 84px;
    }

    .lmn-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        padding: 4px 2px;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: #94a3b8;
        font-family: inherit;
        cursor: pointer;
    }

    .lmn-tab span {
        font-size: 1.3rem;
        line-height: 1.1;
    }

    .lmn-tab small {
        font-size: 0.62rem;
        font-weight: 700;
    }

    .lmn-tab.active {
        color: #ffb74d;
        background: rgba(255, 140, 0, 0.16);
    }

    /* Tab content switching (default tab = play) */
    #lobby-auth-view[data-tab="online"] .lobby-actions,
    #lobby-auth-view[data-tab="online"] .daily-booster-card,
    #lobby-auth-view[data-tab="online"] .lobby-guest-warning-banner {
        display: none !important;
    }

    #lobby-auth-view:not([data-tab="online"]) .auth-sub-telemetry {
        display: none;
    }

    /* Compact briefing card + guest banner */
    .commander-briefing-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .lgw-desc {
        display: none;
    }

    .lobby-actions .btn-content small {
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   LIVE 3D CHARACTER SELECTION SHOWCASE & INTERACTIVE ACTION BAR
   ========================================================================== */

/* Roster Portrait Thumbnails */
.cnc-thumb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 170, 0, 0.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.char-name-card:hover .cnc-thumb,
.char-name-card.active .cnc-thumb {
    transform: scale(1.08);
    border-color: #ffcc00;
    box-shadow: 0 0 12px rgba(255, 180, 0, 0.75);
}

.char-card-thumb {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 170, 0, 0.65);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
    flex-shrink: 0;
}

/* 3D Stage Overlay inside Character Frame */
.char-img-frame {
    position: relative;
    height: 215px !important;
    background: radial-gradient(circle at 50% 60%, rgba(30, 41, 59, 0.95), rgba(9, 13, 22, 0.98));
    overflow: hidden;
}

/* Subtle atmospheric illustration backdrop behind 3D model */
.char-img-frame .char-showcase-img {
    opacity: 0.28;
    filter: saturate(1.15) blur(1px) brightness(0.75);
    transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

/* Full 2D Illustration mode when user clicks "Art" button */
.char-img-frame.art-only-mode .char-showcase-img {
    opacity: 1;
    filter: none;
}

.char-img-frame.art-only-mode .char-3d-stage,
.char-img-frame.art-only-mode .char-action-status,
.char-img-frame.art-only-mode .char-360-badge {
    opacity: 0;
    pointer-events: none;
}

.char-3d-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: grab;
    transition: opacity 0.3s ease;
}

.char-3d-stage:active {
    cursor: grabbing;
}

.char-3d-stage canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.char-360-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(56, 189, 248, 0.55);
    color: #7dd3fc;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.char-action-status {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 4;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    border: 1px solid rgba(251, 146, 60, 0.55);
    color: #fed7aa;
    font-size: 0.64rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Interactive Action Toolbar below 3D Stage */
.char-action-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 2px;
}

.btn-char-act {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-char-act:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(251, 146, 60, 0.65);
    color: #fff;
    transform: translateY(-1px);
}

.btn-char-act.active {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.32), rgba(234, 88, 12, 0.18));
    border-color: #fb923c;
    color: #ffedd5;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.35);
}

/* Dynamic Elemental Stage Glow per Character */
.char-showcase-stage[data-char-theme="gajah_mada"] {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.14), inset 0 0 24px rgba(245, 158, 11, 0.06);
}
.char-showcase-stage[data-char-theme="empu_gandring"] {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.15), inset 0 0 24px rgba(239, 68, 68, 0.06);
}
.char-showcase-stage[data-char-theme="jurig_leuweung"] {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.15), inset 0 0 24px rgba(16, 185, 129, 0.06);
}
.char-showcase-stage[data-char-theme="panah_wulung"] {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 28px rgba(56, 189, 248, 0.15), inset 0 0 24px rgba(56, 189, 248, 0.06);
}
.char-showcase-stage[data-char-theme="nyi_kalangkung"] {
    border-color: rgba(168, 85, 247, 0.48);
    box-shadow: 0 8px 28px rgba(168, 85, 247, 0.16), inset 0 0 24px rgba(168, 85, 247, 0.07);
}

/* ==========================================================================
   COMMANDER PROFILE DOSSIER & MATCH HISTORY MODAL
   ========================================================================== */
.dossier-modal-card {
    max-width: 640px;
    width: 95%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 22px 24px;
    background: rgba(13, 20, 36, 0.96);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.dossier-header-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dossier-header-icon {
    font-size: 1.6rem;
}

.dossier-hero-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 14px 18px;
    margin: 12px 0 10px;
}

.dossier-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dossier-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.dossier-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dossier-tier-pill {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    letter-spacing: 0.5px;
}

.dossier-hero-info {
    flex: 1;
    min-width: 0;
}

.dossier-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.dossier-name-row h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dossier-rank-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dossier-stat-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 7px;
    border: 1px solid;
}

.dossier-stat-pill.rating {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.35);
}

.dossier-stat-pill.rank {
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.35);
}

.dossier-char-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
}

/* Career Combat Stats Strip */
.dossier-career-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.career-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.career-val {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.career-val.win-val { color: #4ade80; }
.career-val.loss-val { color: #f87171; }
.career-val.winrate-val { color: #38bdf8; }
.career-val.total-val { color: #fbbf24; }

.career-lbl {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action Bar */
.dossier-action-bar {
    margin-bottom: 12px;
}

/* Match History Section */
.dossier-history-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.history-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.history-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-title-wrap h4 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
}

.history-count-badge {
    font-size: 0.66rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 7px;
    border-radius: 999px;
}

.dossier-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
    max-height: 270px;
}

.dossier-history-list::-webkit-scrollbar {
    width: 5px;
}
.dossier-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Match History Card */
.dh-card {
    background: rgba(24, 33, 56, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dh-card:hover {
    background: rgba(30, 41, 70, 0.85);
    border-color: rgba(59, 130, 246, 0.4);
}

.dh-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dh-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dh-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.dh-badge.win {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.dh-badge.loss {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.dh-badge.draw {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.dh-delta-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 5px;
}

.dh-delta-pill.pos {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.dh-delta-pill.neg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.dh-delta-pill.zero {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.dh-date {
    font-size: 0.65rem;
    color: #94a3b8;
}

.dh-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dh-opp-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dh-opp-avatar {
    font-size: 1.1rem;
}

.dh-opp-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dh-match-meta {
    font-size: 0.68rem;
    color: #94a3b8;
}

.btn-dh-replay {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.35));
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #bfdbfe;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-dh-replay:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.45), rgba(37, 99, 235, 0.6));
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* Pagination Bar */
.dossier-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dossier-page-info {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Clickable indicators */
.clickable-player-row {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.clickable-player-row:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    transform: translateX(2px);
}

.online-roster-chip {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.online-roster-chip:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

/* Responsive adjustment for small phones */
@media (max-width: 480px) {
    .dossier-career-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .dossier-hero-card {
        padding: 10px 12px;
        gap: 12px;
    }
    .dossier-avatar-circle {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   TOP-SKY DEMO GUIDE & ERGONOMIC 48PX MOBILE PORTRAIT D-PAD
   ========================================================================== */
.demo-guide-overlay,
.card-activation-splash {
    top: 76px !important;
    bottom: auto !important;
    padding-top: 0 !important;
}

.demo-guide-box.is-minimized {
    padding: 6px 12px !important;
    border-radius: 999px !important;
    max-height: 40px !important;
    overflow: hidden !important;
}

.demo-guide-box.is-minimized .guide-box-header {
    margin-bottom: 0 !important;
}

.demo-guide-box.is-minimized .guide-box-content,
.demo-guide-box.is-minimized .guide-box-footer {
    display: none !important;
}

@media (max-width: 768px) and (orientation: portrait), (max-width: 500px) {
    .console-dpad-housing {
        height: 48px !important;
        min-height: 48px !important;
    }
    .btn-console-move {
        min-height: 44px !important;
    }
}

/* ==========================================================================
   HOMEPAGE / AUTH TERMINAL GPU PERFORMANCE OPTIMIZATION
   Eliminates expensive per-frame 24px Gaussian backdrop-blur over animated
   WebGL canvases when toggling between Sign In and Sign Up tabs.
   ========================================================================== */
.landing-terminal-col,
#screen-lobby .glass-panel,
.modal-overlay .modal-box {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(8, 14, 28, 0.96) !important;
}

.terminal-pane {
    contain: layout style;
}
