:root {
    --bg-void: #020503;
    --bg-panel: rgba(3, 12, 6, 0.92);
    --bg-card: #061109;
    --bg-card-hover: #0b2212;
    --neon-green: #00ff66;
    --neon-green-bright: #55ff99;
    --neon-green-dim: #008f39;
    --neon-green-muted: rgba(0, 255, 102, 0.14);
    --neon-green-border: rgba(0, 255, 102, 0.45);
    --neon-alert: #ff2a4b;
    --text-primary: #eafff0;
    --text-muted: #6ca882;
    --font-display: 'Orbitron', 'Arial Black', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-void);
    color: var(--text-primary);
    overflow: hidden;
    font-family: var(--font-display);
    user-select: none;
}

canvas {
    display: block;
    background: #010402;
    cursor: crosshair;
}

/* ==========================================
   TACTICAL HUD PANEL (TOP-LEFT)
   ========================================== */
#ui-container.hud-panel {
    position: fixed;
    top: 18px;
    left: 18px;
    width: 300px;
    background: linear-gradient(145deg, rgba(4, 18, 9, 0.92) 0%, rgba(1, 6, 3, 0.96) 100%);
    border: 1px solid var(--neon-green-border);
    border-left: 4px solid var(--neon-green);
    padding: 14px 16px;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 0 28px rgba(0, 255, 102, 0.15), inset 0 0 20px rgba(0, 255, 102, 0.05);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.hud-season-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--neon-green);
}

.hud-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulseGlow 1.8s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.hud-metric-card {
    background: rgba(0, 255, 102, 0.05);
    border: 1px solid rgba(0, 255, 102, 0.22);
    padding: 8px 10px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.score-box {
    font-size: 20px;
    font-weight: 900;
    color: var(--neon-green);
    text-shadow: 0 0 12px rgba(0, 255, 102, 0.65);
}

.coin-box {
    font-size: 20px;
    font-weight: 900;
    color: var(--neon-green-bright);
    text-shadow: 0 0 12px rgba(85, 255, 153, 0.55);
}

.hud-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-line {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-line strong {
    color: var(--neon-green);
    font-size: 15px;
}

.stat-sep {
    color: var(--neon-green-dim);
}

.hud-progress-track {
    width: 100%;
    height: 6px;
    background: #031208;
    border: 1px solid rgba(0, 255, 102, 0.35);
    overflow: hidden;
}

.hud-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-green-dim), var(--neon-green));
    box-shadow: 0 0 10px var(--neon-green);
    transition: width 0.25s ease;
}

.shield-status {
    margin-top: 2px;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}

#class-list {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid var(--neon-green);
    text-transform: uppercase;
    background: rgba(0, 255, 102, 0.1);
    color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}

.evo-badge {
    background: var(--neon-green);
    color: #020804;
    border-color: #fff;
    box-shadow: 0 0 16px var(--neon-green);
    font-weight: 900;
}

/* ==========================================
   SIDE NAVIGATION DOCK
   ========================================== */
#side-dock {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1500;
}

.dock-tab {
    width: 44px;
    height: 155px;
    background: linear-gradient(180deg, #04150a 0%, #020905 100%);
    border: 1px solid var(--neon-green);
    border-left: none;
    color: var(--neon-green);
    writing-mode: vertical-lr;
    text-align: center;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.18);
    clip-path: polygon(0 0, 100% 10px, 100% calc(100% - 10px), 0 100%);
}

.dock-tab:hover {
    width: 56px;
    background: var(--neon-green);
    color: #010803;
    box-shadow: 0 0 30px var(--neon-green);
}

.dock-tab-bp {
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.18);
}

.dock-tab-bp:hover {
    background: #00f0ff;
    color: #010803;
    box-shadow: 0 0 30px #00f0ff;
}

.dock-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.bp-indicator {
    background: #00f0ff;
}

/* ==========================================
   NOTIFICATIONS, POPUPS & TAG TIMER
   ========================================== */
#game-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(2, 12, 6, 0.95);
    border: 1px solid var(--neon-green);
    border-left: 4px solid var(--neon-green);
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1.5px;
    padding: 12px 20px;
    z-index: 6000;
    pointer-events: none;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.25);
}

#game-notification.show {
    opacity: 1;
    transform: translateX(0);
}

#evo-popup {
    position: fixed;
    top: 26%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 46px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 3px;
    text-shadow: 0 0 25px var(--neon-green), 0 0 55px var(--neon-green-dim);
    pointer-events: none;
    opacity: 0;
    z-index: 4500;
    transition: 0.3s;
}

/* ==========================================
   BOSS ENCOUNTER HUD
   ========================================== */
#boss-ui {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, 90vw);
    display: none;
    text-align: center;
    background: rgba(2, 10, 5, 0.9);
    border: 1px solid var(--neon-green);
    padding: 14px 20px;
    box-shadow: 0 0 35px rgba(0, 255, 102, 0.25);
    z-index: 200;
}

.boss-hud-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.boss-warning-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neon-green);
    letter-spacing: 2px;
}

#boss-name {
    color: #fff;
    text-shadow: 0 0 12px var(--neon-green);
    margin: 0;
    font-size: 20px;
    letter-spacing: 2px;
}

#boss-bar {
    width: 100%;
    height: 18px;
    background: #020c05;
    border: 1px solid var(--neon-green);
    overflow: hidden;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9);
}

#boss-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00772d, var(--neon-green), #99ffbb);
    box-shadow: 0 0 18px var(--neon-green);
    transition: width 0.1s;
}

/* ==========================================
   MODAL OVERLAYS & MENU CARDS
   ========================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(4, 24, 11, 0.86) 0%, rgba(1, 5, 2, 0.96) 100%);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.menu-card {
    position: relative;
    background: linear-gradient(160deg, #051309 0%, #020704 100%);
    border: 2px solid var(--neon-green);
    padding: 36px 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 102, 0.22), inset 0 0 35px rgba(0, 255, 102, 0.05);
    width: min(880px, 94vw);
    max-height: 92vh;
    overflow-y: auto;
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.menu-card.modal-narrow {
    width: min(520px, 92vw);
}

.menu-card.shop-modal {
    width: min(920px, 95vw);
}

.season-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    color: #020904;
    background: var(--neon-green);
    padding: 4px 12px;
    margin-bottom: 10px;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.45);
}

.season-pill.pill-danger {
    background: var(--neon-green);
    color: #010803;
}

.game-title {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    margin: 0;
    letter-spacing: 3px;
    text-shadow: 0 0 22px var(--neon-green);
}

.menu-subtitle {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin: 8px 0 22px 0;
    text-transform: uppercase;
}

/* ==========================================
   CLASS SELECTION & UPGRADE CARDS
   ========================================== */
.class-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.class-select-grid .btn {
    min-height: 88px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    background: rgba(0, 255, 102, 0.04);
    border: 1px solid var(--neon-green-border);
    border-left: 4px solid var(--neon-green);
    font-size: 15px;
    letter-spacing: 1px;
}

.class-select-grid .btn:hover:not(:disabled) {
    background: rgba(0, 255, 102, 0.18);
    color: #fff;
    border-color: var(--neon-green);
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.35);
    transform: translateY(-2px);
}

.class-select-card {
    min-height: 105px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    text-align: left;
    background: rgba(4, 18, 9, 0.85);
    border: 1px solid var(--neon-green-border);
    border-left: 4px solid var(--neon-green);
    position: relative;
    transition: all 0.25s ease;
}

.class-select-card.unlocked:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.3);
    transform: translateY(-2px);
}

.class-select-card.locked {
    border-color: rgba(255, 255, 255, 0.15);
    border-left: 4px solid #888;
    background: rgba(8, 12, 10, 0.7);
}

.class-select-card.flame-card {
    border-color: rgba(255, 68, 0, 0.45);
    border-left: 4px solid #ff4400;
    box-shadow: 0 0 15px rgba(255, 68, 0, 0.15);
}

.class-select-card.flame-card.unlocked:hover {
    border-color: #ff4400;
    box-shadow: 0 0 25px rgba(255, 68, 0, 0.45);
}

.class-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.class-card-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #00ff66;
}

.class-select-card.flame-card .class-card-title {
    color: #ff6600;
    text-shadow: 0 0 10px rgba(255, 68, 0, 0.6);
}

.class-card-cost {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #ffd700;
    font-weight: bold;
}

.class-card-desc {
    font-size: 11px;
    color: #6ca882;
    font-family: var(--font-mono);
    margin-bottom: 10px;
    line-height: 1.3;
}

.class-card-action-btn {
    width: 100%;
    margin-top: auto;
    font-size: 12px;
    padding: 8px 12px;
    letter-spacing: 1px;
}

.menu-footer-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 255, 102, 0.2);
}

@media (max-width: 720px) {
    .menu-footer-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   BUTTON SYSTEM (GREEN & BLACK)
   ========================================== */
.btn {
    background: #06150b;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1.2px;
    font-size: 11px;
    width: 100%;
    position: relative;
}

.btn:hover:not(:disabled) {
    background: var(--neon-green);
    color: #020804;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.55);
    transform: translateY(-1px);
}

.btn:disabled {
    border-color: #1c3826;
    background: #040a06;
    color: #2f573d;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary {
    background: rgba(0, 255, 102, 0.14);
    border: 2px solid var(--neon-green);
    color: #fff;
    text-shadow: 0 0 8px var(--neon-green);
}

.btn-secondary {
    background: #051209;
    border: 1px solid var(--neon-green-border);
    color: var(--neon-green);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(0, 255, 102, 0.3);
    color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(0, 255, 102, 0.12);
    color: var(--neon-green);
    border-color: var(--neon-green);
}

.btn-small {
    width: auto;
    padding: 8px 16px;
    font-size: 11px;
}

/* ==========================================
   COSMETIC DEPOT (SHOP) & SUPPLY CRATE
   ========================================== */
.shop-status-bar {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 14px 0 18px;
    padding: 10px 18px;
    background: rgba(0, 255, 102, 0.05);
    border: 1px solid rgba(0, 255, 102, 0.25);
    font-family: var(--font-mono);
    font-size: 15px;
}

.shop-balance {
    color: var(--neon-green);
    font-weight: 700;
}

.shop-pity {
    color: var(--text-muted);
}

.shop-pity span {
    color: #fff;
    font-weight: 700;
}

.crate-actions-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.btn-crate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(0, 255, 102, 0.1) 0%, rgba(3, 18, 8, 0.9) 100%);
    border: 1px solid var(--neon-green);
}

.btn-crate-premium {
    border-width: 2px;
    box-shadow: inset 0 0 18px rgba(0, 255, 102, 0.18);
}

.crate-title {
    font-size: 13px;
    font-weight: 900;
    color: #fff;
}

.crate-cost {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neon-green);
}

.btn-crate:hover .crate-title,
.btn-crate:hover .crate-cost {
    color: #010803;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 14px;
    max-height: 400px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-green) #020804;
}

.skin-card {
    background: #040d07;
    border: 1px solid rgba(0, 255, 102, 0.22);
    padding: 18px 14px;
    text-align: center;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skin-card:hover {
    border-color: var(--neon-green);
    background: #07170c;
}

.skin-card.owned {
    border-color: var(--neon-green-dim);
}

.skin-card.equipped {
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 22px rgba(0, 255, 102, 0.35), inset 0 0 15px rgba(0, 255, 102, 0.1);
}

.skin-preview {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.cost-tag {
    font-family: var(--font-mono);
    color: var(--neon-green);
    font-size: 12px;
    margin: 8px 0 12px;
    display: block;
    letter-spacing: 1px;
}

/* ==========================================
   CINEMATIC CYBER SUPPLY POD & HOLOGRAM REVEAL
   ========================================== */
#crate-overlay {
    z-index: 2000;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(2, 16, 8, 0.94) 0%, rgba(0, 2, 1, 0.99) 100%);
    --pod-accent: #00ff66;
}

#crate-fx-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#crate-stage-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.crate-telemetry {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 4px;
    color: var(--pod-accent);
    text-shadow: 0 0 12px var(--pod-accent);
    text-transform: uppercase;
}

.crate-roulette-ticker {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #fff;
    min-height: 40px;
    padding: 6px 28px;
    background: rgba(0, 20, 10, 0.8);
    border-left: 3px solid var(--pod-accent);
    border-right: 3px solid var(--pod-accent);
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.2);
    text-shadow: 0 0 15px var(--pod-accent);
    transition: color 0.08s, transform 0.08s;
}

.crate-box {
    width: 210px;
    height: 210px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
}

/* Spinning Holographic Rings around Pod */
.pod-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.pod-ring-outer {
    inset: -38px;
    border: 2px dashed var(--pod-accent);
    opacity: 0.55;
    animation: podRingSpin 6s linear infinite;
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.2);
}

.pod-ring-inner {
    inset: -18px;
    border: 2px solid transparent;
    border-top-color: var(--pod-accent);
    border-bottom-color: var(--pod-accent);
    opacity: 0.85;
    animation: podRingSpinReverse 2.4s linear infinite;
}

@keyframes podRingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes podRingSpinReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* Glowing Energy Reactor Core Inside Pod */
.pod-core {
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, var(--pod-accent) 45%, transparent 75%);
    box-shadow: 0 0 60px var(--pod-accent), 0 0 110px var(--pod-accent);
    transform: scale(0.35);
    opacity: 0.7;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 1;
}

/* 4 Interlocking Mechanical Armor Plates */
.pod-plate {
    position: absolute;
    width: 50%;
    height: 50%;
    background: linear-gradient(135deg, #0b2414 0%, #030a05 100%);
    border: 2px solid var(--pod-accent);
    box-shadow: inset 0 0 18px rgba(0, 255, 102, 0.25), 0 0 15px rgba(0, 255, 102, 0.25);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s ease;
    z-index: 2;
}

.pod-plate-tl {
    top: 0;
    left: 0;
    clip-path: polygon(32% 0, 100% 0, 100% 100%, 0 100%, 0 32%);
}

.pod-plate-tr {
    top: 0;
    right: 0;
    clip-path: polygon(0 0, 68% 0, 100% 32%, 100% 100%, 0 100%);
}

.pod-plate-bl {
    bottom: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 32% 100%, 0 68%);
}

.pod-plate-br {
    bottom: 0;
    right: 0;
    clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

/* Glowing Energy Seams & Center Lock Emblem */
.pod-lock-v,
.pod-lock-h {
    position: absolute;
    background: var(--pod-accent);
    box-shadow: 0 0 20px var(--pod-accent), 0 0 35px #fff;
    z-index: 3;
    transition: all 0.4s ease;
}

.pod-lock-v {
    width: 8px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.pod-lock-h {
    height: 8px;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.pod-center-emblem {
    position: relative;
    z-index: 4;
    width: 58px;
    height: 58px;
    background: #020a05;
    border: 3px solid var(--pod-accent);
    box-shadow: 0 0 25px var(--pod-accent), inset 0 0 12px var(--pod-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 10px var(--pod-accent);
    clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Stage Animations on .crate-box */
.crate-drop-in {
    animation: podDropIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes podDropIn {
    0% { transform: translateY(-350px) scale(0.6); opacity: 0; filter: brightness(2.5); }
    75% { transform: translateY(14px) scale(1.06, 0.94); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; filter: brightness(1); }
}

.crate-shake {
    animation: podOverchargeShake 0.14s infinite;
}

.crate-shake .pod-core {
    transform: scale(1.1);
    opacity: 1;
}

.crate-shake .pod-ring-outer {
    animation-duration: 1.2s;
    opacity: 0.95;
}

.crate-shake .pod-ring-inner {
    animation-duration: 0.65s;
}

.crate-shake.overdrive {
    animation: podOverchargeViolent 0.08s infinite;
}

.crate-shake.overdrive .pod-plate-tl { transform: translate(-8px, -8px); }
.crate-shake.overdrive .pod-plate-tr { transform: translate(8px, -8px); }
.crate-shake.overdrive .pod-plate-bl { transform: translate(-8px, 8px); }
.crate-shake.overdrive .pod-plate-br { transform: translate(8px, 8px); }
.crate-shake.overdrive .pod-core { transform: scale(1.65); }
.crate-shake.overdrive .pod-center-emblem { transform: rotate(45deg) scale(1.2); background: var(--pod-accent); color: #000; }

@keyframes podOverchargeShake {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-4px, 3px) rotate(-2deg); }
    50% { transform: translate(4px, -3px) rotate(2deg); }
    75% { transform: translate(-3px, -3px) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes podOverchargeViolent {
    0% { transform: translate(0, 0) rotate(0deg) scale(1.06); }
    25% { transform: translate(-9px, 6px) rotate(-4deg) scale(1.1); }
    50% { transform: translate(9px, -7px) rotate(4deg) scale(1.08); }
    75% { transform: translate(-7px, -5px) rotate(-3deg) scale(1.12); }
    100% { transform: translate(6px, 5px) rotate(3deg) scale(1.06); }
}

/* Pod Breach / Armor Plate Blowout */
.crate-open .pod-plate-tl { transform: translate(-150px, -150px) rotate(-35deg) scale(0.5); opacity: 0; }
.crate-open .pod-plate-tr { transform: translate(150px, -150px) rotate(35deg) scale(0.5); opacity: 0; }
.crate-open .pod-plate-bl { transform: translate(-150px, 150px) rotate(35deg) scale(0.5); opacity: 0; }
.crate-open .pod-plate-br { transform: translate(150px, 150px) rotate(-35deg) scale(0.5); opacity: 0; }
.crate-open .pod-lock-v,
.crate-open .pod-lock-h,
.crate-open .pod-center-emblem,
.crate-open .pod-ring {
    transform: scale(2.4);
    opacity: 0;
}
.crate-open .pod-core {
    transform: scale(4.5);
    opacity: 0;
    filter: brightness(4);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s ease;
}

.crate-charge-bar-wrap {
    width: 260px;
    height: 8px;
    background: #020c05;
    border: 1px solid var(--pod-accent);
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.25);
}

.crate-charge-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00772d, var(--pod-accent), #ffffff);
    box-shadow: 0 0 16px var(--pod-accent);
    transition: width 0.08s linear;
}

/* Stage 4: Hologram Pedestal Reveal */
.reveal-skin {
    position: relative;
    z-index: 3;
    color: #fff;
    text-align: center;
    opacity: 0;
    transform: scale(0.55) translateY(30px);
    pointer-events: none;
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(165deg, rgba(4, 20, 10, 0.92) 0%, rgba(2, 8, 4, 0.96) 100%);
    border: 2px solid var(--pod-accent);
    padding: 32px 48px;
    box-shadow: 0 0 65px rgba(0, 255, 102, 0.3), inset 0 0 35px rgba(0, 255, 102, 0.08);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.reveal-skin.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.reveal-skin h2 {
    color: var(--pod-accent);
    font-size: 16px;
    font-family: var(--font-mono);
    margin: 4px 0 12px;
    letter-spacing: 4px;
}

.holo-pedestal-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0 10px;
}

#crate-skin-preview-canvas {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 18px var(--pod-accent));
}

.holo-scan-cone {
    position: absolute;
    bottom: 18px;
    width: 150px;
    height: 155px;
    background: linear-gradient(0deg, rgba(0, 255, 102, 0.26) 0%, rgba(0, 255, 102, 0.02) 85%, transparent 100%);
    clip-path: polygon(22% 100%, 78% 100%, 100% 0, 0 0);
    pointer-events: none;
    z-index: 1;
    animation: holoFlicker 2.2s infinite ease-in-out;
}

.holo-base-ring {
    position: absolute;
    bottom: 8px;
    width: 120px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--pod-accent);
    background: radial-gradient(circle, rgba(0, 255, 102, 0.45) 0%, rgba(0, 20, 8, 0.9) 80%);
    box-shadow: 0 0 25px var(--pod-accent), inset 0 0 12px var(--pod-accent);
    z-index: 1;
}

@keyframes holoFlicker {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.45; }
}

#revealed-skin-name {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 3px;
    margin: 10px 0 6px;
    text-shadow: 0 0 25px var(--pod-accent);
}

.reveal-status-note {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 22px;
    min-height: 18px;
}

.reveal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.reveal-actions .btn {
    min-width: 175px;
}

/* ==========================================
   TERMINAL PANELS, MULTIPLAYER & TAG MODE
   ========================================== */
.terminal-panel {
    background: rgba(3, 14, 7, 0.85);
    border: 1px solid rgba(0, 255, 102, 0.28);
    padding: 16px;
    text-align: left;
}

.field-group {
    margin-bottom: 14px;
}

.field-group:last-child {
    margin-bottom: 0;
}

.field-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    accent-color: var(--neon-green);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.status-readout {
    margin: 14px 0;
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-weight: bold;
    min-height: 20px;
}

.modal-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.mp-container {
    width: min(760px, 94vw);
}

.identity-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.callsign-display {
    font-size: 22px;
    color: var(--neon-green);
    font-weight: 900;
    text-shadow: 0 0 12px rgba(0, 255, 102, 0.55);
}

.mp-columns {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
}

@media (max-width: 720px) {
    .mp-columns {
        grid-template-columns: 1fr;
    }
}

.mp-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel-heading {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--neon-green);
    margin-bottom: 10px;
    font-weight: 700;
}

.mp-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-join-box {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 255, 102, 0.18);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-Public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.lobby-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid rgba(0, 255, 102, 0.35);
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.06);
}

.server-broadcast-box {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 255, 102, 0.05);
    border: 1px solid var(--neon-green-border);
    display: flex;
    gap: 8px;
    align-items: center;
}

.server-browser-list {
    background: #020704;
    height: 180px;
    border: 1px solid rgba(0, 255, 102, 0.25);
    overflow-y: auto;
    padding: 8px;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.server-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.copy-toast {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--neon-green);
    margin-top: 10px;
    height: 16px;
    visibility: hidden;
    letter-spacing: 2px;
}

.mp-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 255, 102, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.station-id-line {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.station-id-line span {
    color: var(--neon-green);
}

/* ==========================================
   INPUTS & ADMIN CONSOLE
   ========================================== */
.admin-field {
    background: #020804;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    width: 72px;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    outline: none;
}

.admin-field.input-full {
    width: 100%;
}

.admin-input {
    background: #020804;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 14px;
    font-size: 18px;
    text-align: center;
    width: 100%;
    margin: 12px 0;
    font-family: var(--font-mono);
    outline: none;
    box-shadow: inset 0 0 12px rgba(0, 255, 102, 0.15);
}

.admin-input.input-compact {
    font-size: 13px;
    padding: 9px 12px;
    margin: 0;
    text-align: left;
}

#login-error {
    font-family: var(--font-mono);
    color: var(--neon-alert);
    font-size: 12px;
    height: 16px;
    margin-bottom: 8px;
    visibility: hidden;
    letter-spacing: 1.5px;
}

.final-stats-box {
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.06);
    border: 1px solid rgba(0, 255, 102, 0.3);
    padding: 16px;
    margin: 20px 0;
    line-height: 1.6;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 820px) {
    .admin-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-inline-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-scroll {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-green) #020804;
}

.admin-scroll::-webkit-scrollbar {
    width: 4px;
}

.admin-scroll::-webkit-scrollbar-thumb {
    background: var(--neon-green);
}

.admin-section {
    border: 1px solid rgba(0, 255, 102, 0.25);
    padding: 12px;
    background: rgba(2, 10, 5, 0.9);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-section h3 {
    font-family: var(--font-mono);
    color: var(--neon-green);
    margin: 0 0 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
    padding-bottom: 6px;
}

.btn-hero,
.btn-evo,
.btn-spawn,
.btn-boss-spawn {
    border-color: var(--neon-green-border);
    color: var(--neon-green);
    font-size: 10px;
    padding: 8px;
}

/* ==========================================
   SLIDING UPGRADE MENU (LIVE / MP)
   ========================================== */
#sliding-upgrade-menu {
    position: fixed;
    top: -420px;
    left: 50%;
    transform: translateX(-50%);
    width: min(640px, 94vw);
    background: rgba(3, 12, 6, 0.96);
    border: 2px solid var(--neon-green);
    border-top: none;
    padding: 20px 24px;
    transition: top 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5000;
    box-shadow: 0 0 40px rgba(0, 255, 102, 0.35);
    color: #fff;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px));
}

#sliding-upgrade-menu.active {
    top: 0;
}

.sliding-header {
    margin-bottom: 14px;
}

.terminal-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neon-green);
    letter-spacing: 2px;
}

#sliding-upgrade-menu h2 {
    margin: 4px 0 0 0;
    color: #fff;
    text-shadow: 0 0 12px var(--neon-green);
    font-size: 22px;
    letter-spacing: 2px;
}

#sliding-menu-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

#sliding-menu-options .btn {
    flex: 1;
    min-width: 170px;
    min-height: 82px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-color: var(--neon-green);
    color: var(--neon-green);
}

#sliding-menu-options .btn:hover {
    background: var(--neon-green);
    color: #020804;
    box-shadow: 0 0 22px var(--neon-green);
}

/* ==========================================
   BATTLE PASS MODAL & REWARD TRACK
   ========================================== */
.menu-card.bp-modal {
    width: min(1080px, 95vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.bp-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 12px;
}

.bp-current-stat-card {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.45);
    padding: 10px 18px;
    border-radius: 4px;
    text-align: right;
    min-width: 200px;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}

.bp-stat-tier-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: #6ca882;
}

.bp-stat-tier-val {
    font-size: 26px;
    font-weight: 900;
    color: #00f0ff;
    letter-spacing: 2px;
    text-shadow: 0 0 12px #00f0ff;
}

.bp-xp-subtext {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #eafff0;
}

.bp-progress-bar-wrap {
    width: 100%;
    margin-bottom: 12px;
}

.bp-progress-bar-track {
    width: 100%;
    height: 10px;
    background: #020905;
    border: 1px solid rgba(0, 240, 255, 0.35);
    overflow: hidden;
    border-radius: 2px;
    position: relative;
}

.bp-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff 0%, #00ff66 100%);
    box-shadow: 0 0 12px #00f0ff;
    transition: width 0.3s ease;
}

.bp-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.bp-legend-info {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.bp-tier-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    overflow-y: auto;
    max-height: 52vh;
    padding: 8px 6px 14px 2px;
    margin-bottom: 14px;
}

.bp-tier-track::-webkit-scrollbar {
    width: 6px;
}

.bp-tier-track::-webkit-scrollbar-track {
    background: #020804;
}

.bp-tier-track::-webkit-scrollbar-thumb {
    background: #00f0ff;
    border-radius: 3px;
}

.bp-tier-card {
    background: rgba(4, 18, 9, 0.85);
    border: 1px solid rgba(0, 255, 102, 0.2);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.bp-tier-card.unlocked {
    border-color: #00ff66;
    background: rgba(0, 255, 102, 0.05);
}

.bp-tier-card.current {
    border-color: #00f0ff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
    background: rgba(0, 240, 255, 0.08);
}

.bp-tier-card.milestone {
    border-color: #ffd700;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.2);
}

.bp-tier-card.locked {
    opacity: 0.6;
    border-color: rgba(255, 255, 255, 0.1);
}

.bp-tier-num {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: #eafff0;
    margin-bottom: 6px;
    letter-spacing: 1.5px;
}

.bp-tier-card.current .bp-tier-num {
    color: #00f0ff;
}

.bp-tier-card.milestone .bp-tier-num {
    color: #ffd700;
}

.bp-reward-icon {
    width: 44px;
    height: 44px;
    margin: 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bp-reward-title {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.bp-reward-desc {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #6ca882;
    margin-bottom: 10px;
    min-height: 24px;
}

.bp-status-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 2px;
}

.bp-status-badge.claimed {
    color: #00ff66;
    border: 1px solid #00ff66;
    background: rgba(0, 255, 102, 0.1);
}

.bp-status-badge.locked {
    color: #888;
    border: 1px solid #444;
}

.btn-claim {
    background: #00f0ff;
    color: #010803;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 12px #00f0ff;
    padding: 4px 14px;
    font-size: 11px;
}

.btn-claim:hover {
    background: #fff;
    box-shadow: 0 0 20px #00f0ff;
}

.bp-footer-row {
    display: flex;
    justify-content: center;
    margin-top: auto;
}


/* ==========================================
   CINEMATIC INTRO OVERLAY (18+ SECONDS)
   ========================================== */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
    overflow: hidden;
    font-family: var(--font-display);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

#intro-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
    background: transparent;
}

/* Cinematic Letterbox Bars */
.intro-letterbox {
    position: absolute;
    left: 0;
    width: 100%;
    height: 52px;
    background: #000000;
    z-index: 10;
    pointer-events: none;
}

.intro-letterbox-top {
    top: 0;
    border-bottom: 1px solid rgba(0, 255, 102, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.intro-letterbox-bottom {
    bottom: 0;
    border-top: 1px solid rgba(0, 255, 102, 0.25);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
}

/* CRT Scanlines & Vignette Layer */
.intro-crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 12;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(0,0,0,0.85) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
    background-size: 100% 100%, 100% 4px;
}

/* Top Telemetry Header */
.intro-header {
    position: absolute;
    top: 10px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 25;
    pointer-events: auto;
}

.intro-sys-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.intro-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff2a4b;
    box-shadow: 0 0 12px #ff2a4b;
    animation: introBlink 1s infinite alternate ease-in-out;
}

@keyframes introBlink {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.1); }
}

.intro-sys-text {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.6);
}

.intro-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.intro-btn {
    background: rgba(3, 16, 8, 0.85);
    border: 1px solid var(--neon-green-border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1.5px;
    padding: 7px 16px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.1);
}

.intro-btn:hover {
    background: var(--neon-green);
    color: #010803;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.6);
    border-color: var(--neon-green);
}

.intro-btn-skip {
    border-color: rgba(255, 42, 75, 0.5);
    color: #ff99aa;
}

.intro-btn-skip:hover {
    background: #ff2a4b;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 42, 75, 0.7);
    border-color: #ff2a4b;
}

.intro-keyhint {
    font-size: 10px;
    color: #888;
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 5px;
    border-radius: 2px;
}

.intro-btn:hover .intro-keyhint {
    color: #000;
    background: rgba(255, 255, 255, 0.6);
}

/* Center Cinematic UI Container */
.intro-center-ui {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 920px;
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

/* Phase 1: Terminal Diagnostic Box */
.intro-terminal-box {
    background: rgba(1, 14, 6, 0.85);
    border: 1px solid rgba(0, 255, 102, 0.4);
    box-shadow: 0 0 35px rgba(0, 255, 102, 0.15), inset 0 0 20px rgba(0, 255, 102, 0.05);
    padding: 24px 30px;
    text-align: left;
    max-width: 620px;
    margin: 0 auto;
    font-family: var(--font-mono);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    animation: fadeInDown 0.6s ease-out;
}

.terminal-tag {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--neon-green-bright);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
    padding-bottom: 6px;
}

.intro-typing-line {
    font-size: 14px;
    color: #c9ffd9;
    letter-spacing: 1.5px;
    margin: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    animation: typeWriter 0.6s steps(40, end) both;
}

@keyframes typeWriter {
    from { max-width: 0; opacity: 0; }
    to { max-width: 100%; opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Phase 2: Emergency Alert Box */
.intro-alert-box {
    background: rgba(24, 3, 7, 0.92);
    border: 2px solid #ff2a4b;
    box-shadow: 0 0 50px rgba(255, 42, 75, 0.4), inset 0 0 30px rgba(255, 42, 75, 0.15);
    padding: 32px 36px;
    max-width: 740px;
    margin: 0 auto;
    animation: alertStrobe 0.7s infinite alternate ease-in-out;
    position: relative;
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

@keyframes alertStrobe {
    0% { border-color: rgba(255, 42, 75, 0.6); box-shadow: 0 0 30px rgba(255, 42, 75, 0.25); }
    100% { border-color: #ff2a4b; box-shadow: 0 0 70px rgba(255, 42, 75, 0.6); }
}

.intro-alert-pill {
    display: inline-block;
    background: #ff2a4b;
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 3px;
    padding: 4px 14px;
    margin-bottom: 14px;
    border-radius: 2px;
}

.intro-glitch-header {
    font-size: clamp(26px, 4.5vw, 44px);
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 20px #ff2a4b, 2px 2px 0 #00ffff, -2px -2px 0 #ff0055;
    margin: 0 0 12px 0;
    position: relative;
}

.intro-alert-desc {
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: 2px;
    color: #ff99aa;
    margin-bottom: 20px;
}

.intro-badge-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.intro-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    border-radius: 2px;
}

.badge-danger {
    background: rgba(255, 42, 75, 0.2);
    border: 1px solid #ff2a4b;
    color: #ff4d6d;
}

.badge-warning {
    background: rgba(255, 170, 0, 0.2);
    border: 1px solid #ffaa00;
    color: #ffcc00;
}

/* Phase 3: Armory Calibration HUD */
.intro-armory-hud {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    background: rgba(3, 20, 26, 0.88);
    border: 1px solid rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 45px rgba(0, 229, 255, 0.2), inset 0 0 25px rgba(0, 229, 255, 0.08);
    padding: 24px 30px;
    animation: armoryAssemble 0.8s ease-out;
}

@keyframes armoryAssemble {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.armory-reticle {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #00e5ff;
}

.armory-reticle-tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.armory-reticle-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.armory-reticle-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.armory-reticle-br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.armory-sys-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2.5px;
    color: #00e5ff;
    margin-bottom: 6px;
}

.armory-hero-name {
    font-size: clamp(20px, 3.2vw, 32px);
    font-weight: 900;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow: 0 0 20px #00e5ff;
    margin: 0 0 16px 0;
}

.armory-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.armory-stat-card {
    background: rgba(2, 10, 15, 0.7);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.armory-stat-card .stat-name {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: #7abcc9;
}

.armory-stat-card .stat-value {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}

.val-cyan { color: #00e5ff; text-shadow: 0 0 10px #00e5ff; }
.val-green { color: #00ff66; text-shadow: 0 0 10px #00ff66; }
.val-orange { color: #ff8800; text-shadow: 0 0 10px #ff8800; }

/* Phase 4: Warp Telemetry Box */
.intro-warp-box {
    animation: warpPulse 0.4s infinite alternate;
}

@keyframes warpPulse {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}

.warp-warning-pulse {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 4px;
    color: #00e5ff;
    text-shadow: 0 0 15px #00e5ff;
    margin-bottom: 12px;
}

.warp-countdown-display {
    font-size: clamp(34px, 6vw, 68px);
    font-weight: 900;
    letter-spacing: 6px;
    color: #ffffff;
    text-shadow: 0 0 35px #00e5ff, 0 0 60px #ffffff;
    margin: 0 0 10px 0;
}

.warp-telemetry-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: #9cd5ff;
}

/* Phase 5: Grand Climax Logo Drop */
.intro-climax-container {
    animation: climaxImpact 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes climaxImpact {
    0% { transform: scale(2.2); opacity: 0; filter: blur(12px); }
    100% { transform: scale(1.0); opacity: 1; filter: blur(0px); }
}

.climax-season-pill {
    display: inline-block;
    background: rgba(0, 255, 102, 0.16);
    border: 1px solid var(--neon-green);
    color: var(--neon-green-bright);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 4px;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 18px;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.3);
}

.climax-main-title {
    font-size: clamp(48px, 9vw, 108px);
    font-weight: 900;
    letter-spacing: 10px;
    margin: 0;
    line-height: 1.0;
    display: flex;
    justify-content: center;
    gap: clamp(12px, 2.5vw, 32px);
    text-shadow: 0 0 40px rgba(0, 255, 102, 0.8), 0 0 80px rgba(0, 255, 102, 0.4);
}

.climax-title-sys {
    background: linear-gradient(180deg, #ffffff 0%, #b8ffd5 45%, #00ff66 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(0, 255, 102, 0.9));
}

.climax-title-online {
    background: linear-gradient(180deg, #ffffff 0%, #a8f5ff 45%, #00e5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.9));
}

.climax-subtitle {
    font-size: clamp(18px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: 8px;
    color: #eafff0;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.7);
    margin: 14px 0 10px 0;
}

.climax-tagline {
    font-family: var(--font-mono);
    font-size: clamp(12px, 1.8vw, 16px);
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.climax-prompt-row {
    display: flex;
    justify-content: center;
}

.climax-ready-badge {
    background: var(--neon-green);
    color: #010803;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 3px;
    padding: 8px 24px;
    border-radius: 3px;
    box-shadow: 0 0 35px var(--neon-green);
    animation: badgePulse 1.2s infinite alternate ease-in-out;
}

@keyframes badgePulse {
    0% { transform: scale(0.96); box-shadow: 0 0 20px rgba(0, 255, 102, 0.5); }
    100% { transform: scale(1.04); box-shadow: 0 0 45px rgba(0, 255, 102, 0.9); }
}

/* Bottom Progress Footer */
.intro-footer {
    position: absolute;
    bottom: 8px;
    left: 24px;
    right: 24px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
}

.intro-phase-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #446652;
}

.intro-phase-labels .phase-tag {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.intro-phase-labels .phase-tag.active {
    color: var(--neon-green);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.8);
}

.intro-progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(0, 30, 12, 0.8);
    border: 1px solid rgba(0, 255, 102, 0.3);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
}

.intro-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ff66, #00e5ff);
    box-shadow: 0 0 14px #00ff66;
    transition: width 0.1s linear;
}

.intro-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.intro-status-line {
    color: #9ee5b9;
}

.intro-timer-display {
    color: var(--neon-green);
    font-weight: 700;
}

/* Initial Start Prompt (Audio Permission Interstitial) */
.intro-start-prompt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 6, 3, 0.94);
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    transition: opacity 0.4s ease;
}

.prompt-box {
    background: linear-gradient(160deg, #051a0d 0%, #020b06 100%);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 60px rgba(0, 255, 102, 0.3);
    padding: 36px 42px;
    text-align: center;
    max-width: 580px;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.prompt-icon {
    font-size: 40px;
    color: var(--neon-green);
    margin-bottom: 12px;
    filter: drop-shadow(0 0 15px var(--neon-green));
}

.prompt-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.7);
}

.prompt-subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.prompt-btn {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    letter-spacing: 2.5px;
}

@media (max-width: 768px) {
    .intro-letterbox { height: 36px; }
    .intro-phase-labels { display: none; }
    .armory-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .intro-header { top: 6px; left: 12px; right: 12px; }
    .intro-footer { bottom: 6px; left: 12px; right: 12px; }
}


/* ==========================================
   ACCOUNT CREATION & OPERATOR SYSTEM STYLES
   ========================================== */

/* Side Dock Account Tab */
.dock-tab-account {
    border-color: #ffaa00;
    color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.2);
}

.dock-tab-account:hover {
    background: #ffaa00;
    color: #010803;
    box-shadow: 0 0 30px #ffaa00;
}

.dock-tab-account.logged-in {
    border-color: #00ff66;
    color: #00ff66;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.25);
}

.dock-tab-account.logged-in:hover {
    background: var(--neon-green);
    color: #010803;
    box-shadow: 0 0 35px var(--neon-green);
}

/* HUD Operator Badge */
.hud-operator-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 255, 102, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.hud-operator-pill:hover {
    border-color: var(--neon-green);
    background: rgba(0, 255, 102, 0.15);
}

.hud-operator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00;
}

/* Main Menu Operator Badge */
.menu-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.account-menu-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 25, 12, 0.8);
    border: 1px solid rgba(0, 255, 102, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--neon-green-bright);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.15);
}

.account-menu-badge:hover {
    background: var(--neon-green);
    color: #010803;
    border-color: var(--neon-green);
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.6);
}

.account-menu-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00;
}

/* Modal Overlay Card */
.account-modal {
    max-width: 640px;
}

/* Auth Tabs */
.account-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0 24px 0;
    border-bottom: 1px solid rgba(0, 255, 102, 0.25);
    padding-bottom: 12px;
}

.account-tab-btn {
    flex: 1;
    background: rgba(2, 12, 6, 0.7);
    border: 1px solid rgba(0, 255, 102, 0.3);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-tab-btn:hover {
    color: #fff;
    border-color: var(--neon-green);
}

.account-tab-btn.active {
    background: rgba(0, 255, 102, 0.18);
    border-color: var(--neon-green);
    color: var(--neon-green-bright);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.25);
}

/* Form Styling */
.account-form-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group .field-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--neon-green);
}

.form-group .field-hint {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #6ca882;
    letter-spacing: 1px;
}

.checkbox-group {
    margin-top: 4px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    accent-color: var(--neon-green);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.account-error-msg {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: #ff2a4b;
    min-height: 18px;
    line-height: 1.4;
}

.account-actions {
    margin-top: 8px;
}

.account-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    letter-spacing: 2px;
}

/* Logged-In Profile View */
.profile-card {
    background: rgba(1, 14, 6, 0.6);
    border: 1px solid rgba(0, 255, 102, 0.35);
    padding: 24px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
    padding-bottom: 16px;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 255, 102, 0.15);
    border: 2px solid var(--neon-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.4);
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-status-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: #010803;
    background: var(--neon-green);
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 700;
    width: fit-content;
}

.profile-callsign {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 15px rgba(0, 255, 102, 0.8);
}

.profile-date {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pstat-card {
    background: rgba(4, 18, 9, 0.85);
    border: 1px solid rgba(0, 255, 102, 0.2);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pstat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #6ca882;
}

.pstat-val {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #eafff0;
}

.profile-save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--neon-green);
}

.status-sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.profile-actions-row {
    display: flex;
    gap: 12px;
}

.profile-actions-row .btn {
    flex: 1;
}

@media (max-width: 640px) {
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-actions-row {
        flex-direction: column;
    }
}


/* Security Ban Alert Banner */
.profile-banned-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 42, 75, 0.22);
    border: 2px solid #ff2a4b;
    padding: 16px 20px;
    color: #ff99aa;
    font-family: var(--font-mono);
    box-shadow: 0 0 35px rgba(255, 42, 75, 0.45);
    margin-bottom: 12px;
}

.profile-banned-banner .ban-icon {
    font-size: 32px;
}

.profile-banned-banner strong {
    color: #ffffff;
    font-size: 15px;
    letter-spacing: 2px;
    display: block;
}

.profile-banned-banner p {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: #ff4d6d;
    letter-spacing: 1px;
}


/* ==========================================
   BUILDER ROLE HUD & CONSTRUCTION DOCK
   ========================================== */
#builder-hud.builder-dock {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(3, 18, 9, 0.94) 0%, rgba(1, 8, 4, 0.98) 100%);
    border: 1px solid var(--neon-green-border);
    border-top: 2px solid var(--neon-green);
    padding: 8px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1200;
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.2), inset 0 0 15px rgba(0, 255, 102, 0.05);
    backdrop-filter: blur(8px);
    user-select: none;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.builder-res-group {
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: 1px solid rgba(0, 255, 102, 0.25);
    padding-right: 16px;
}

.res-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.res-icon {
    font-size: 15px;
}

.res-label {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.res-item strong {
    color: #eafff0;
    font-size: 14px;
    min-width: 22px;
}

#res-scrap-val { color: #88ccee; }
#res-metal-val { color: #00e5ff; }
#res-energy-val { color: #ff00ff; }

.builder-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-build {
    background: rgba(4, 22, 11, 0.85);
    border: 1px solid rgba(0, 255, 102, 0.35);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    text-align: left;
}

.btn-build:hover {
    background: rgba(0, 255, 102, 0.18);
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
    transform: translateY(-2px);
}

.btn-build:active {
    transform: translateY(0);
}

.btn-build.cant-afford {
    opacity: 0.55;
    border-color: rgba(255, 42, 75, 0.35);
}

.btn-build.cant-afford:hover {
    box-shadow: 0 0 10px rgba(255, 42, 75, 0.3);
}

.build-key {
    background: rgba(0, 255, 102, 0.15);
    border: 1px solid var(--neon-green);
    color: var(--neon-green-bright);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.build-icon {
    font-size: 16px;
}

.build-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.build-name {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.build-cost {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
}

@media (max-width: 820px) {
    #builder-hud.builder-dock {
        flex-direction: column;
        gap: 8px;
        bottom: 8px;
        padding: 6px 10px;
    }
    .builder-res-group {
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 102, 0.2);
        padding-right: 0;
        padding-bottom: 6px;
        width: 100%;
        justify-content: center;
    }
}

/* ====================================================================
   DEVELOPMENT DOWNTIME & CLOWN PRANK OVERLAY
   ==================================================================== */
.downtime-screen {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: radial-gradient(circle at center, #0a0d14 0%, #030406 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    overflow: hidden;
    user-select: none;
}

.downtime-hazard-stripe {
    position: absolute;
    left: 0;
    right: 0;
    height: 16px;
    background: repeating-linear-gradient(45deg, #ffaa00, #ffaa00 16px, #1a1200 16px, #1a1200 32px);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
    z-index: 10;
}

.downtime-hazard-top { top: 0; }
.downtime-hazard-bottom { bottom: 0; }

.downtime-scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%),
                linear-gradient(90deg, rgba(255, 170, 0, 0.02), rgba(0, 0, 0, 0), rgba(255, 170, 0, 0.02));
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.8;
}

.downtime-card {
    position: relative;
    z-index: 5;
    background: rgba(10, 14, 18, 0.95);
    border: 2px solid #ffaa00;
    box-shadow: 0 0 60px rgba(255, 170, 0, 0.28), inset 0 0 35px rgba(255, 170, 0, 0.06);
    padding: 38px 44px;
    border-radius: 8px;
    max-width: 640px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(14px);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.downtime-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 170, 0, 0.12);
    border: 1px solid #ffaa00;
    color: #ffaa00;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.downtime-badge-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00;
    animation: dtPulse 1.2s infinite alternate;
}

@keyframes dtPulse {
    0% { transform: scale(0.85); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 1; }
}

.downtime-title {
    font-size: 38px;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(255, 170, 0, 0.6);
}

.downtime-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #ffbb44;
    letter-spacing: 1.5px;
    margin: 0 0 22px 0;
    text-transform: uppercase;
    line-height: 1.5;
}

.downtime-telemetry-box {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 170, 0, 0.25);
    border-radius: 4px;
    padding: 12px 18px;
    margin-bottom: 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-align: left;
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.telemetry-row:last-child {
    border-bottom: none;
}

.telemetry-label {
    color: #888;
    font-weight: bold;
    width: 85px;
}

.telemetry-status {
    color: #ccc;
    flex: 1;
}

.telemetry-metric {
    font-weight: bold;
    color: #00ff66;
}

.text-amber { color: #ffaa00 !important; }
.text-red { color: #ff2a4b !important; }

.downtime-notice-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #8a9ba8;
    line-height: 1.6;
    margin-bottom: 22px;
}

.downtime-override-section {
    border-top: 1px solid rgba(255, 170, 0, 0.2);
    padding-top: 20px;
    text-align: left;
}

.override-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.override-title {
    font-family: var(--font-display);
    font-size: 11px;
    color: #ffaa00;
    letter-spacing: 1.5px;
}

.override-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #888;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 3px;
}

.downtime-input-wrap {
    display: flex;
    gap: 10px;
}

.downtime-field {
    flex: 1;
    background: #000;
    border: 1px solid #444;
    color: #00ff66;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 12px 14px;
    outline: none;
    border-radius: 4px;
    letter-spacing: 2px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.downtime-field:focus {
    border-color: #00ff66;
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.35);
}

.btn-downtime {
    background: #ffaa00;
    color: #000;
    border: none;
    font-weight: bold;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 1.5px;
    padding: 0 22px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-downtime:hover {
    background: #ffbb22;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.55);
    transform: translateY(-1px);
}

.btn-downtime:active {
    transform: translateY(1px);
}

.downtime-feedback-box {
    min-height: 24px;
    margin-top: 14px;
    font-family: var(--font-mono);
    text-align: center;
}

/* --- Feedback Animations & Panels --- */
.fake-success-panel {
    background: rgba(0, 255, 102, 0.12);
    border: 1px solid #00ff66;
    padding: 12px;
    border-radius: 4px;
    color: #00ff66;
    animation: dtFadeIn 0.3s ease;
}

.fake-status-line {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.fake-checkmark {
    font-size: 14px;
    margin-right: 4px;
}

.fake-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.fake-progress-fill {
    height: 100%;
    background: #00ff66;
    width: 0%;
    animation: fakeFill 1.2s forwards cubic-bezier(0.1, 0.8, 0.2, 1);
}

.fake-sub-line {
    font-size: 10px;
    color: #a0ffc0;
}

.clown-roast-panel {
    background: rgba(255, 0, 60, 0.2);
    border: 2px solid #ff0055;
    box-shadow: 0 0 40px rgba(255, 0, 60, 0.45);
    padding: 16px;
    border-radius: 6px;
    color: #fff;
    animation: clownPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clown-icon-row {
    font-size: 28px;
    margin-bottom: 6px;
    animation: clownBounce 0.45s infinite alternate;
}

.clown-headline {
    font-family: var(--font-display);
    font-size: 15px;
    color: #ffcc00;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-shadow: 0 0 12px #ff0055;
}

.clown-body {
    font-size: 11px;
    color: #ffbbbb;
    line-height: 1.5;
    margin-bottom: 10px;
}

.clown-denied-badge {
    display: inline-block;
    background: #ff0055;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 1.5px;
}

.real-success-panel {
    background: rgba(0, 255, 102, 0.16);
    border: 1px solid #00ff66;
    box-shadow: 0 0 35px rgba(0, 255, 102, 0.35);
    padding: 12px;
    border-radius: 4px;
    color: #00ff66;
    animation: dtFadeIn 0.3s ease;
}

.real-status-line {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.real-checkmark {
    font-size: 14px;
    margin-right: 4px;
}

.real-sub-line {
    font-size: 10px;
    color: #a0ffc0;
    margin-top: 4px;
}

.error-panel {
    color: #ff2a4b;
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 9px;
    background: rgba(255, 42, 75, 0.1);
    border: 1px solid rgba(255, 42, 75, 0.35);
    border-radius: 4px;
    animation: dtFadeIn 0.2s ease;
}

.error-icon {
    font-weight: bold;
    margin-right: 6px;
}

@keyframes dtFadeIn {
    0% { opacity: 0; transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fakeFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

@keyframes clownBounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.22) rotate(6deg); }
}

.clown-shake-active {
    animation: cardClownShake 0.65s ease-in-out;
    border-color: #ff0055 !important;
    box-shadow: 0 0 60px rgba(255, 0, 85, 0.6) !important;
}

@keyframes cardClownShake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-14px) rotate(-1.5deg); }
    30%, 60%, 90% { transform: translateX(14px) rotate(1.5deg); }
}

.input-error-shake {
    animation: inputShake 0.4s ease;
    border-color: #ff2a4b !important;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
