/* ==========================================================================
   Bridge Builder - Professional Casual Arcade Visual & UX Design System
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    
    --bg-dark: #090d16;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-border: rgba(255, 255, 255, 0.12);
    --panel-border-hover: rgba(255, 255, 255, 0.28);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-gold: #fde047;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 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-main);
    -webkit-font-smoothing: antialiased;
}

#game-app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

/* ==========================================================================
   TOP BAR CONTROLS
   ========================================================================== */

#top-bar {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.circle-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--panel-border);
    color: #e2e8f0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.circle-icon-btn:hover {
    transform: translateY(-2px) scale(1.06);
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.circle-icon-btn:active {
    transform: scale(0.94);
}

.coin-pill {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 7px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-gold);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.coin-icon {
    font-size: 1.15rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   CAMERA TOAST
   ========================================================================== */

.camera-toast {
    position: absolute;
    top: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 15;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.4, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.camera-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   MAIN MENU UI SCREEN
   ========================================================================== */

#menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 28px 20px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#menu-screen.hidden {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

/* Clean, Premium Arcade Game Title */
.game-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
    pointer-events: auto;
}

.game-sub-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(129, 140, 248, 0.4);
    padding: 4px 14px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    color: #a5b4fc;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
    backdrop-filter: blur(8px);
}

.title-main {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6.5vw, 4.2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.0;
    text-align: center;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.crown-score-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 6px 18px;
    border-radius: 24px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.crown-icon {
    font-size: 1.25rem;
}

.crown-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

/* Bottom Container: Houses username badge & bottom buttons */
.bottom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    pointer-events: auto;
    margin-bottom: 18px;
}

/* Player Profile Badge */
.player-profile-badge {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    padding: 4px 6px 4px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.player-profile-badge:hover {
    border-color: var(--panel-border-hover);
    transform: translateY(-2px);
}

#player-name-input {
    border: none;
    outline: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    width: 130px;
    background: transparent;
}

#player-name-input::placeholder {
    color: #64748b;
}

.flag-select-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.flag-select-btn:hover {
    transform: scale(1.1);
    background: rgba(51, 65, 85, 0.9);
}

.flag-dropdown {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 210px;
    max-height: 240px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flag-dropdown.hidden {
    display: none;
}

.flag-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.flag-option:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #ffffff;
}

/* Bottom Menu Bar: Skins, Central Play Button, Modes */
.bottom-menu-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bottom-pill-btn {
    height: 52px;
    padding: 0 20px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--panel-border);
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.bottom-pill-btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.bottom-pill-btn:active {
    transform: scale(0.95);
}

/* Central Tactile Giant Play Button */
.giant-play-btn {
    width: 140px;
    height: 64px;
    border-radius: 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    border: 2px solid rgba(165, 180, 252, 0.35);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
    animation: playBtnPulse 3s infinite ease-in-out;
}

.giant-play-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    box-shadow: 0 12px 36px rgba(79, 70, 229, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.giant-play-btn:active {
    transform: translateY(0px) scale(0.96);
}

@keyframes playBtnPulse {
    0%, 100% { box-shadow: 0 8px 28px rgba(79, 70, 229, 0.45); }
    50% { box-shadow: 0 10px 36px rgba(79, 70, 229, 0.65); }
}

/* ==========================================================================
   IN-GAME HUD
   ========================================================================== */

#game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

#game-hud.hidden {
    opacity: 0;
    pointer-events: none;
}

.hud-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
}

.hud-score-display {
    font-family: var(--font-heading);
    font-size: clamp(3.6rem, 10vw, 5.2rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 0.9;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.hud-score-display.bump {
    transform: scale(1.22);
}

.hud-sub-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.mode-tag, .speed-tag, .timer-tag, .hud-coin-tag {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--panel-border);
    padding: 4px 12px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    backdrop-filter: blur(10px);
}

.mode-tag { color: #a5b4fc; }
.speed-tag { color: #38bdf8; }
.timer-tag { color: #f43f5e; }
.hud-coin-tag { color: var(--text-gold); }

.pause-hud-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--panel-border);
    color: #ffffff;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.pause-hud-btn:hover {
    transform: scale(1.08);
    background: rgba(30, 41, 59, 0.9);
}

/* Combo Toast */
.combo-toast {
    position: absolute;
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(6, 182, 212, 0.6);
    padding: 8px 24px;
    border-radius: 24px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.4);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.combo-toast.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
}

/* Speed Up Toast */
.speed-toast {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(20px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.5);
    padding: 6px 20px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: #38bdf8;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.speed-toast.active {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

/* Record Break Toast */
.record-toast {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(15, 23, 42, 0.92);
    border: 2px solid rgba(245, 158, 11, 0.6);
    padding: 10px 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 32px rgba(245, 158, 11, 0.35);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.record-toast.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
}

.record-toast-icon { font-size: 1.6rem; }
.record-toast-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 0.05em;
}
.record-toast-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* Fever Toast */
.fever-toast {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(245, 158, 11, 0.9) 100%);
    border: 2px solid #ffffff;
    padding: 12px 32px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 12px 36px rgba(239, 68, 68, 0.5);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fever-toast.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
}

.touch-jump-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* ==========================================================================
   MODALS (Glassmorphism & Clean Hierarchy)
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.25s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--panel-border);
    color: #94a3b8;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #ffffff;
}

.modal-body {
    overflow-y: auto;
    padding-right: 4px;
}

/* ==========================================================================
   SKINS SHOP MODAL
   ========================================================================== */

.shop-balance {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-gold);
}

.skins-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.skin-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.skin-card.selected {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.15);
}

.skin-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skin-mini-crest {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    left: 25px;
}

.skin-mini-eyes {
    display: flex;
    gap: 10px;
    position: absolute;
    top: 22px;
    left: 18px;
}

.skin-mini-eye {
    width: 12px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    position: relative;
}

.skin-mini-pupil {
    width: 6px;
    height: 8px;
    border-radius: 50%;
    background: #111122;
    position: absolute;
    top: 3px;
    left: 3px;
}

.skin-info {
    text-align: center;
}

.skin-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.skin-rarity {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.skin-rarity.common { color: #94a3b8; }
.skin-rarity.rare { color: #38bdf8; }
.skin-rarity.epic { color: #c084fc; }
.skin-rarity.legendary { color: #fbbf24; }

.skin-perk {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.skin-action {
    width: 100%;
    margin-top: 4px;
}

.btn-skin-action {
    width: 100%;
    padding: 8px 0;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-equipped {
    background: #4f46e5;
    color: #ffffff;
}

.btn-equip {
    background: rgba(51, 65, 85, 0.8);
    color: #ffffff;
}

.btn-equip:hover {
    background: #4f46e5;
}

.btn-unlock.can-afford {
    background: #f59e0b;
    color: #0f172a;
}

.btn-unlock.can-afford:hover {
    background: #fbbf24;
}

.btn-unlock.cannot-afford {
    background: rgba(51, 65, 85, 0.5);
    color: #64748b;
    cursor: not-allowed;
}

/* ==========================================================================
   GAME MODES MODAL
   ========================================================================== */

.modes-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-card:hover {
    border-color: var(--panel-border-hover);
    background: rgba(51, 65, 85, 0.7);
    transform: translateX(4px);
}

.mode-card.selected {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.15);
}

.mode-badge-icon {
    font-size: 1.5rem;
}

.mode-details {
    flex: 1;
}

.mode-details h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.mode-details p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.mode-difficulty {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.08em;
}

.mode-difficulty.normal { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.mode-difficulty.hard { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.mode-difficulty.expert { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.mode-difficulty.frenzy { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* ==========================================================================
   LEADERBOARD & INFO MODALS
   ========================================================================== */

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 10px 14px;
}

.leaderboard-item.current-player {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.2);
}

.lb-rank {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    width: 28px;
    color: #94a3b8;
}

.lb-rank.rank-top {
    font-size: 1.2rem;
}

.lb-flag { font-size: 1.2rem; }

.lb-name {
    flex: 1;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
}

.lb-score {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.0rem;
    color: var(--text-gold);
}

.info-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 12px 14px;
}

.info-step-icon { font-size: 1.6rem; }
.info-step-text h4 {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 800;
    color: #ffffff;
}
.info-step-text p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* ==========================================================================
   GAME OVER MODAL
   ========================================================================== */

.gameover-card {
    text-align: center;
    align-items: center;
}

.gameover-title {
    font-family: var(--font-heading);
    font-size: 2.0rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #ffffff;
}

.new-record-tag {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    padding: 4px 16px;
    border-radius: 20px;
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.new-record-tag.hidden { display: none; }

.death-reason-tag {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
    margin-top: 6px;
    text-transform: uppercase;
}

.gameover-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.go-stat-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.go-stat-label {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
}

.go-stat-val {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 2px;
}

.gameover-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-go-main {
    width: 100%;
    height: 52px;
    border-radius: 26px;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    border: 1px solid rgba(165, 180, 252, 0.3);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    transition: all 0.2s ease;
}

.btn-go-main:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.55);
}

.gameover-sub-actions {
    display: flex;
    gap: 10px;
}

.btn-go-secondary {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--panel-border);
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* ==========================================================================
   PAUSE MODAL
   ========================================================================== */

.pause-card {
    text-align: center;
    align-items: center;
}

.pause-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 20px;
}
