/* =============================================
   DRIVEFOCUS - STYLES
   Ambient Driving for Focus
============================================== */

/* =============================================
   CSS VARIABLES (Design Tokens)
============================================== */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-glass: rgba(10, 10, 10, 0.85);
    
    --accent-pink: #e91e63;
    --accent-pink-glow: rgba(233, 30, 99, 0.4);
    --accent-pink-dark: #880e4f;
    
    --text-white: #ffffff;
    --text-grey: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.2);
    
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;
    
    --blur: blur(20px);
    
    /* Enhanced transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-spring: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* =============================================
   RESET & BASE
============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font);
    user-select: none;
    -webkit-user-select: none;
}

/* GPU acceleration for smooth animations */
.screen,
.select-card,
.btn-enter,
.btn-drive,
.nav-arrow,
.modal,
#car-avatar {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Smooth image loading */
.select-card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
}

@keyframes imageLoad {
    to { opacity: 1; }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   MAP LAYER
============================================== */
#map-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.map-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: 
        linear-gradient(to bottom, rgba(10, 10, 10, 0.5) 0%, transparent 15%),
        linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.6) 20%, transparent 45%),
        radial-gradient(ellipse at center, transparent 30%, rgba(10, 10, 10, 0.7) 100%);
}

/* Mapbox overrides */
.mapboxgl-ctrl { 
    display: none !important; 
}

/* =============================================
   SCREEN SYSTEM
============================================== */
.screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform: scale(0.98);
    will-change: opacity, transform;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

/* =============================================
   ANIMATIONS
============================================== */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =============================================
   HOMEPAGE
============================================== */
#screen-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Brand Header */
.brand-header {
    position: absolute;
    top: 40px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    animation: fadeDown 0.8s ease 0.2s both;
}

.brand-logo {
    width: 32px;
    height: 32px;
}

.brand-logo svg {
    width: 100%;
    height: 100%;
}

.brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-name span {
    color: var(--accent-pink);
}

/* Rev Meter */
.rev-cluster {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 50px;
    animation: scaleIn 0.8s ease 0.4s both;
}

.rev-outer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(25, 25, 28, 0.95), rgba(10, 10, 12, 0.98));
    border: 2px solid rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.7), 
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rev-inner {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(35, 35, 40, 0.8), rgba(12, 12, 15, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.rev-ticks {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
}

.rev-tick {
    position: absolute;
    left: 50%;
    top: 10px;
    width: 2px;
    height: 12px;
    background: rgba(255, 255, 255, 0.25);
    transform-origin: bottom center;
    border-radius: 1px;
}

.rev-tick.major {
    width: 3px;
    height: 18px;
    background: rgba(255, 255, 255, 0.6);
}

.rev-tick.redline {
    background: var(--accent-pink);
    box-shadow: 0 0 8px var(--accent-pink-glow);
}

.rev-needle {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 5px;
    height: 85px;
    background: linear-gradient(to top, var(--accent-pink), #ff4081);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-130deg);
    border-radius: 3px;
    box-shadow: 0 0 20px var(--accent-pink-glow);
    transition: transform 0.1s ease-out;
}

.rev-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #2a2a2a, #111);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.rev-display {
    position: absolute;
    bottom: 50px;
    width: 100%;
    text-align: center;
}

.rev-value {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.rev-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-top: 6px;
    text-transform: uppercase;
}

.home-tagline {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease 0.6s both;
}

.btn-enter {
    padding: 20px 50px;
    background: var(--text-white);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--bg-dark);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition-spring),
                box-shadow var(--transition-smooth),
                background var(--transition-fast);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
    animation: fadeUp 0.8s ease 0.8s both;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.btn-enter:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.25),
                0 0 60px rgba(255, 255, 255, 0.15);
}

.btn-enter:active {
    transform: scale(0.98);
    box-shadow: 0 2px 20px rgba(255, 255, 255, 0.2);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* =============================================
   TOP NAVIGATION BAR
============================================== */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9), transparent);
    padding-top: 10px;
}

/* ADD THIS - Make nav items clickable */
.top-nav > * {
    pointer-events: auto;
}

.nav-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-grey);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--transition-fast);
    letter-spacing: -2px;
}

.nav-arrow:hover {
    color: var(--text-white);
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-grey);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 6px;
}

.nav-tab:hover {
    color: var(--text-white);
}

.nav-tab.active {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.08);
}

/* =============================================
   CARD SELECTOR
============================================== */
.card-selector {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 40px;
    z-index: 50;
}

.select-card {
    width: 220px;
    height: 280px;
    border-radius: var(--radius-lg);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    will-change: transform, width, height;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.select-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.select-card-img {
    position: absolute;
    inset: -2px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    transition: filter 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(100%) brightness(0.6);
    will-change: transform, filter;
}

.select-card:hover .select-card-img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.08);
}

.select-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    border-radius: 0 0 20px 20px;
    pointer-events: none;
}


.select-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.select-card:active {
    transform: translateY(-6px) scale(0.98);
    transition: transform 0.1s ease;
}

.select-card.active {
    width: 280px;
    height: 320px;
    border: none;
    outline: 3px solid var(--accent-pink);
    outline-offset: 1px;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6), 
        0 0 50px var(--accent-pink-glow);
}

.select-card.active .select-card-img {
    filter: grayscale(0%) brightness(1);
}

.select-card.active::after {
    display: none;
}
.select-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 5;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.select-card-title {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

.select-card.active .select-card-title {
    font-size: 22px;
}

.select-card-subtitle {
    font-size: 11px;
    color: var(--text-grey);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.select-card.active .select-card-subtitle,
.select-card:hover .select-card-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.card-flag {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    text-align: center;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2px;
}

/* =============================================
   DRIVE MODE
============================================== */
#screen-drive {
    background: transparent;
}

/* Route Info (Top Left) */
.drive-route-info {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    z-index: 100;
}

.route-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-pink);
    border-radius: var(--radius-sm);
    font-size: 20px;
}

.route-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.route-text p {
    font-size: 11px;
    color: var(--text-grey);
}

/* Status & Speed Limit (Top Right) */
.drive-status {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 100;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00e676;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-grey);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.speed-limit {
    min-width: 50px;
    height: 50px;
    padding: 0 8px;
    background: white;
    border-radius: 25px;
    border: 6px solid #cc0000;
    box-shadow: 0 0 0 2px white, 0 2px 8px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #000;
}

/* Speed Panel (Bottom Left) */
.speed-panel {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 18px 28px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    z-index: 100;
}

.speed-main {
    text-align: center;
}

.speed-value {
    font-size: 56px;
    font-weight: 900;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
}

.speed-unit {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-pink);
    letter-spacing: 3px;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 45px;
    background: var(--border-subtle);
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 9px;
    color: var(--text-grey);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Control Panel (Bottom Right) */
.control-panel {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.control-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-grey);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.control-btn.active {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
    color: white;
}

.control-btn svg {
    width: 20px;
    height: 20px;
}

/* Ambient Player */
.ambient-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 10px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.ambient-play {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-pink);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.ambient-play:hover {
    transform: scale(1.1);
}

.ambient-play svg {
    width: 16px;
    height: 16px;
    color: white;
    margin-left: 2px;
}

.ambient-info {
    line-height: 1.3;
}

.ambient-title {
    font-size: 12px;
    font-weight: 600;
}

.ambient-subtitle {
    font-size: 10px;
    color: var(--text-grey);
}

/* Drive Button */
.btn-drive {
    padding: 16px 32px;
    background: var(--accent-pink);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s ease;
    box-shadow: 0 8px 30px var(--accent-pink-glow);
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.btn-drive:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 45px var(--accent-pink-glow);
}

.btn-drive:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 20px var(--accent-pink-glow);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-drive.parked {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn-drive.parked:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Car Avatar */
.car-avatar {
    position: absolute;
    top: 50%;
    left: calc(50% - 35px);
    transform: translate(-50%, -50%);
    width: 70px;
    z-index: 50;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.7));
    pointer-events: none;
    transition: filter 0.3s ease;
}

.car-avatar.braking .tail-light {
    fill: #ff3333 !important;
    filter: drop-shadow(0 0 12px #ff0000);
    animation: brake-pulse 0.3s ease-in-out;
}

@keyframes brake-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 20px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background:  rgba(10, 10, 10, 0.85);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-grey);
    font-size: 12px;
    font-weight: 600;
    cursor:  pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 150;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

/* Drive screen exit button - positioned below goal bar */
#screen-drive .back-btn {
    top: 130px;
}

@media (max-width: 800px) {
    #screen-drive .back-btn {
        top: 125px;
    }
}

@media (max-width: 500px) {
    #screen-drive .back-btn {
        top: 118px;
        left: 12px;
    }
}

.back-btn:hover {
    color: var(--text-white);
    border-color: var(--border-light);
    background: rgba(20, 20, 20, 0.95);
    transform: translateX(-3px);
}

.back-btn:active {
    transform: translateX(0) scale(0.97);
    transition: transform 0.1s ease;
}

/* =============================================
   SETTINGS OVERLAY
============================================== */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

.settings-panel {
    width: 90%;
    max-width: 400px;
    background: #151515;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition);
}

.settings-overlay.show .settings-panel {
    transform: scale(1);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
}

.settings-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.settings-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: var(--text-grey);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.settings-close:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.1);
}

.settings-body {
    padding: 16px 22px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.setting-label {
    font-size: 14px;
    font-weight: 500;
}

/* Toggle Switch */
.toggle {
    width: 46px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle.on {
    background: var(--accent-pink);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle.on::after {
    transform: translateX(20px);
}

/* =============================================
   LOADER
============================================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    pointer-events: none; /* Prevent interactions with invisible elements. */
}

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-grey);
}

/* =============================================
   RESPONSIVE
============================================== */
@media (max-width: 1100px) {
    .select-card { 
        width: 180px; 
        height: 240px; 
    }
    
    .select-card.active { 
        width: 220px; 
        height: 280px; 
    }
    
    .card-selector { 
        gap: 14px; 
    }
}

@media (max-width: 800px) {
    .card-selector {
        overflow-x: auto;
        justify-content: flex-start;
        left: 0;
        right: 0;
        transform: none;
        padding: 0 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .card-selector::-webkit-scrollbar {
        display: none;
    }
    
    .select-card { 
        flex-shrink: 0; 
    }
    
    .speed-panel {
        padding: 14px 20px;
        gap: 16px;
    }
    
    .speed-value {
        font-size: 42px;
    }
    
    .control-panel {
        flex-wrap: wrap;
        max-width: 200px;
        justify-content: flex-end;
    }
    
    .focus-goal-bar {
        top: 95px;
        left: 24px;
        width: 190px;
        height: 22px;
    }
    
    .goal-text {
        font-size: 10px;
    }
}

@media (max-width: 500px) {
    .drive-route-info {
        left: 12px;
        right: 12px;
        top: 12px;
    }
    
    .focus-goal-bar {
        top: 88px;
        left: 12px;
        width: 180px;
        height: 22px;
    }
    
    .goal-text {
        font-size: 10px;
    }
    
    .drive-status {
        top: auto;
        bottom: 140px;
        right: 12px;
    }
    
    .speed-panel {
        left: 12px;
        bottom: 12px;
    }
    
    .control-panel {
        right: 12px;
        bottom: 12px;
    }
}

/* Volume Slider */
.volume-slider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background:  rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width:  18px;
    height: 18px;
    background: #e91e63;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #e91e63;
    border-radius: 50%;
    cursor:  pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.4);
}

/* =============================================
   AUTH SCREEN
============================================== */
.auth-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom:  30px;
}

.auth-logo svg {
    width: 40px;
    height: 40px;
}

.auth-logo span {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-logo .pink {
    color: #e91e63;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom:  20px;
}

.auth-tab {
    flex: 1;
    padding:  12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease,
                border-color 0.3s ease,
                color 0.2s ease,
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.auth-tab:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.auth-tab:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

.auth-tab.active {
    background: #e91e63;
    border-color: #e91e63;
    color: white;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-input {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease;
}

.auth-input:focus {
    border-color: #e91e63;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight:  600;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    -webkit-tap-highlight-color: transparent;
}

.auth-btn.primary {
    background: #e91e63;
    color: white;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
}

.auth-btn.primary:hover {
    background:  #d81b60;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(233, 30, 99, 0.4);
}

.auth-btn.primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(233, 30, 99, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.auth-btn.google {
    background: white;
    color: #333;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-btn.google:hover {
    background: #f5f5f5;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.auth-btn.google:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin:  20px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-error {
    display: none;
    padding: 12px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: #f44336;
    font-size: 13px;
    margin-bottom:  15px;
}

/* =============================================
   USER INFO IN HEADER
============================================== */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.user-credits-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

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

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(233, 30, 99, 0.2);
    border: 1px solid rgba(233, 30, 99, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight:  500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    background: rgba(233, 30, 99, 0.3);
}

.logout-icon {
    font-size: 14px;
    opacity: 0.7;
}

/* =============================================
   CREDIT NOTIFICATION
============================================== */
.credit-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 16px 30px;
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight:  700;
    box-shadow: 0 10px 40px rgba(233, 30, 99, 0.4);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.credit-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* =============================================
   VOLUME SLIDER
============================================== */
.volume-slider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background:  rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width:  18px;
    height: 18px;
    background: #e91e63;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #e91e63;
    border-radius: 50%;
    cursor:  pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.4);
}

/* Guest Button */
.auth-btn.guest {
    background:  transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 10px;
    width: 100%;
}

.auth-btn.guest:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.guest-note {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 12px;
}

/* =============================================
   FOCUS GOAL MODAL
============================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-panel {
    width: 100%;
    max-width: 450px;
    background: rgba(20, 20, 25, 0.98);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom:  1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.modal-desc {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    font-size: 14px;
}

.goal-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.goal-option {
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.goal-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.goal-option.active {
    background: rgba(233, 30, 99, 0.2);
    border-color: #e91e63;
    color: #e91e63;
}

.custom-goal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 25px;
}

.custom-goal label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.custom-goal input {
    flex: 1;
    padding:  10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    width: 80px;
}

.custom-goal input:focus {
    border-color: #e91e63;
}

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

.btn-skip {
    flex: 1;
    padding:  14px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:  all 0.3s ease;
}

.btn-skip:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.btn-start-goal {
    flex: 2;
    padding: 14px 20px;
    background:  #e91e63;
    border: none;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor:  pointer;
    transition: all 0.3s ease;
}

.btn-start-goal:hover {
    background: #d81b60;
    transform: translateY(-2px);
}

/* =============================================
   FOCUS GOAL PROGRESS BAR
============================================== */
.focus-goal-bar {
    position: absolute;
    top: 100px;
    left: 24px;
    width: 200px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: none;
    z-index: 100;
}

.focus-goal-bar.active {
    display: block;
}

.goal-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background:  linear-gradient(90deg, #e91e63, #9c27b0);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.goal-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Goal Complete Animation */
.focus-goal-bar.complete .goal-progress {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}

.goal-complete-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition:  opacity 0.3s ease;
}

.goal-complete-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.goal-complete-content {
    text-align: center;
    padding: 40px;
}

.goal-complete-icon {
    font-size: 80px;
    margin-bottom:  20px;
}

.goal-complete-title {
    font-size: 32px;
    font-weight:  800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.goal-complete-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
}

.goal-complete-stats {
    display: flex;
    gap: 30px;
    justify-content:  center;
    margin-bottom:  30px;
}

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

.goal-stat-value {
    font-size: 28px;
    font-weight:  700;
    color: white;
}

.goal-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-goal-continue {
    padding: 16px 40px;
    background: #e91e63;
    border: none;
    border-radius: 30px;
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight:  600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-goal-continue:hover {
    background: #d81b60;
    transform:  scale(1.05);
}

/* =============================================
   LOOP NOTIFICATION
============================================== */
.loop-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform:  translateX(-50%) translateY(50px);
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 24px;
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 500;
    opacity: 0;
    transition: all 0.3s ease;
}

.loop-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.loop-notification-icon {
    font-size: 28px;
}

.loop-notification-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loop-notification-text strong {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.loop-notification-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* =============================================
   SEATBELT ANIMATION
============================================== */
.seatbelt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 550;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition:  opacity 0.5s ease;
}

.seatbelt-overlay.active {
    display: flex;
    opacity: 1;
}

.seatbelt-overlay.fade-out {
    opacity:  0;
}

.seatbelt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
    position: relative;
}

.seatbelt-icon {
    width: 150px;
    height: 180px;
    animation: seatbelt-pulse 1.5s ease-in-out infinite;
}

.seatbelt-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(233, 30, 99, 0.5));
}

@keyframes seatbelt-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.seatbelt-icon.buckled {
    animation: none;
}

.seatbelt-icon.buckled svg circle,
.seatbelt-icon.buckled svg path:not([stroke]) {
    fill: #4caf50;
}

.seatbelt-icon.buckled svg {
    filter: drop-shadow(0 0 30px rgba(76, 175, 80, 0.5));
}

@keyframes buckle-confirm {
    0% {
        transform:  scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.seatbelt-text h2 {
    font-size: 32px;
    font-weight: 700;
    margin:  0;
    color: white;
    letter-spacing: 1px;
}

.seatbelt-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 10px 0 0 0;
}

.seatbelt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 50px;
    background: #e91e63;
    border: none;
    border-radius: 50px;
    color: white;
    font-family: inherit;
    font-size: 18px;
    font-weight:  700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(233, 30, 99, 0.4);
}

.seatbelt-btn:hover {
    background: #d81b60;
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(233, 30, 99, 0.5);
}

.seatbelt-btn:active {
    transform: scale(0.98);
}

.seatbelt-btn.clicked {
    background: #4caf50;
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(76, 175, 80, 0.4);
}

.buckle-icon {
    font-size: 20px;
}

/* Success state */
.seatbelt-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.seatbelt-overlay.success .seatbelt-icon,
.seatbelt-overlay.success .seatbelt-text,
.seatbelt-overlay.success .seatbelt-btn {
    display: none;
}

.seatbelt-overlay.success .seatbelt-success {
    display: flex;
    animation: success-pop 0.5s ease;
}

@keyframes success-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon-svg {
    width: 150px;
    height: 180px;
}

.success-icon-svg svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(76, 175, 80, 0.5));
}

.success-text {
    font-size: 28px;
    font-weight:  700;
    color: #4caf50;
}

.success-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* =============================================
   SESSION SUMMARY MODAL - FIXED
============================================== */
.session-summary-modal {
    position: fixed;
    inset: 0;
    background:  rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 600;
    display: flex;  /* Changed from 'none' to 'flex' */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;  /* Use visibility instead of display */
    pointer-events: none;  /* Prevent clicks when hidden */
    transition:  opacity 0.5s ease, visibility 0.5s ease;
}

.session-summary-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;  /* Allow clicks when visible */
}

.session-summary-content {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.98), rgba(20, 20, 25, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 30px;
    text-align: center;
    animation: summary-pop 0.5s ease;
}

@keyframes summary-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.summary-header {
    margin-bottom: 30px;
}

.summary-icon {
    font-size: 60px;
    margin-bottom:  15px;
}

.summary-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color:  white;
}

.summary-route-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px 0;
    border-top:  1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.summary-stat-icon {
    font-size: 24px;
}

.summary-stat-value {
    font-size: 24px;
    font-weight:  700;
    color: white;
}

.summary-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-progress {
    margin-bottom: 30px;
}

.summary-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.summary-progress-label span:last-child {
    color: #e91e63;
    font-weight: 600;
}

.summary-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.summary-progress-fill {
    height: 100%;
    width: 0%;
    background:  linear-gradient(90deg, #e91e63, #9c27b0);
    border-radius: 10px;
    transition: width 1s ease;
}

.summary-btn {
    width: 100%;
    padding:  16px;
    background: #e91e63;
    border: none;
    border-radius: 14px;
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight:  600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-btn:hover {
    background: #d81b60;
    transform: translateY(-2px);
}

/* Credits earned animation */
.summary-stat-value.credits-earned {
    color: #4caf50;
    animation: credits-pop 0.5s ease;
}

@keyframes credits-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* =============================================
   CAR SHOP MODAL
============================================== */
.car-shop-modal {
    position: fixed;
    inset: 0;
    background:  rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 600;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-shop-modal.active {
    display: flex;
    opacity: 1;
}

.car-shop-content {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.98), rgba(20, 20, 25, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modal-spring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

@keyframes modal-spring {
    0% {
        transform: scale(0.85) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.car-shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom:  1px solid rgba(255, 255, 255, 0.1);
}

.car-shop-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color:  white;
}

.car-shop-credits {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-weight: 600;
    color: #ffd700;
}

.car-shop-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.car-shop-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.car-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 25px;
    max-height: 60vh;
    overflow-y:  auto;
}

.car-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.car-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.car-card.selected {
    border-color: #e91e63;
    background: rgba(233, 30, 99, 0.1);
}

.car-card.locked {
    opacity: 0.6;
}

.car-card.locked:hover {
    transform: none;
}

.car-preview {
    width: 80px;
    height: 50px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-preview svg {
    width: 100%;
    height: 100%;
}

.car-name {
    font-size: 14px;
    font-weight: 600;
    color:  white;
    margin-bottom: 5px;
}

.car-price {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.car-price.owned {
    color: #4caf50;
}

.car-price.selected-label {
    color: #e91e63;
}

.car-btn {
    margin-top: 12px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight:  600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.car-btn.buy {
    background: #e91e63;
    color:  white;
}

.car-btn.buy:hover {
    background: #d81b60;
}

.car-btn.buy:disabled {
    background: rgba(255, 255, 255, 0.1);
    color:rgba(255, 255, 255, 0.3);
    cursor:not-allowed;
}

.car-btn.select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.car-btn.select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.car-btn.selected {
    background: #4caf50;
    color:  white;
    pointer-events: none;
}

.car-shop-grid::-webkit-scrollbar {
    width: 6px;
}

.car-shop-grid::-webkit-scrollbar-track {
    background:  rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.car-shop-grid::-webkit-scrollbar-thumb {
    background:  rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.car-shop-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* =============================================
   PAUSE BUTTON & PENALTY
============================================== */
.btn-pause {
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 152, 0, 0.2);
    border:  2px solid #ff9800;
    border-radius: var(--radius-md);
    color: #ff9800;
    font-size:  20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-pause:hover {
    background: rgba(255, 152, 0, 0.3);
    transform: scale(1.05);
}

.btn-pause.visible {
    display:  flex;
}

/* =============================================
   PAUSE MODAL - Resume System
============================================== */
.pause-warning-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 700;
    display: none;
    align-items: center;
    justify-content:  center;
}

.pause-warning-modal.active {
    display:  flex;
}

.pause-warning-content {
    width: 100%;
    max-width: 380px;
    background: linear-gradient(145deg, rgba(40, 30, 30, 0.98), rgba(30, 20, 20, 0.98));
    border-radius: 20px;
    border: 2px solid rgba(255, 152, 0, 0.3);
    padding: 30px;
    text-align: center;
}

.pause-warning-icon {
    font-size: 70px;
    margin-bottom: 15px;
    animation: pulse-pause 1.5s ease-in-out infinite;
}

@keyframes pulse-pause {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.pause-warning-title {
    font-size: 24px;
    font-weight: 700;
    color: #ff9800;
    margin-bottom: 10px;
}

.pause-warning-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
    line-height: 1.6;
}

.pause-penalty {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px;
    background:  rgba(244, 67, 54, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(244, 67, 54, 0.2);
    animation: penalty-pulse 2s ease-in-out infinite;
}

@keyframes penalty-pulse {
    0%, 100% { border-color: rgba(244, 67, 54, 0.2); }
    50% { border-color: rgba(244, 67, 54, 0.5); }
}

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

.penalty-value {
    font-size: 28px;
    font-weight: 700;
    color:  #f44336;
}

.penalty-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Resume button */
.btn-resume-focus {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    border: none;
    border-radius: 14px;
    color:  white;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.btn-resume-focus:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
}

/* Penalty notification */
.penalty-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 16px 30px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 10px 40px rgba(244, 67, 54, 0.4);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.penalty-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.coming-soon-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 16px 30px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 10px 40px rgba(255, 152, 0, 0.4);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.coming-soon-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* =============================================
   ROUTE CARD REWARDS & META
============================================== */
.route-reward {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.9), rgba(255, 152, 0, 0.9));
    border-radius:  20px;
    font-size: 12px;
    font-weight: 700;
    color:  #000;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

/* Grey out non-active route rewards */
.select-card:not(.active) .route-reward {
    background:  linear-gradient(135deg, rgba(100, 100, 100, 0.8), rgba(80, 80, 80, 0.8));
    color: rgba(255, 255, 255, 0.7);
    box-shadow: none;
}

/* Active card gets the golden reward */
.select-card.active.route-reward {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 152, 0, 0.95));
    color: #000;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
    transform: scale(1.1);
}

/* On hover, show golden reward for that card */
.select-card:hover.route-reward {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 152, 0, 0.95));
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

/* Transition for smooth effect */
.route-reward {
    transition: all 0.3s ease;
}
.route-meta {
    display:  flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.route-duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

.route-limit {
    display: flex;
    align-items: center;
    gap:  4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Highlight reward on active card */
.select-card.active .route-reward {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
}

/* Animate reward on hover */
.select-card:hover .route-reward {
    animation:  reward-bounce 0.5s ease;
}

@keyframes reward-bounce {
    0%, 100% { transform:  scale(1); }
    50% { transform: scale(1.15); }
}

/* =============================================
   CREDIT SHOP
============================================== */
.buy-credits-btn {
    padding: 8px 16px;
    background:  linear-gradient(135deg, #4caf50, #45a049);
    border: none;
    border-radius: 20px;
    color: white;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor:  pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.buy-credits-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.shop-header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
}

.credit-shop-modal {
    position:  fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 700;
    display: none;
    align-items: center;
    justify-content:  center;
}

.credit-shop-modal.active {
    display:  flex;
}

.credit-shop-content {
    width: 100%;
    max-width:  500px;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.98), rgba(20, 20, 25, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    animation: shop-pop 0.3s ease;
}

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

.credit-shop-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.credit-shop-close {
    width: 36px;
    height: 36px;
    border: none;
    background:  rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.credit-shop-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.credit-shop-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 25px;
}

.credit-packages {
    display:  grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.credit-package {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.credit-package:hover {
    border-color: #e91e63;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.2);
}

.credit-package.popular {
    border-color: #e91e63;
    background: rgba(233, 30, 99, 0.1);
}

.credit-package.best-value {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: #e91e63;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color:  white;
    letter-spacing: 1px;
}

.credit-package.best-value.package-badge {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
}

.package-credits {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.package-bonus {
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
    height: 18px;
}

.package-price {
    font-size: 22px;
    font-weight: 800;
    color:  #4caf50;
    margin-top: 10px;
}

.credit-shop-footer {
    margin-top: 20px;
    text-align: center;
}

.credit-shop-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* =============================================
   DONATION SECTION
============================================== */
.donation-section {
    margin-top: 25px;
}

.donation-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.donation-divider::before,
.donation-divider::after {
    content: '';
    flex: 1;
    height:  1px;
    background:  rgba(255, 255, 255, 0.1);
}

.donation-divider span {
    padding: 0 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.donation-box {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.05));
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius:  16px;
    padding: 20px;
    text-align: center;
}

.donation-header {
    display:  flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.donation-icon {
    font-size: 24px;
}

.donation-title {
    font-size: 18px;
    font-weight: 700;
    color:  #ffc107;
}

.donation-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.donation-amounts {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.donation-preset {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor:  pointer;
    transition: all 0.3s ease;
}

.donation-preset:hover,
.donation-preset.active {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.donation-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.donation-currency {
    font-size: 20px;
    font-weight: 700;
    color:  rgba(255, 255, 255, 0.6);
}

.donation-input {
    width: 100px;
    padding:  12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.donation-input:focus {
    border-color: #ffc107;
}

.donation-input::-webkit-outer-spin-button,
.donation-input::-webkit-inner-spin-button {
    -webkit-appearance:  none;
    margin: 0;
}

.donation-btn {
    width:  100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor:  pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.donation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.donation-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 12px;
    margin-bottom: 0;
}

/* =============================================
   AMBIENT SOUND SELECTOR
============================================== */
.ambient-selector {
    position: absolute;
    bottom: 90px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

#screen-drive.active .ambient-selector {
    opacity: 1;
    transform: translateY(0);
}

.ambient-label {
    font-size:  10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ambient-buttons {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
}

/* =============================================
   AMBIENT BUTTONS FIX
============================================== */
.ambient-btn {
    width:  40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition:  all 0.3s ease;
    pointer-events: auto;  /* IMPORTANT - Makes clickable */
    opacity: 1;
    color: white;
}

.ambient-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.ambient-btn.active {
    background: rgba(233, 30, 99, 0.3);
    border-color: #e91e63;
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.4);
}

.ambient-volume-control {
    display: none;
    padding: 8px 16px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    pointer-events: auto;
}

.ambient-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.ambient-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #e91e63;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ambient-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
}

.ambient-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #e91e63;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.ambient-selector {
    pointer-events: auto;  /* IMPORTANT - Makes container clickable */
}

.ambient-buttons {
    pointer-events: auto;  /* IMPORTANT - Makes container clickable */
}

/* =============================================
   HOME STATS
============================================== */
.home-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 10px;
    padding: 25px 40px;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border:  1px solid var(--border-subtle);
    border-radius: 20px;
    animation: fadeUp 0.8s ease 0.5s both;
}

.stats-week-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    animation: fadeUp 0.8s ease 0.6s both;
}

.home-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.home-stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.home-stat-value {
    font-size: 22px;
    font-weight: 700;
    color:  white;
}

.home-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing:  1px;
}

/* Streak glow effect */
.home-stat:nth-child(3) .home-stat-value {
    color: #ff9800;
}

.home-stat:nth-child(3).has-streak .home-stat-icon {
    animation:  flame-flicker 0.5s ease-in-out infinite alternate;
}

@keyframes flame-flicker {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 600px) {
    .home-stats {
        flex-wrap: wrap;
        gap: 20px;
        padding: 20px;
        justify-content: center;
    }
    
    .home-stat {
        min-width: 70px;
    }
    
    .home-stat-value {
        font-size:  18px;
    }
}

/* =============================================
   FIX: Make Ambient Buttons Clickable
============================================== */
.ambient-selector,
.ambient-buttons,
.ambient-btn {
    pointer-events: auto ! important;
}

.ambient-btn {
    cursor: pointer ! important;
    opacity: 1 ! important;
}

.ambient-btn:not(.active) {
    background:  rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
/* Legal Links */
.legal-links {
    margin-top: 30px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    animation: fadeUp 0.8s ease 0.8s both;
}

.legal-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: #e91e63;
}

.legal-links span {
    margin: 0 10px;
}

/* ===========================================
   END SESSION CONFIRMATION MODAL
=========================================== */
.end-session-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.end-session-modal.active {
    display: flex;
}

.end-session-content {
    width: 90%;
    max-width: 360px;
    background: linear-gradient(145deg, rgba(40, 30, 30, 0.98), rgba(30, 20, 20, 0.98));
    border-radius: 20px;
    border: 2px solid rgba(255, 152, 0, 0.3);
    padding: 30px;
    text-align: center;
}

.end-session-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.end-session-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ff9800;
    margin-bottom: 10px;
}

.end-session-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
    line-height: 1.5;
}

.end-session-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-continue-driving {
    padding: 14px 24px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue-driving:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-confirm-end {
    padding: 14px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm-end:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.end-session-warning {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.warning-item {
    font-size: 14px;
    color: #f44336;
    padding: 6px 0;
    text-align: left;
}