/* css/style.css - DRIFT NC: NFS PREMIUM EDITION */
/* ═══════════════════════════════════════════════════════════════
   RACING PREMIUM DARK THEME — Need for Speed Vibes
   ═══════════════════════════════════════════════════════════════ */

/* --- 1. CONFIGURATION & VARIABLES --- */
:root {
    --bg-lagoon: radial-gradient(circle at center, #22d3ee 0%, #0284c7 60%, #0c4a6e 100%);
    --bg-mobile: radial-gradient(circle at center, #0033a0 0%, #001f60 60%, #000a20 100%);
    --bg-partner: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);

    /* NFS Premium Glass */
    --glass-bg: rgba(8, 12, 21, 0.92);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-glow: 0 0 40px rgba(0, 0, 0, 0.5);

    /* Neon accents - Racing Premium */
    --accent-cyan: #00e5ff;
    --accent-yellow: #ffab00;
    --accent-red: #ff1744;
    --accent-green: #00e676;
    --accent-mobil: #0033a0;
    --accent-gold: #ffd740;
    --accent-boulari: #ef4444;

    /* NFS Neon Glows */
    --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.4), 0 0 60px rgba(0, 229, 255, 0.1);
    --glow-gold: 0 0 20px rgba(255, 171, 0, 0.4), 0 0 60px rgba(255, 171, 0, 0.1);
    --glow-red: 0 0 20px rgba(255, 23, 68, 0.4);
    --glow-green: 0 0 20px rgba(0, 230, 118, 0.4);

    --font-ui: 'Inter', sans-serif;
    --font-display: 'Orbitron', monospace;

    /* Racing stripe animation */
    --stripe-speed: 3s;

    /* Surface hierarchy */
    --surface-1: rgba(5, 10, 20, 0.97);
    --surface-2: rgba(10, 16, 30, 0.92);
    --surface-3: rgba(15, 22, 40, 0.85);

    /* Text hierarchy */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-muted: rgba(255, 255, 255, 0.3);

    /* Gradient accents */
    --gradient-cyan: linear-gradient(135deg, #00e5ff, #0097a7);
    --gradient-gold: linear-gradient(135deg, #ffd740, #ff8f00);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden;
    font-family: var(--font-ui); color: white;
    background: #050a14;
}

canvas { display: block; width: 100%; height: 100%; position: fixed; inset: 0; z-index: 1; background: #0c4a6e; }

/* ═══════════════════════════════════════════════════════════════
   HUD — Racing Premium Dashboard
   ═══════════════════════════════════════════════════════════════ */

#hud-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    pointer-events: none; z-index: 10; padding: 10px;
    display: grid; grid-template-columns: 1fr 140px 1fr; align-items: start; gap: 5px;
}

.hud-card {
    background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.55) 100%);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08); 
    border-bottom: 1px solid rgba(0,229,255,0.15);
    padding: 6px 0; border-radius: 10px;
    display: flex; flex-direction: column; justify-content: center; min-height: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.hud-card.left { justify-self: start; align-items: flex-start; padding-left: 10px; padding-right: 10px; }
.hud-card.center { justify-self: center; align-items: center; width: 100%; }
.hud-card.right { justify-self: end; align-items: flex-end; padding-left: 10px; padding-right: 10px; }

.hud-top { display: flex; align-items: center; gap: 4px; margin-bottom: 0px; }
.label { 
    font-size: 0.55rem; text-transform: uppercase; letter-spacing: 2px; 
    color: var(--accent-cyan); font-weight: 700; opacity: 0.8;
}

.big-time { 
    font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; color: white; 
    text-shadow: 0 0 10px rgba(255,255,255,0.3), 0 2px 5px rgba(0,0,0,0.8); 
    line-height: 1.1;
    font-variant-numeric: tabular-nums; letter-spacing: 1px; white-space: nowrap;
}

.sub-info { 
    font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: white; 
    line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; 
}
.text-yellow { color: var(--accent-gold); text-shadow: 0 0 10px rgba(255,171,0,0.3); }

/* ═══════════════════════════════════════════════════════════════
   SPEEDOMETER — Digital Racing Gauge
   ═══════════════════════════════════════════════════════════════ */

#speedometer {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 15;
    display: none;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 8px 14px 6px;
    min-width: 72px;
    pointer-events: none;
}

.speedo-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    text-shadow: 0 0 12px rgba(0,229,255,0.4), 0 2px 4px rgba(0,0,0,0.8);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

.speedo-unit {
    font-family: var(--font-display);
    font-size: 0.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    margin-top: 1px;
}

.speedo-bar-track {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.speedo-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, #00e5ff, #00e5ff);
    transition: width 0.1s linear, background 0.3s ease;
    box-shadow: 0 0 6px rgba(0,229,255,0.5);
}

.speedo-bar-fill.high-speed {
    background: linear-gradient(90deg, #ff8f00, #ff5722);
    box-shadow: 0 0 6px rgba(255,143,0,0.5);
}

.speedo-bar-fill.max-speed {
    background: linear-gradient(90deg, #ff1744, #d50000);
    box-shadow: 0 0 8px rgba(255,23,68,0.6);
}

/* Mobile: slightly smaller */
@media (max-width: 600px) {
    #speedometer {
        bottom: 12px;
        left: 12px;
        padding: 6px 10px 5px;
        min-width: 60px;
        border-radius: 10px;
    }
    .speedo-value { font-size: 1.3rem; }
    .speedo-unit { font-size: 0.45rem; }
}

/* ═══════════════════════════════════════════════════════════════
   CARROUSEL — Cinematic Transitions
   ═══════════════════════════════════════════════════════════════ */

#welcome-screen { 
    position: absolute; inset: 0; z-index: 50; 
    background: #050a14; 
    display: block; 
}

/* Subtle animated background */
#welcome-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(0,229,255,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255,171,0,0.02) 0%, transparent 50%);
    z-index: 0;
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

#main-carousel { 
    display: flex; overflow-x: hidden; overflow-y: hidden; 
    width: 100%; height: 100%; 
    scroll-snap-type: x mandatory;
}

.carousel-slide { 
    flex: 0 0 100%; width: 100%; height: 100%; 
    position: relative; cursor: pointer; overflow: hidden; 
    transition: transform 0.5s ease;
    scroll-snap-align: start;
}

.slide-backdrop { 
    position: absolute; inset: 0; background-size: cover; background-position: center; 
    filter: blur(30px) brightness(0.3) saturate(1.2); 
    transform: scale(1.1); z-index: 1; display: none; 
}

.slide-bg { 
    position: absolute; inset: 0; 
    background-position: center; background-repeat: no-repeat; 
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); 
    z-index: 2; 
}

@media (max-aspect-ratio: 1/1) { .slide-bg { background-size: cover; } }
@media (min-aspect-ratio: 1/1) {
    .slide-backdrop { display: block; }
    .slide-bg { background-size: contain; filter: drop-shadow(0 0 40px rgba(0,0,0,0.9)); }
    .carousel-slide:hover .slide-bg { transform: scale(1.03) translateY(-5px); }
}

.slide-content {
    position: absolute; bottom: 0; left: 0; width: 100%; 
    padding: 150px 30px 110px 30px; 
    background: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    pointer-events: none; z-index: 3;
}

.slide-title {
    font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 3.5rem); font-weight: 900;
    text-transform: uppercase; margin-bottom: 5px;
    text-shadow: 0 0 30px rgba(0,229,255,0.3), 0 5px 20px black;
    line-height: 1;
    letter-spacing: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #cfd8dc 40%, #90a4ae 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-subtitle { 
    font-size: 0.9rem; color: rgba(255,255,255,0.6); font-weight: 600; 
    letter-spacing: 4px; margin-bottom: 20px; text-shadow: 0 2px 5px black; 
    text-transform: uppercase;
}

.tap-hint {
    font-family: var(--font-display); font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 5px;
    border: 1px solid rgba(0,229,255,0.25); padding: 10px 28px;
    border-radius: 50px; background: rgba(0,0,0,0.6); backdrop-filter: blur(12px);
    animation: hintPulse 2.5s ease-in-out infinite;
    color: rgba(0,229,255,0.85);
    position: relative; overflow: hidden;
}
.tap-hint::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,229,255,0.1), transparent);
    animation: sweep 3s ease-in-out infinite;
}
@keyframes sweep { 0% { left: -100%; } 50%, 100% { left: 100%; } }

@keyframes hintPulse {
    0%, 100% { opacity: 0.6; border-color: rgba(0,229,255,0.2); box-shadow: none; }
    50% { opacity: 1; border-color: rgba(0,229,255,0.5); box-shadow: var(--glow-cyan); }
}

.carousel-dots { 
    position: absolute; bottom: 20px; width: 100%; 
    display: flex; justify-content: center; gap: 10px; 
    pointer-events: none; z-index: 4; 
}
.dot {
    width: 6px; height: 6px; background: rgba(255,255,255,0.15);
    border-radius: 50%; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.dot.active {
    width: 24px; border-radius: 3px;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0,229,255,0.6);
}

/* --- FLÈCHES CARROUSEL (NFS Premium) --- */
.carousel-arrow {
    position: absolute; top: 50%; width: 56px; height: 56px;
    background: rgba(0, 0, 0, 0.7); 
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50%;
    cursor: pointer; z-index: 55; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: pulseArrow 3s ease-in-out infinite;
    display: block; padding: 0; margin: 0;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s, background 0.3s;
}
.carousel-arrow:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.1);
}
.arrow-left { left: 15px; } 
.arrow-right { right: 15px; }

.carousel-arrow svg { 
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 28px; height: 28px; stroke: white; stroke-width: 2.5; fill: none; 
    display: block; margin: 0;
    transition: stroke 0.3s;
}
.carousel-arrow:hover svg { stroke: var(--accent-cyan); }

@keyframes pulseArrow { 
    0% { transform: translateY(-50%) scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.6); } 
    50% { transform: translateY(-50%) scale(1.05); box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 15px rgba(0,229,255,0.15); } 
    100% { transform: translateY(-50%) scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.6); } 
}

/* ═══════════════════════════════════════════════════════════════
   OVERLAYS — Glass Morphism Premium
   ═══════════════════════════════════════════════════════════════ */

#selection-overlay, #race-mode-select, #difficulty-select-screen, 
#car-select-screen, #global-leaderboard-screen, #settings-screen, 
#dq-screen, #pause-menu, #mobile-race-select, #mobile-drift-select,
#auth-screen, #profile-screen {
    position: absolute; inset: 0;
    background: rgba(5, 10, 20, 0.6); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 100; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; padding: 20px;
}

#race-mode-select h2, #difficulty-select-screen h2, #car-select-screen h2, 
#mobile-race-select h2, #mobile-drift-select h2, #settings-screen h2 { 
    text-shadow: 0 0 20px rgba(0,229,255,0.2), 0 4px 15px rgba(0, 0, 0, 0.9); 
}

#selection-overlay {
    background: transparent;
    z-index: 60; display: none; animation: overlayIn 0.5s ease;
}

@keyframes overlayIn { 
    from { opacity: 0; backdrop-filter: blur(0px); } 
    to { opacity: 1; backdrop-filter: blur(20px); } 
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#overlay-title {
    font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 900; margin: 0;
    text-shadow: 0 0 30px rgba(0,229,255,0.25), 0 4px 20px rgba(0,0,0,0.8);
    letter-spacing: 4px; color: white; text-transform: uppercase;
}

/* BOUTONS MODES */
.mode-btn {
    flex: 1 1 150px; background: var(--glass-bg); border: var(--glass-border); border-radius: 12px;
    height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: white; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
    cursor: pointer; transition: all 0.3s; text-transform: uppercase;
    box-shadow: var(--glass-glow);
}
.mode-btn:hover { transform: translateY(-3px); background: rgba(15, 23, 42, 0.95); border-color: rgba(255,255,255,0.2); }
.btn-race:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); box-shadow: var(--glow-cyan); }
.btn-drift:hover { border-color: var(--accent-gold); color: var(--accent-gold); box-shadow: var(--glow-gold); }
.btn-mobil-race:hover { border-color: var(--accent-mobil); color: var(--accent-mobil); }
.btn-mobil-drift:hover { border-color: #ef4444; color: #ef4444; box-shadow: var(--glow-red); }
.btn-boulary:hover { border-color: var(--accent-boulari); color: var(--accent-boulari); }

.utility-bar { position: absolute; bottom: 30px; display: flex; gap: 15px; }
.utility-small { 
    background: transparent; border: none; color: rgba(255,255,255,0.35); 
    font-size: 0.75rem; cursor: pointer; text-transform: uppercase; 
    font-weight: 700; letter-spacing: 2px;
    transition: all 0.3s;
}
.utility-small:hover { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(0,229,255,0.3); }

.close-overlay {
    position: absolute; top: 30px; right: 30px; font-size: 2rem;
    cursor: pointer; color: rgba(255,255,255,0.3); transition: all 0.3s;
}
.close-overlay:hover { color: var(--accent-cyan); transform: rotate(90deg); text-shadow: 0 0 15px rgba(0,229,255,0.5); }

/* Back arrow button (for overlays) */
.back-arrow-btn {
    position: absolute; top: 30px; left: 20px; z-index: 10;
    width: 44px; height: 44px;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
    color: rgba(255, 255, 255, 0.5); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.back-arrow-btn:hover {
    border-color: var(--accent-cyan); color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

/* --- AUTH SCREENS --- */
.glass-panel {
    background: rgba(8, 12, 21, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(16px);
    border-radius: 20px;
}
.auth-view { width: 100%; max-width: 400px; padding: 10px; text-align: center; animation: fadeIn 0.3s ease-out; }
input::placeholder { color: #475569; font-weight: 500; text-transform: uppercase; font-size: 0.8em; letter-spacing: 1px; }

/* ═══════════════════════════════════════════════════════════════
   LEADERBOARD & INPUT — Premium Panel
   ═══════════════════════════════════════════════════════════════ */

#leaderboard-panel {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 92%; max-width: 420px; z-index: 200;
    background: var(--surface-1);
    border: 1px solid rgba(0, 229, 255, 0.08);
    border-top: 2px solid var(--accent-cyan);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.9), 0 0 40px rgba(0,229,255,0.04);
    backdrop-filter: blur(24px); padding: 28px 24px; text-align: center;
    display: none; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 85vh; overflow-y: auto;
}
@keyframes popIn { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

#player-name {
    background: rgba(0, 0, 0, 0.7); border: 2px solid rgba(255, 171, 0, 0.2);
    color: var(--accent-gold); padding: 15px; border-radius: 12px; width: 100%;
    text-align: center; font-family: var(--font-display); font-size: 1.5rem;
    font-weight: 900; text-transform: uppercase; outline: none; margin-bottom: 15px;
    letter-spacing: 2px; transition: all 0.3s;
}
#player-name:focus { 
    border-color: var(--accent-gold); background: rgba(0,0,0,0.9); 
    box-shadow: 0 0 30px rgba(255, 171, 0, 0.2); 
}
#player-name::placeholder { color: rgba(255, 255, 255, 0.2); font-size: 1rem; }

/* Showroom Cards — NFS Style */
.showroom-grid { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; width: 100%; max-width: 900px; }
.showroom-card {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 20px;
    overflow: hidden; cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%; max-width: 320px; position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: cardSlideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}
.showroom-card:nth-child(1) { animation-delay: 0.05s; }
.showroom-card:nth-child(2) { animation-delay: 0.15s; }
.showroom-card::after {
    content: '';
    position: absolute; bottom: 0; left: 10%; right: 10%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0; transition: opacity 0.4s, left 0.4s, right 0.4s;
}
.showroom-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,229,255,0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0,229,255,0.08);
}
.showroom-card:hover::after { opacity: 1; left: 0; right: 0; }
.showroom-card:active { transform: translateY(-3px) scale(0.98); }

.showroom-img-wrap {
    width: 100%; aspect-ratio: 16 / 10;
    background: radial-gradient(ellipse at center bottom, rgba(0,229,255,0.04) 0%, transparent 70%);
    display: flex; align-items: center; justify-content: center; padding: 16px; position: relative;
}
.showroom-img-wrap img {
    width: 90%; height: 90%; object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.6));
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.showroom-card:hover .showroom-img-wrap img { transform: scale(1.08) translateY(-5px); }

.showroom-info {
    padding: 16px 20px; background: rgba(0, 0, 0, 0.25);
    display: flex; flex-direction: column; align-items: flex-start;
    border-top: 1px solid rgba(255,255,255,0.03);
}
.showroom-title { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: white; margin-bottom: 3px; letter-spacing: 1.5px; }
.showroom-sub { font-size: 0.7rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 2px; }
.stats { margin-top: 8px; width: 100%; }
.stat-row { display: flex; justify-content: space-between; font-size: 0.65rem; color: #cbd5e1; margin-bottom: 2px; }
.stat-track { width: 100%; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.stat-fill { height: 100%; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green)); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════════
   CONTRÔLES MOBILE
   ═══════════════════════════════════════════════════════════════ */

#mobile-controls { position: absolute; inset: 0; pointer-events: none; z-index: 40; display: flex; background: transparent !important; }
#mobile-controls .btn { background-color: transparent; }

body.arcade-mode #btn-left, body.arcade-mode #btn-right {
    position: absolute; top: 140px; bottom: 0; width: 50%; height: auto;
    background: transparent !important; border: none; border-radius: 0; backdrop-filter: none;
    pointer-events: auto; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 20%; z-index: 40;
    /* Zone feedback : bordure subtile pour indiquer la zone tactile */
    border-right: 1px solid rgba(255,255,255,0.03);
    transition: background 0.1s;
}
body.arcade-mode #btn-left { left: 0; }
body.arcade-mode #btn-right { right: 0; border-right: none; border-left: 1px solid rgba(255,255,255,0.03); }

body.arcade-mode #btn-left:active, body.arcade-mode #btn-left.active,
body.arcade-mode #btn-right:active, body.arcade-mode #btn-right.active {
    background: rgba(0,229,255,0.04) !important;
}

.control-icon { 
    width: 60px; height: 60px; opacity: 0.5; 
    filter: drop-shadow(0 0 8px rgba(0,229,255,0.3)) drop-shadow(0 2px 5px rgba(0,0,0,0.8)); 
    transition: all 0.15s; 
}
body.arcade-mode #btn-left:active .control-icon, body.arcade-mode #btn-left.active .control-icon { 
    transform: scale(1.2) translateX(-10px); opacity: 1; 
    filter: drop-shadow(0 0 15px rgba(0,229,255,0.6)); 
}
body.arcade-mode #btn-right:active .control-icon, body.arcade-mode #btn-right.active .control-icon { 
    transform: scale(1.2) translateX(10px); opacity: 1; 
    filter: drop-shadow(0 0 15px rgba(0,229,255,0.6)); 
}

body.arcade-mode #btn-brake {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 140px; height: 80px; 
    background: rgba(255, 23, 68, 0.25); border: 2px solid rgba(255, 23, 68, 0.4);
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    color: white; font-family: var(--font-display); font-weight: 900; font-size: 1.2rem;
    pointer-events: auto; z-index: 50; backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(255,23,68,0.15);
    transition: all 0.15s;
}
body.arcade-mode #btn-brake:active, body.arcade-mode #btn-brake.active { 
    background: rgba(255, 23, 68, 0.6); transform: translateX(-50%) scale(0.95); 
    box-shadow: 0 0 30px rgba(255,23,68,0.4);
}
body.arcade-mode #btn-gas { display: none !important; }

body:not(.arcade-mode) #mobile-controls { align-items: flex-end; padding: 20px; }
body:not(.arcade-mode) .control-group { display: flex; gap: 15px; pointer-events: auto; }
body:not(.arcade-mode) .btn {
    width: 70px; height: 70px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 900; backdrop-filter: blur(5px);
    pointer-events: auto;
}

/* BOUTONS FLOTTANTS — Premium */
#pause-btn, #quick-restart-btn {
    position: absolute; top: 90px; width: 44px; height: 44px;
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
    align-items: center; justify-content: center; cursor: pointer; z-index: 200;
    backdrop-filter: blur(8px); color: white; display: none;
    transition: all 0.2s;
}
#pause-btn:hover, #quick-restart-btn:hover { 
    border-color: rgba(0,229,255,0.3); 
    box-shadow: 0 0 15px rgba(0,229,255,0.15); 
}
#pause-btn { right: 20px; }
#quick-restart-btn { right: 74px; }

/* MENUS PAUSE — NFS Premium */
.pause-btn-primary, .pause-btn-secondary, .pause-btn-danger, .pause-btn-setting { 
    width: 100%; border-radius: 10px; font-weight: 700; border: none; 
    cursor: pointer; padding: 12px; transition: all 0.2s;
}
.pause-btn-primary { 
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0097a7 100%); 
    color: black; padding: 15px; 
    box-shadow: 0 4px 15px rgba(0,229,255,0.3);
}
.pause-btn-primary:hover { box-shadow: 0 4px 25px rgba(0,229,255,0.5); transform: translateY(-1px); }
.pause-btn-secondary { border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); color: white; margin-top: 10px; }
.pause-btn-secondary:hover { background: rgba(255,255,255,0.08); }
.pause-btn-danger { border: 1px solid rgba(255,23,68,0.2); background: rgba(255,23,68,0.05); color: #ff8a80; margin-top: 10px; }
.pause-btn-danger:hover { background: rgba(255,23,68,0.15); color: white; }
.pause-btn-setting { background: rgba(255,255,255,0.03); color: white; display:flex; flex-direction:column; align-items:center; border: 1px solid rgba(255,255,255,0.08); }
.pause-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

/* COUNTDOWN — Cinematic */
#countdown-layer { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    display: flex; align-items: center; justify-content: center; 
    pointer-events: none; z-index: 100; background: transparent; 
}
.go-text { 
    font-family: var(--font-display); font-size: 8rem; font-weight: 900; 
    color: var(--accent-green); 
    text-shadow: 0 0 60px rgba(0,230,118,0.6), 0 0 120px rgba(0,230,118,0.2), 0 4px 10px black; 
    animation: goPopOut 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; 
}
.rolling-text { 
    font-family: var(--font-display); font-size: 4rem; font-weight: 900; 
    color: white; text-shadow: 0 0 30px rgba(0,229,255,0.4), 0 0 60px black; 
    letter-spacing: 8px; animation: pulse 1.5s ease-in-out infinite; 
}
@keyframes goPopOut { 
    0% {transform:scale(0); opacity:0;} 
    40% {transform:scale(1.3); opacity:1;} 
    100% {transform:scale(2); opacity:0;} 
}
@keyframes pulse { 0%, 100% {opacity:1;} 50% {opacity:0.6;} }

/* DRIFT UI — Neon Style */
#drift-ui { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; display: none; z-index: 20; }
.combo-box { display: flex; flex-direction: column; align-items: center; }
.combo-text { 
    font-family: var(--font-display); font-size: 1.8rem; font-weight: 900; 
    color: var(--accent-gold); text-shadow: 0 0 15px rgba(255,171,0,0.5); 
    letter-spacing: 4px; 
}
.combo-mult { 
    font-size: 3.5rem; font-weight: 900; color: white; line-height: 1; 
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    transition: transform 0.2s, color 0.3s;
}
.drift-score-inc { 
    font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-green); 
    margin-top: 5px; text-shadow: 0 0 10px rgba(0,230,118,0.4);
    transition: color 0.2s;
}

#wrong-way-alert {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-family: var(--font-display); font-size: 2rem; font-weight: 900;
    color: var(--accent-red); 
    text-shadow: 0 0 30px rgba(255,23,68,0.8);
    animation: wrongWayFlash 0.5s ease-in-out infinite alternate;
    display: none; z-index: 300;
}
@keyframes wrongWayFlash {
    from { opacity: 1; } to { opacity: 0.4; }
}

/* ACTION BUTTONS — Premium */
.action-btn { 
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%); 
    color: black; border: none; padding: 16px 32px; 
    font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; 
    border-radius: 50px; cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(255,255,255,0.15);
    letter-spacing: 1px;
}
.action-btn:hover { 
    transform: scale(1.05) translateY(-2px); 
    box-shadow: 0 8px 30px rgba(255,255,255,0.25); 
}

/* CLASSEMENT — Premium */
.gl-header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 24px;
}
.gl-header-icon {
    font-size: 2.2rem; 
    filter: drop-shadow(0 0 10px rgba(255,171,0,0.5));
}
.gl-header h2 {
    font-family: var(--font-display); font-weight: 900;
    font-size: 1.6rem; color: white; margin: 0;
    text-transform: uppercase; letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0,229,255,0.2), 0 4px 15px rgba(0,0,0,0.9);
}
#gl-tabs { display: flex; gap: 6px; margin-bottom: 18px; justify-content: center; flex-wrap: wrap; }
.gl-tab { 
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); 
    color: rgba(255,255,255,0.5); padding: 10px 14px; border-radius: 10px; 
    font-weight: 800; font-size: 0.75rem; cursor: pointer; flex: 1; min-width: 60px;
    transition: all 0.3s; text-transform: uppercase; font-family: var(--font-display);
    letter-spacing: 0.5px; text-align: center;
}
.gl-tab:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.gl-tab.active { 
    background: linear-gradient(135deg, #00b8d4, #00e5ff); color: black; 
    border-color: var(--accent-cyan); font-weight: 900;
    box-shadow: 0 0 25px rgba(0,229,255,0.35); 
}
.gl-list-container {
    background: rgba(0,0,0,0.45); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 16px; padding: 6px; 
    max-height: 55vh; overflow-y: auto;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}
.gl-list-container::-webkit-scrollbar { width: 4px; }
.gl-list-container::-webkit-scrollbar-track { background: transparent; }
.gl-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
#gl-list { width: 100%; display: flex; flex-direction: column; }
.gl-row { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); 
    font-family: var(--font-ui); transition: all 0.2s;
    border-radius: 8px; margin: 1px 0;
}
.gl-row:hover { background: rgba(255,255,255,0.04); }
.gl-row:last-child { border-bottom: none; }
.gl-rank { font-family: var(--font-display); font-weight: 900; width: 35px; text-align: center; color: #64748b; font-size: 0.95rem; }
.gl-name { flex: 1; font-weight: 700; text-transform: uppercase; padding-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: white; font-size: 0.9rem; letter-spacing: 0.5px; }
.gl-score { font-family: var(--font-display); font-weight: 800; color: var(--accent-gold); text-align: right; font-size: 0.9rem; }
.rank-1 .gl-rank { color: var(--accent-gold); text-shadow: 0 0 15px rgba(255,171,0,0.6); font-size: 1.1rem; }
.rank-1 { background: rgba(255,171,0,0.06); }
.rank-2 .gl-rank { color: #b0bec5; text-shadow: 0 0 10px rgba(176,190,197,0.4); }
.rank-3 .gl-rank { color: #a1887f; text-shadow: 0 0 10px rgba(161,136,127,0.4); }
.gl-back-btn {
    margin-top: 24px; background: rgba(255,255,255,0.04); 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    padding: 12px 28px; color: rgba(255,255,255,0.5);
    font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 2px; cursor: pointer; transition: all 0.3s;
    font-family: var(--font-display);
}
.gl-back-btn:hover { color: white; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }

/* PARTNER */
.partner-grid { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; max-width: 600px; margin-top: 20px; }
.partner-card { 
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06); 
    border-radius: 16px; padding: 25px; width: 100%; 
    display: flex; align-items: center; justify-content: space-between; 
    transition: all 0.3s ease; backdrop-filter: blur(10px); text-decoration: none; 
}
.partner-card:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: var(--glow-gold); }
.partner-icon { font-size: 2em; margin-right: 20px; color: var(--accent-gold); }
.partner-info h3 { font-family: var(--font-display); color: white; font-size: 1.2em; margin-bottom: 5px; margin-top: 0; }
.partner-info p { color: #64748b; font-size: 0.9em; margin: 0; }
.partner-action { background: var(--accent-gold); color: black; font-weight: bold; padding: 8px 16px; border-radius: 8px; font-size: 0.8em; text-transform: uppercase; }

.action-btn-small {
    background: transparent; color: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 30px; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
    border-radius: 50px; cursor: pointer; transition: all 0.3s; margin-top: 25px; 
    text-transform: uppercase; letter-spacing: 2px;
}
.action-btn-small:hover { 
    background: rgba(0,229,255,0.1); color: var(--accent-cyan); 
    border-color: var(--accent-cyan); transform: scale(1.05); 
    box-shadow: 0 0 20px rgba(0,229,255,0.15); 
}

#settings-screen .close-overlay { display: block; position: absolute; top: 30px; right: 30px; z-index: 200; }

#settings-screen {
    overflow-y: auto !important;
    justify-content: flex-start !important;
    padding: 80px 20px 100px 20px !important;
    -webkit-overflow-scrolling: touch;
}
#settings-screen h2 { flex-shrink: 0; }
#settings-screen .settings-grid { flex-shrink: 0; }
#settings-screen .action-btn-small { flex-shrink: 0; margin-top: 20px; margin-bottom: 30px; }

/* ═══════════════════════════════════════════════════════════════
   SETTINGS — NFS Premium Panel
   ═══════════════════════════════════════════════════════════════ */

.settings-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%; max-width: 400px; margin-bottom: 30px; }
.setting-group { 
    background: rgba(255, 255, 255, 0.02); padding: 15px; border-radius: 14px; 
    border: 1px solid rgba(255, 255, 255, 0.06); 
}
.setting-title { 
    font-size: 0.8rem; color: var(--accent-cyan); font-weight: 800; 
    text-transform: uppercase; margin-bottom: 10px; letter-spacing: 2px; 
}
.setting-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.setting-label { font-size: 0.9rem; color: rgba(255,255,255,0.8); font-weight: 600; }

/* TOGGLE — Premium */
.toggle-switch {
    display: flex; background: rgba(0, 0, 0, 0.5);
    border-radius: 10px; padding: 3px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.04); gap: 2px;
}
.toggle-option {
    padding: 7px 14px; font-size: 0.7rem; font-weight: 800;
    border-radius: 8px; color: rgba(255,255,255,0.25); transition: all 0.3s;
    letter-spacing: 0.5px;
}
.toggle-option.active {
    background: var(--accent-cyan); color: black;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

/* SLIDER — Premium */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { 
    -webkit-appearance: none; height: 18px; width: 18px; border-radius: 50%; 
    background: var(--accent-gold); cursor: pointer; margin-top: -7px; 
    box-shadow: 0 0 12px rgba(255,171,0,0.5); 
}
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: rgba(255, 255, 255, 0.1); border-radius: 2px; }

/* FEEDBACK BTN */
.feedback-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px; background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0,229,255,0.3); border-radius: 10px;
    color: var(--accent-cyan); text-decoration: none; font-weight: 700;
    font-size: 0.85rem; transition: all 0.3s;
}
.feedback-btn:hover { background: rgba(0, 229, 255, 0.2); box-shadow: var(--glow-cyan); }
.feedback-btn.whatsapp { background: rgba(37, 211, 102, 0.1); border-color: rgba(37,211,102,0.3); color: #25d366; }
.feedback-btn.whatsapp:hover { background: rgba(37, 211, 102, 0.2); }

/* ═══════════════════════════════════════════════════════════════
   MODE CARDS — NFS Premium Selection
   ═══════════════════════════════════════════════════════════════ */

.mode-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 440px;
    padding: 0 16px;
}

/* Force display state from JS */
#overlay-lagoon[style*="none"], #overlay-mobile[style*="none"],
#overlay-partner[style*="none"], #overlay-boulary[style*="none"],
#overlay-ai[style*="none"] { display: none !important; }

#overlay-lagoon:not([style*="none"]),
#overlay-mobile:not([style*="none"]) { display: grid; }

.mode-card {
    background: var(--surface-2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 180px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    animation: cardSlideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

.mode-card:nth-child(1) { animation-delay: 0.05s; }
.mode-card:nth-child(2) { animation-delay: 0.12s; }
.mode-card:nth-child(3) { animation-delay: 0.19s; }
.mode-card:nth-child(4) { animation-delay: 0.26s; }

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top accent line */
.mode-card::before {
    content: '';
    position: absolute; top: 0; left: 20%; right: 20%; height: 2px;
    background: var(--card-accent, var(--accent-cyan));
    opacity: 0;
    transition: opacity 0.3s, left 0.3s, right 0.3s;
}

/* Radial glow behind icon */
.mode-card::after {
    content: '';
    position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
    width: 120px; height: 120px;
    background: radial-gradient(circle, var(--card-accent, var(--accent-cyan)) 0%, transparent 70%);
    opacity: 0.04;
    transition: opacity 0.4s;
    pointer-events: none;
}

/* Card types */
.mode-card.race { --card-accent: var(--accent-cyan); border-color: rgba(0,229,255,0.12); }
.mode-card.drift { --card-accent: var(--accent-gold); border-color: rgba(255,171,0,0.12); }
.mode-card.mobil { --card-accent: #0066ff; border-color: rgba(0,102,255,0.12); }
.mode-card.raptor { --card-accent: var(--accent-red); border-color: rgba(255,23,68,0.12); }
.mode-card.boulari { --card-accent: var(--accent-red); border-color: rgba(255,23,68,0.12); }
.mode-card.ai { --card-accent: #a855f7; border-color: rgba(168,85,247,0.12); }

.mode-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 20px rgba(0,229,255,0.06);
}
.mode-card:hover::before { opacity: 1; left: 0; right: 0; }
.mode-card:hover::after { opacity: 0.1; }
.mode-card:active { transform: translateY(-1px) scale(0.98); }

.mode-icon {
    font-size: 2.8rem; margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.mode-card:hover .mode-icon { transform: scale(1.15) translateY(-3px); }
.mode-icon i { font-size: 2.4rem; }
.mode-title {
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 900;
    color: white; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px;
}
.mode-subtitle {
    font-size: 0.65rem; color: rgba(255,255,255,0.3);
    text-transform: uppercase; letter-spacing: 3px; margin-bottom: 14px;
}

.mode-record {
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; padding: 6px 12px;
    display: flex; align-items: center; gap: 6px; margin-top: auto;
}
.mode-record-icon { font-size: 0.9rem; }
.mode-record-value { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--accent-gold); }
.mode-record-none { font-size: 0.7rem; color: rgba(255,255,255,0.3); font-style: italic; }
.mode-card.wide { grid-column: span 2; }

/* Utility bar — Bottom navigation */
.utility-bar-v2 {
    position: absolute; bottom: 28px;
    display: flex; gap: 12px;
    background: rgba(0,0,0,0.55); padding: 10px 14px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.utility-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 12px 20px; color: rgba(255,255,255,0.6);
    font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1.5px; cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-display);
}
.utility-btn:hover { 
    background: rgba(0,229,255,0.12); color: var(--accent-cyan); 
    border-color: rgba(0,229,255,0.3); 
    box-shadow: 0 0 20px rgba(0,229,255,0.15);
    transform: translateY(-2px);
}
.utility-btn:active { transform: translateY(0); }
.utility-btn .icon { font-size: 1.1rem; }

.back-btn {
    position: absolute; top: 25px; left: 25px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px; padding: 10px 20px; color: rgba(255,255,255,0.5);
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s; display: flex; align-items: center; gap: 8px;
}
.back-btn:hover { background: rgba(0,229,255,0.1); color: var(--accent-cyan); border-color: rgba(0,229,255,0.2); }

/* ═══════════════════════════════════════════════════════════════
   BADGE PILOTE
   ═══════════════════════════════════════════════════════════════ */

.pilot-badge {
    position: absolute; top: 20px; right: 20px; z-index: 100;
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 50px;
    padding: 8px 16px 8px 12px; cursor: pointer; transition: all 0.3s;
}
.pilot-badge:hover { background: rgba(0,0,0,0.85); border-color: var(--accent-cyan); box-shadow: var(--glow-cyan); }
.pilot-avatar { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent-cyan), #0097a7); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.pilot-name { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 1px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-badge-icon { color: rgba(255,255,255,0.3); font-size: 0.8rem; transition: transform 0.3s; }
.pilot-badge:hover .pilot-badge-icon { transform: rotate(90deg); }
.pilot-badge.guest { border-color: rgba(255,255,255,0.05); }
.pilot-badge.guest .pilot-avatar { background: rgba(255,255,255,0.1); }
.pilot-badge.guest .pilot-name { color: rgba(255,255,255,0.4); }

/* ═══════════════════════════════════════════════════════════════
   PROFIL PILOTE — Premium
   ═══════════════════════════════════════════════════════════════ */

#profile-screen {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(5,10,20,0.97) 100%);
    overflow-y: auto; padding-bottom: 40px;
}

.profile-card {
    display: flex; align-items: center; gap: 20px;
    background: linear-gradient(145deg, rgba(15,20,35,0.8) 0%, rgba(5,10,20,0.9) 100%);
    border: 1px solid rgba(0,229,255,0.1); border-radius: 16px;
    padding: 20px 25px; margin-bottom: 25px; width: 100%; max-width: 400px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.profile-avatar { width: 70px; height: 70px; background: linear-gradient(135deg, var(--accent-cyan), #0097a7); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 0 25px rgba(0,229,255,0.25); flex-shrink: 0; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: white; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-email { font-size: 0.8rem; color: rgba(255,255,255,0.35); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-since { font-size: 0.7rem; color: var(--accent-cyan); text-transform: uppercase; letter-spacing: 1px; }

.profile-section { width: 100%; max-width: 400px; margin-bottom: 20px; }
.profile-section-title { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: white; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.06); }

.records-grid { display: flex; flex-direction: column; gap: 8px; }
.record-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 10px; transition: all 0.2s; }
.record-item:hover { background: rgba(0,229,255,0.03); border-color: rgba(0,229,255,0.1); }
.record-circuit { font-size: 0.8rem; color: rgba(255,255,255,0.6); font-weight: 600; }
.record-value { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--accent-gold); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-box { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 12px; padding: 15px 10px; text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: white; margin-bottom: 4px; }
.stat-label { font-size: 0.65rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 1px; }

.profile-buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 400px; margin-top: 20px; }
.profile-logout-btn, .profile-login-btn { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); padding: 12px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px; }
.profile-logout-btn { border-color: rgba(255,23,68,0.2); color: #ff8a80; }
.profile-logout-btn:hover { background: rgba(255,23,68,0.15); border-color: var(--accent-red); color: white; }
.profile-login-btn { border-color: rgba(0,229,255,0.2); color: rgba(0,229,255,0.7); }
.profile-login-btn:hover { background: rgba(0,229,255,0.1); border-color: var(--accent-cyan); color: white; }

/* ═══════════════════════════════════════════════════════════════
   ANIMATION NOUVEAU RECORD — Cinematic NFS
   ═══════════════════════════════════════════════════════════════ */

#new-record-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.97) 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    animation: recordFadeIn 0.6s ease-out;
}

/* Animated light streaks behind */
#new-record-overlay::before {
    content: '';
    position: absolute; inset: 0;
    background: 
        linear-gradient(135deg, transparent 40%, rgba(255,171,0,0.03) 50%, transparent 60%),
        linear-gradient(225deg, transparent 40%, rgba(0,229,255,0.03) 50%, transparent 60%);
    animation: streakMove 3s linear infinite;
}

@keyframes streakMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes recordFadeIn { from { opacity: 0; } to { opacity: 1; } }

.confetti-container { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; width: 10px; height: 10px; top: -10px; animation: confettiFall linear forwards; }

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

.record-content {
    text-align: center;
    animation: recordBounce 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes recordBounce {
    0% { transform: scale(0.2) rotate(-5deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(1deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.record-stars {
    font-size: 3rem;
    animation: starSpin 2s ease-in-out infinite;
    margin: 10px 0;
}

@keyframes starSpin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-3deg); }
}

.record-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem; font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 
        0 0 30px rgba(255, 171, 0, 0.8),
        0 0 60px rgba(255, 171, 0, 0.4),
        0 0 100px rgba(255, 171, 0, 0.2),
        0 4px 0 #b45309;
    letter-spacing: 6px;
    animation: titleGlow 1.5s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 30px rgba(255,171,0,0.8), 0 0 60px rgba(255,171,0,0.4), 0 0 100px rgba(255,171,0,0.2), 0 4px 0 #b45309; }
    to { text-shadow: 0 0 40px rgba(255,171,0,1), 0 0 80px rgba(255,171,0,0.6), 0 0 120px rgba(255,171,0,0.3), 0 4px 0 #b45309; }
}

.record-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem; font-weight: 900; color: white;
    text-shadow: 0 0 30px rgba(255,255,255,0.4), 0 0 80px rgba(0,229,255,0.2), 0 4px 0 #1e293b;
    letter-spacing: 10px; margin-bottom: 20px;
    animation: subtitleSlam 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.3s both;
}

@keyframes subtitleSlam {
    0% { transform: scale(3) translateY(-20px); opacity: 0; }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

.record-time {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem; font-weight: 900;
    color: var(--accent-green);
    text-shadow: 0 0 25px rgba(0, 230, 118, 0.8), 0 0 50px rgba(0, 230, 118, 0.4);
    margin: 20px 0; padding: 15px 30px;
    background: rgba(0, 230, 118, 0.05);
    border: 2px solid rgba(0, 230, 118, 0.2);
    border-radius: 15px;
    animation: timePulse 2s ease-in-out infinite;
}

@keyframes timePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0,230,118,0.2); border-color: rgba(0,230,118,0.2); }
    50% { box-shadow: 0 0 40px rgba(0,230,118,0.5), 0 0 80px rgba(0,230,118,0.15); border-color: rgba(0,230,118,0.5); }
}

.record-type {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem; font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 4px; text-transform: uppercase; margin-top: 10px;
}
.record-type.world-record {
    color: var(--accent-gold);
    animation: worldRecordPulse 0.5s ease-in-out infinite alternate;
    text-shadow: 0 0 15px rgba(255,171,0,0.5);
}
@keyframes worldRecordPulse { from { color: var(--accent-gold); } to { color: #fff8e1; } }

.record-close-btn {
    margin-top: 40px; padding: 15px 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem; font-weight: 700; color: black;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #ff8f00 100%);
    border: none; border-radius: 50px; cursor: pointer;
    text-transform: uppercase; letter-spacing: 3px;
    box-shadow: 0 5px 30px rgba(255,171,0,0.4), inset 0 -3px 0 rgba(0,0,0,0.2);
    transition: all 0.3s;
    animation: btnAppear 0.5s ease-out 0.8s both;
}
@keyframes btnAppear { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.record-close-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 40px rgba(255,171,0,0.6), inset 0 -3px 0 rgba(0,0,0,0.2); }
.record-close-btn:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile Premium
   ═══════════════════════════════════════════════════════════════ */

@supports (-webkit-touch-callout: none) {
    .mode-card { -webkit-transform: translateZ(0); transform: translateZ(0); }
}

@media screen and (max-width: 768px) {
    #settings-screen { overflow-y: auto !important; justify-content: flex-start !important; padding: 70px 15px 120px 15px !important; -webkit-overflow-scrolling: touch; }
    #settings-screen .settings-grid { width: 100% !important; max-width: 100% !important; }
    #settings-screen .setting-group { margin-bottom: 15px; }
    
    #selection-overlay { padding: 60px 15px 100px 15px !important; justify-content: flex-start !important; padding-top: 80px !important; }
    #overlay-title { font-size: 1.3rem !important; margin-bottom: 25px !important; padding-bottom: 10px !important; }
    
    .mode-container { grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 340px; padding: 0 5px; margin: 0 auto; }
    
    #overlay-lagoon[style*="none"], #overlay-mobile[style*="none"] { display: none !important; }
    
    .mode-btn { flex: 1 1 140px !important; min-width: 140px !important; max-width: 160px !important; height: 90px !important; font-size: 1rem !important; background: rgba(8,12,21,0.95) !important; border: 2px solid rgba(255,255,255,0.1) !important; border-radius: 14px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important; }
    .mode-btn:active { transform: scale(0.96) !important; }
    .btn-race { border-color: rgba(0,229,255,0.3) !important; }
    .btn-drift { border-color: rgba(255,171,0,0.3) !important; }
    
    .mode-card { background: linear-gradient(145deg, rgba(15,20,35,0.95) 0%, rgba(5,10,20,0.98) 100%) !important; border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 14px !important; padding: 16px 10px !important; min-height: 130px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important; }
    .mode-card::before { height: 3px !important; }
    .mode-card:active { transform: scale(0.96) !important; }
    
    .mode-icon { font-size: 2rem !important; margin-bottom: 8px !important; }
    .mode-title { font-size: 0.9rem !important; letter-spacing: 0.5px !important; margin-bottom: 3px !important; }
    .mode-subtitle { font-size: 0.6rem !important; margin-bottom: 10px !important; }
    .mode-record { padding: 5px 10px !important; }
    .mode-record-value { font-size: 0.75rem !important; }
    .mode-card.wide { grid-column: span 2 !important; min-height: 110px !important; }
    
    .back-btn { top: 15px !important; left: 15px !important; padding: 8px 14px !important; font-size: 0.75rem !important; }
    .utility-bar-v2 { position: fixed !important; bottom: 15px !important; left: 50% !important; transform: translateX(-50%) !important; z-index: 110; }
    .utility-btn { padding: 10px 14px !important; font-size: 0.7rem !important; letter-spacing: 1px !important; }
    
    /* Leaderboard mobile */
    .gl-header { margin-bottom: 18px !important; }
    .gl-header-icon { font-size: 1.8rem !important; }
    .gl-header h2 { font-size: 1.2rem !important; letter-spacing: 1px !important; }
    .gl-tab { padding: 8px 8px !important; font-size: 0.65rem !important; min-width: 50px !important; }
    .gl-list-container { max-height: 45vh !important; }
    .gl-row { padding: 11px 10px !important; }
    .gl-name { font-size: 0.8rem !important; }
    .gl-score { font-size: 0.8rem !important; }
    .gl-back-btn { padding: 10px 24px !important; font-size: 0.7rem !important; }
    
    .pilot-badge { top: 12px !important; right: 12px !important; padding: 6px 12px 6px 8px !important; }
    .pilot-avatar { width: 26px !important; height: 26px !important; font-size: 0.75rem !important; }
    .pilot-name { font-size: 0.7rem !important; max-width: 70px !important; }
    
    #profile-screen { padding: 70px 15px 30px 15px !important; }
    .profile-card { padding: 15px !important; gap: 12px !important; }
    .profile-avatar { width: 50px !important; height: 50px !important; font-size: 1.5rem !important; }
    .profile-name { font-size: 1.1rem !important; }
    .stats-grid { gap: 8px !important; }
    .stat-box { padding: 12px 8px !important; }
    .stat-value { font-size: 1.2rem !important; }
    .stat-label { font-size: 0.55rem !important; }
    
    /* Record mobile */
    .record-title { font-size: 2rem; letter-spacing: 3px; }
    .record-subtitle { font-size: 2.5rem; letter-spacing: 5px; }
    .record-time { font-size: 1.8rem; padding: 12px 25px; }
    .record-stars { font-size: 2rem; }
    .record-close-btn { padding: 12px 40px; font-size: 0.9rem; }
}

@media screen and (max-width: 375px) {
    .mode-container { max-width: 290px !important; gap: 10px !important; }
    .mode-btn { flex: 1 1 120px !important; min-width: 120px !important; max-width: 135px !important; height: 80px !important; font-size: 0.9rem !important; }
    .mode-card { padding: 12px 8px !important; min-height: 115px !important; }
    .mode-icon { font-size: 1.7rem !important; }
    .mode-title { font-size: 0.8rem !important; }
    #overlay-title { font-size: 1.1rem !important; }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
    #selection-overlay { padding-top: 50px !important; }
    .mode-card { min-height: 100px !important; padding: 10px 8px !important; }
    .mode-icon { font-size: 1.5rem !important; margin-bottom: 5px !important; }
    .mode-record { padding: 3px 8px !important; }
}

@media (max-width: 480px) {
    .profile-card { padding: 15px; gap: 15px; }
    .profile-avatar { width: 55px; height: 55px; font-size: 1.5rem; }
    .profile-name { font-size: 1.1rem; }
    .stats-grid { gap: 8px; }
    .stat-value { font-size: 1.2rem; }
    .stat-label { font-size: 0.6rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SHARED SCORE BUTTON
   ═══════════════════════════════════════════════════════════════ */

#share-score-btn {
    background: linear-gradient(135deg, rgba(0,229,255,0.15) 0%, rgba(0,229,255,0.05) 100%);
    border: 1px solid rgba(0,229,255,0.3);
    color: var(--accent-cyan);
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

#share-score-btn:hover {
    background: rgba(0,229,255,0.2);
    box-shadow: var(--glow-cyan);
}

/* ═══════════════════════════════════════════════════════════════
   V2 REDESIGN — Persistent Background + Screen Titles + Race Type Cards
   ═══════════════════════════════════════════════════════════════ */

/* Persistent Background (carries edition imagery through all screens) */
#persistent-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
#persistent-bg-img {
    position: absolute; inset: -20px;
    background-size: cover; background-position: center;
    filter: blur(40px) brightness(0.2) saturate(1.3);
    transform: scale(1.15);
    transition: background-image 0.8s ease, opacity 0.8s ease;
    opacity: 0;
    will-change: opacity;
}
#persistent-bg-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(5,10,20,0.3) 0%, rgba(5,10,20,0.85) 60%, rgba(5,10,20,0.98) 100%);
}

/* Unified screen title */
.screen-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(0,229,255,0.2), 0 4px 15px rgba(0,0,0,0.9);
    margin-bottom: 28px;
    text-align: center;
}

/* Edition header (in selection overlay) */
.edition-header {
    position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
    text-align: center; z-index: 10;
}
.edition-location {
    font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 6px; text-transform: uppercase;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   RACE TYPE CARDS (Contre-la-montre / Entraînement)
   ═══════════════════════════════════════════════════════════════ */

.race-type-grid {
    display: flex; flex-direction: column;
    gap: 16px; width: 100%; max-width: 380px;
}

.race-type-card {
    background: var(--surface-2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; align-items: center; gap: 16px;
    position: relative; overflow: hidden;
    animation: cardSlideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}
.race-type-card:nth-child(1) { animation-delay: 0.05s; }
.race-type-card:nth-child(2) { animation-delay: 0.12s; }
.race-type-card::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--accent-cyan);
    opacity: 0; transition: opacity 0.3s;
}
.race-type-card:hover::before { opacity: 1; }
.race-type-card:hover {
    transform: translateX(4px);
    border-color: rgba(0,229,255,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(0,229,255,0.05);
}
.race-type-card:active { transform: translateX(2px) scale(0.98); }

.race-type-card.race-type-training::before { background: var(--accent-green); }
.race-type-card.race-type-training:hover { border-color: rgba(0,230,118,0.15); }

.race-type-icon {
    width: 56px; height: 56px;
    background: rgba(0,0,0,0.3);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.race-type-info { flex: 1; }
.race-type-name {
    font-family: var(--font-display);
    font-size: 0.9rem; font-weight: 900;
    color: white; letter-spacing: 1px; margin-bottom: 3px;
}
.race-type-desc {
    font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px;
}
.race-type-badge {
    background: rgba(0,229,255,0.08);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 8px; padding: 4px 10px;
    font-family: var(--font-display);
    font-size: 0.55rem; font-weight: 700;
    color: var(--accent-cyan); letter-spacing: 1.5px;
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap;
}
.race-type-badge.training {
    background: rgba(0,230,118,0.08);
    border-color: rgba(0,230,118,0.15);
    color: var(--accent-green);
}

/* ═══════════════════════════════════════════════════════════════
   START BUTTON — Shimmer effect
   ═══════════════════════════════════════════════════════════════ */

#start-btn {
    position: relative; overflow: hidden;
}
#start-btn::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
#start-btn:hover::before { left: 100%; }

/* ═══════════════════════════════════════════════════════════════
   SCREEN TRANSITIONS + LOADING
   ═══════════════════════════════════════════════════════════════ */

@keyframes screenIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#race-mode-select, #difficulty-select-screen, #car-select-screen,
#mobile-race-select, #mobile-drift-select, #settings-screen,
#global-leaderboard-screen, #profile-screen {
    animation: screenIn 0.4s ease-out;
}

/* Loading shimmer (leaderboard rows) */
.loading-row {
    height: 44px; border-radius: 10px; margin-bottom: 4px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.02) 25%,
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0.02) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Settings section icons */
.setting-title i { font-size: 0.8rem; opacity: 0.7; }

/* Auth button — subtle pill (override Tailwind) */
#auth-open-btn {
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.7) !important;
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    box-shadow: none !important;
    transition: all 0.3s !important;
}
#auth-open-btn:hover {
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    box-shadow: 0 0 15px rgba(0,229,255,0.2) !important;
    background: rgba(0,0,0,0.7) !important;
    transform: none !important;
}

/* Pause modal — consistent with new design */
.pause-modal {
    background: var(--surface-1) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-top: 2px solid var(--accent-cyan) !important;
    border-radius: 20px !important;
    padding: 28px 24px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8) !important;
}

/* Mobile tap feedback */
@media (hover: none) {
    .mode-card:active, .race-type-card:active,
    .showroom-card:active, .utility-btn:active, .gl-tab:active {
        transform: scale(0.96) !important;
        transition-duration: 0.1s !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   V2 RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════════ */

@media screen and (max-width: 768px) {
    .edition-header { top: 25px; }
    .edition-location { font-size: 0.55rem; letter-spacing: 4px; }
    .race-type-grid { max-width: 100%; padding: 0 16px; }
    .race-type-card { padding: 16px; }
    .race-type-icon { width: 48px; height: 48px; font-size: 1.3rem; }
    .race-type-name { font-size: 0.8rem; }
    .race-type-badge { font-size: 0.5rem; padding: 3px 8px; }
    .back-arrow-btn { top: 20px; left: 12px; width: 38px; height: 38px; }
    .showroom-card { max-width: 100%; }
    .showroom-grid { padding: 0 16px; gap: 14px; }
}

@media screen and (max-width: 375px) {
    .race-type-card { padding: 14px; gap: 12px; }
    .race-type-icon { width: 44px; height: 44px; }
    .race-type-name { font-size: 0.75rem; }
    .race-type-desc { font-size: 0.6rem; }
}

/* ═══════════════════════════════════════════════════════════════
   EDITION MOBIL PREMIUM — Carousel + Overlay + Cards
   ═══════════════════════════════════════════════════════════════ */

/* --- Racing Stripe diagonal animee --- */
.mobil-racing-stripe {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    overflow: hidden;
}
.mobil-racing-stripe::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 80px,
        rgba(227,33,25,0.06) 80px,
        rgba(227,33,25,0.06) 82px
    );
    animation: stripeScroll 25s linear infinite;
}
@keyframes stripeScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(113px, 113px); }
}

/* --- Slide Mobil content --- */
.slide-content-mobil {
    background: linear-gradient(to top,
        rgba(0,20,80,0.98) 0%,
        rgba(0,20,80,0.7) 25%,
        rgba(0,10,40,0.3) 55%,
        transparent 100%) !important;
}

/* --- Mobil Logo Block --- */
.mobil-logo-block {
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: 16px;
}
.mobil-logo-text {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    color: white;
    letter-spacing: 12px;
    text-shadow:
        0 0 40px rgba(0,51,160,0.6),
        0 0 80px rgba(0,51,160,0.3),
        0 4px 20px rgba(0,0,0,0.8);
    line-height: 1;
}
.mobil-logo-divider {
    width: 80px; height: 3px;
    background: linear-gradient(90deg, transparent, #e32119, transparent);
    margin: 8px 0;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(227,33,25,0.4);
}
.mobil-logo-sub {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    font-weight: 700;
    color: #e32119;
    letter-spacing: 8px;
    text-shadow: 0 0 20px rgba(227,33,25,0.4);
}

/* --- Slide Title Mobil --- */
.slide-title-mobil {
    background: linear-gradient(180deg, #ffffff 0%, #90caf9 60%, #64b5f6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: none !important;
    filter: drop-shadow(0 4px 15px rgba(0,51,160,0.4));
}

/* --- Tap Hint Mobil --- */
.tap-hint-mobil {
    border-color: rgba(0,51,160,0.4) !important;
    color: rgba(100,181,246,0.9) !important;
}
.tap-hint-mobil::before {
    background: linear-gradient(90deg, transparent, rgba(0,51,160,0.15), transparent) !important;
}

/* --- Mobil card accents (uses standard .mode-card system) --- */
.mode-card.mobil:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 25px rgba(0,102,255,0.08);
}
.mode-card.raptor:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 25px rgba(255,23,68,0.08);
}

/* --- Mobil HUD Badge --- */
#mobil-hud-badge {
    position: fixed;
    top: 70px; left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    font-family: var(--font-display);
    font-size: 0.6rem; font-weight: 700;
    color: rgba(100,181,246,0.5);
    letter-spacing: 4px; text-transform: uppercase;
    background: rgba(0,20,60,0.4);
    backdrop-filter: blur(6px);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,51,160,0.2);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   COUNTDOWN 3-2-1-GO — Cinematic
   ═══════════════════════════════════════════════════════════════ */

.countdown-number {
    font-family: var(--font-display);
    font-size: clamp(6rem, 20vw, 10rem);
    font-weight: 900;
    color: white;
    text-shadow:
        0 0 40px rgba(0,229,255,0.5),
        0 0 80px rgba(0,229,255,0.2),
        0 6px 20px rgba(0,0,0,0.8);
    animation: countPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: none;
}

.countdown-go {
    font-family: var(--font-display);
    font-size: clamp(7rem, 25vw, 12rem);
    font-weight: 900;
    background: linear-gradient(180deg, #00e676, #00e5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(0,230,118,0.5)) drop-shadow(0 6px 20px rgba(0,0,0,0.8));
    animation: goExplode 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: none;
}

.countdown-flash {
    position: fixed; inset: 0;
    background: white;
    animation: flashBang 0.2s ease-out forwards;
    pointer-events: none;
    z-index: 99;
}

@keyframes countPop {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes goExplode {
    0% { transform: scale(0.4); opacity: 0; }
    30% { transform: scale(1.4); opacity: 1; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

@keyframes flashBang {
    0% { opacity: 0.25; }
    100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBIL RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media screen and (max-width: 768px) {
    .mobil-logo-text { letter-spacing: 8px; }
    #mobil-hud-badge { top: 62px; font-size: 0.5rem; letter-spacing: 3px; }
}