/* ============================================================
   SpaceWaste.ca - Premium Sci-Fi Arcade Style Sheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@500;700;800;900&display=swap');

:root {
    --bg-dark: #030712;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-border: rgba(56, 189, 248, 0.25);
    --cyan-glow: #38bdf8;
    --blue-accent: #0284c7;
    --emerald-heal: #10b981;
    --amber-warning: #f59e0b;
    --crimson-danger: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-heading: 'Orbitron', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

/* App Wrapper */
#app-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 20%, #0c1a32 0%, #030712 70%);
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#app-container::-webkit-scrollbar {
    display: none;
}

/* Phaser Game Viewport */
#game-container {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 720px;
    max-height: 1280px;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.15);
}

#game-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* UI Overlays Layer */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 720px;
    max-height: 1280px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.pointer-enabled {
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

/* Glassmorphism Panel Base */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================================
   1. Home Screen
   ============================================================ */
#home-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 1.25rem 0.9rem 1.25rem;
    background: radial-gradient(circle at 50% 30%, rgba(14, 165, 233, 0.12) 0%, rgba(3, 7, 18, 0.88) 65%);
    z-index: 50;
    pointer-events: auto;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#home-screen::-webkit-scrollbar {
    display: none;
}

.home-header {
    text-align: center;
    margin-top: 0;
}

.domain-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cyan-glow);
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 9999px;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.main-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    line-height: 1.1;
    background: linear-gradient(180deg, #ffffff 30%, #93c5fd 80%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 35px rgba(56, 189, 248, 0.4);
}

.title-sub {
    color: var(--cyan-glow);
    font-weight: 700;
}

.tagline {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 380px;
    line-height: 1.35;
}

/* Home Card Stats */
.home-stats-card {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 400px;
    padding: 0.6rem 0.8rem;
    margin: 0.25rem 0;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--cyan-glow);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Nickname Selector */
.nickname-group {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.nickname-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.custom-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.2s ease;
}

.custom-input:focus {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

/* Home Action Buttons */
.home-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    max-width: 340px;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 60%, #0369a1 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 0.85rem 1.4rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.6);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-transform: uppercase;
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: var(--cyan-glow);
    color: #ffffff;
}

.home-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
}

.home-footer-controls {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.35rem;
}

.btn-audio-toggle {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.btn-audio-toggle:hover {
    color: #ffffff;
    border-color: var(--cyan-glow);
}

.btn-audio-toggle.muted {
    opacity: 0.55;
}

/* Ahmad Hassan Signature Blue Pill Badge */
.ahmad-signature-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: rgba(11, 20, 38, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 9999px;
    padding: 0.35rem 0.95rem;
    font-size: 0.72rem;
    font-family: var(--font-body);
    color: #cbd5e1;
    margin-top: 0.35rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 12px rgba(14, 165, 233, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    text-align: center;
}

.ahmad-signature-pill:hover {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.pill-text {
    line-height: 1.2;
}

.pill-divider {
    color: rgba(148, 163, 184, 0.45);
    font-size: 0.85rem;
}

.pill-linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pill-linkedin-link:hover {
    color: #bae6fd;
    text-decoration: underline;
}

.linkedin-icon {
    width: 14px;
    height: 14px;
    color: #0ea5e9;
    flex-shrink: 0;
}


/* ============================================================
   2. In-Game HUD
   ============================================================ */
#hud-screen {
    position: absolute;
    inset: 0;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.hud-top-bar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hud-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hud-score-panel {
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--panel-border);
    padding: 0.35rem 0.9rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.hud-score-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hud-score-val {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
}

.hud-year-panel {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--panel-border);
    padding: 0.35rem 1.1rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.hud-year-val {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--cyan-glow);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    line-height: 1.1;
}

.hud-era-val {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hud-actions-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
}

.hud-icon-btn {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--panel-border);
    color: #ffffff;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hud-icon-btn:hover {
    border-color: var(--cyan-glow);
    background: rgba(30, 41, 59, 0.9);
}

/* Timeline Progress Bar (1957 -> 2026) */
.timeline-progress-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.timeline-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #fbbf24 95%, #ef4444 100%);
    border-radius: 9999px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

/* Status Row: Health, Boost, Combos */
.hud-status-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.3rem;
}

/* Health Bar */
.health-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.desktop-key-hint {
    font-size: 0.56rem;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.05rem 0.32rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-weight: 800;
}

@media (max-width: 600px) {
    .desktop-key-hint {
        display: none;
    }
}

.health-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.health-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 6px;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.health-bar-bg.critical .health-bar-fill {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
    animation: criticalPulse 0.5s infinite alternate;
}

@keyframes criticalPulse {
    from { opacity: 0.7; }
    to { opacity: 1.0; }
}

/* Boost Meter */
.boost-meter-wrapper {
    width: 75px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.boost-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.boost-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
    border-radius: 6px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Blaster Weapon Tier in HUD */
.blaster-meter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.blaster-level-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    color: #fbbf24;
}

.blaster-pips {
    display: flex;
    gap: 0.2rem;
}

.blaster-pips .pip {
    width: 5px;
    height: 8px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.blaster-pips .pip.active {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.85);
}

/* Shield Icon in HUD */
.shield-badge {
    background: rgba(14, 165, 233, 0.25);
    border: 1px solid var(--cyan-glow);
    color: var(--cyan-glow);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: shieldGlow 1.2s infinite alternate;
}

@keyframes shieldGlow {
    from { box-shadow: 0 0 4px rgba(56, 189, 248, 0.2); }
    to { box-shadow: 0 0 12px rgba(56, 189, 248, 0.7); }
}

/* Near-Miss Combo Badge */
.combo-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
    letter-spacing: 1px;
    animation: comboPop 0.2s ease-out;
}

@keyframes comboPop {
    0% { transform: scale(1.35); }
    100% { transform: scale(1.0); }
}

/* Mobile Bottom Controls (Dual buttons: Fire on Left, Boost on Right) */
.hud-bottom-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 1rem;
    pointer-events: none;
}

.mobile-action-btn {
    pointer-events: auto;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.mobile-action-btn:active {
    transform: scale(0.92);
}

.mobile-action-btn.fire-btn {
    background: radial-gradient(circle, #ea580c 0%, #0f172a 80%);
    border: 2px solid #f97316;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.45);
}

.mobile-action-btn.boost-btn {
    background: radial-gradient(circle, #0284c7 0%, #0f172a 80%);
    border: 2px solid var(--cyan-glow);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.mobile-action-btn.boost-btn.ready {
    animation: readyPulse 1.5s infinite;
}

@keyframes readyPulse {
    0% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
    50% { box-shadow: 0 0 25px rgba(56, 189, 248, 0.9); }
    100% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
}

/* ============================================================
   3. Era Announcement Banner Overlay
   ============================================================ */
#era-announcement {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    text-align: center;
    padding: 1.8rem 1.4rem;
    z-index: 60;
    pointer-events: none;
    animation: announceIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#era-announcement.fade-out {
    animation: announceOut 0.5s ease-out forwards;
}

/* 2026 Victory Modal Styles */
.victory-card {
    border-color: rgba(251, 191, 36, 0.5) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 35px rgba(251, 191, 36, 0.3) !important;
}

.victory-crown {
    font-size: 2.5rem;
    display: inline-block;
    animation: crownBob 2s infinite ease-in-out;
}

@keyframes crownBob {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.1); }
}

.victory-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fbbf24;
    text-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
}

.victory-subtitle {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--cyan-glow);
    letter-spacing: 1.5px;
    margin-top: 0.2rem;
}

.victory-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0.8rem 0;
}

.victory-actions-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.overdrive-btn {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #881337 100%) !important;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.45) !important;
    border-color: rgba(254, 205, 211, 0.3) !important;
}

.overdrive-btn:hover {
    box-shadow: 0 12px 30px rgba(225, 29, 72, 0.7) !important;
}

.era-year-badge {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cyan-glow);
    letter-spacing: 2px;
}

.era-name-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin: 0.3rem 0;
    text-transform: uppercase;
}

.era-sub-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.era-bonus-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--emerald-heal);
    color: #a7f3d0;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    letter-spacing: 1px;
}

/* ============================================================
   4. Game Over Screen
   ============================================================ */
#game-over-screen {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    z-index: 70;
    pointer-events: auto;
    overflow-y: auto;
}

.go-card {
    width: 100%;
    max-width: 480px;
    padding: 2rem 1.6rem;
    text-align: center;
    animation: goCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes goCardIn {
    0% { opacity: 0; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1.0); }
}

.go-header {
    margin-bottom: 1.2rem;
}

.go-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--crimson-danger);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.new-record-pill {
    display: inline-block;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #000000;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    margin-top: 0.4rem;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

.go-score-box {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1.2rem;
}

.go-score-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.go-score-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
    line-height: 1.1;
    margin-top: 0.2rem;
}

.go-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.go-stat-tile {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.6rem 0.4rem;
}

.go-stat-tile .title {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.2rem;
}

.go-stat-tile .val {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cyan-glow);
}

.go-submission-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
}

.go-submit-row {
    display: flex;
    gap: 0.5rem;
}

.go-submit-status {
    font-size: 0.78rem;
    color: var(--text-secondary);
    min-height: 1.2rem;
}

.go-actions-row {
    display: flex;
    gap: 0.8rem;
}

.go-actions-row .btn-primary,
.go-actions-row .btn-secondary {
    flex: 1;
}

/* ============================================================
   5. Leaderboard & Modals
   ============================================================ */
.modal-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(10px);
    z-index: 80;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 1.8rem;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #ffffff;
}

/* Tabs */
.lb-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 0.6rem;
    margin-bottom: 0.8rem;
}

.lb-tab-btn {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.6rem 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-tab-btn.active {
    background: rgba(14, 165, 233, 0.25);
    border-color: var(--cyan-glow);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.lb-status-bar {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

/* Leaderboard List */
.lb-table-wrapper {
    flex: 1;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}

.lb-table-header {
    display: grid;
    grid-template-columns: 50px 1fr 65px 65px 90px;
    padding: 0.6rem 0.8rem;
    background: rgba(30, 41, 59, 0.8);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 65px 65px 90px;
    padding: 0.7rem 0.8rem;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.lb-row:hover {
    background: rgba(56, 189, 248, 0.08);
}

.lb-rank {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-secondary);
}

.lb-row.rank-1 .lb-rank { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.lb-row.rank-2 .lb-rank { color: #cbd5e1; text-shadow: 0 0 8px rgba(203, 213, 225, 0.6); }
.lb-row.rank-3 .lb-rank { color: #d97706; text-shadow: 0 0 8px rgba(217, 119, 6, 0.6); }

.lb-pilot {
    display: flex;
    flex-direction: column;
}

.pilot-name {
    font-weight: 700;
    color: #ffffff;
}

.pilot-era {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.lb-year {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--cyan-glow);
}

.lb-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.lb-score {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #ffffff;
    text-align: right;
}

.current-player-row {
    background: rgba(14, 165, 233, 0.18) !important;
    border-left: 3px solid var(--cyan-glow);
}

.lb-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* How to play card */
.how-to-play-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.instruction-block {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
}

.instruction-block h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--cyan-glow);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.key-badge {
    display: inline-block;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-family: monospace;
    font-size: 0.82rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0.15rem;
}

/* Pause Modal */
.pause-card {
    text-align: center;
    padding: 2.2rem 1.8rem;
    width: 100%;
    max-width: 380px;
}

.pause-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--cyan-glow);
    margin-bottom: 1.5rem;
}

.pause-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Responsive Breakpoints */
@media (max-width: 480px) {
    .main-title {
        font-size: 2.4rem;
    }
    .home-stats-card {
        margin: 1rem 0;
    }
    .hud-year-val {
        font-size: 1.3rem;
    }
    .hud-score-val {
        font-size: 1.2rem;
    }
    .lb-table-header, .lb-row {
        grid-template-columns: 35px 1fr 50px 75px;
    }
    .lb-time {
        display: none;
    }
}
