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

:root {
    --primary-color: #FF0000;
    /* Neon F1 Red */
    --secondary-color: #0E0E12;
    /* Deep Black */
    --accent-color: #00D2FF;
    /* Tech Blue */
    --bg-color: #050507;
    --text-color: #E0E0E0;
    --card-bg: rgba(18, 18, 22, 0.9);
    --card-border: 1px solid var(--theme-border-rgba, rgba(255, 0, 0, 0.3));
    --success-color: #00FF88;
    --glow-red: 0 0 15px var(--theme-border-glow, rgba(255, 0, 0, 0.4));
    --glow-red-strong: 0 0 25px var(--theme-border-glow, rgba(255, 0, 0, 0.6));
    --metallic-bg: linear-gradient(180deg, #2A2A30 0%, #15151A 100%);
    --honeycomb-pattern: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSI0OSIgdmlld0JveD0iMCAwIDI4IDQ5Ij48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0icmdiYSgyNTUsMjU1LDI1NSwwLjAyNSkiIHN0cm9rZS13aWR0aD0iMSI+PHBhdGggZD0iTTE0IDkuNUwwIDIuNXYtNUwxNCAuNUwyOCAtNSB2NUwxNCA5LjV6TTE0IDMzLjVMMCAyNi41di01TDE0IDI0LjVMMjggMTkuNXY1TDE0IDMzLjV6TTE0IDU3LjVMMCA1MC41di01TDE0IDQ4LjVMMjggNDMuNXY1TDE0IDU3LjV6Ii8+PC9nPjwvc3ZnPg==');
}

body {
    background-color: var(--bg-color);
    background-image: var(--honeycomb-pattern);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   CYBER-F1 HUD HEADER BAR
   ========================================================================== */
header {
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.98) 0%, rgba(8, 10, 15, 0.99) 100%) !important;
    border-bottom: 2px solid var(--theme-notch, #ff1835) !important;
    box-shadow: 0 4px 25px var(--theme-border-glow, rgba(255, 24, 53, 0.35)), 0 10px 30px rgba(0, 0, 0, 0.9) !important;
    padding: 12px 32px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10000;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--theme-laser, #ff1835) 25%, #ffffff 50%, var(--theme-laser, #ff1835) 75%, transparent 100%);
    box-shadow: 0 0 16px 2px var(--theme-laser, #ff1835);
    pointer-events: none;
    z-index: 2;
}

.countdown-container {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(180deg, rgba(22, 26, 36, 0.85) 0%, rgba(10, 12, 18, 0.95) 100%) !important;
    padding: 8px 24px !important;
    border-radius: 8px !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.35)) !important;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.7), 0 0 15px var(--theme-border-glow, rgba(255, 24, 53, 0.2)) !important;
    position: relative;
}

.countdown-next-race {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 1.15rem !important;
    text-transform: uppercase !important;
    color: var(--theme-title, #ffffff) !important;
    font-weight: 900 !important;
    font-style: italic !important;
    letter-spacing: 1.5px !important;
    margin: 0 !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4) !important;
}

.countdown-clock {
    font-family: 'Orbitron', monospace !important;
    font-weight: 900 !important;
    font-size: 1.85rem !important;
    color: var(--theme-telemetry, #ff1835) !important;
    text-shadow: 0 0 15px var(--theme-telemetry-glow, rgba(255, 24, 53, 0.8)) !important;
    display: flex;
    gap: 14px;
    align-items: center;
}

.clock-unit {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
}

.clock-val {
    line-height: 1;
}

.clock-label {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.6rem !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 3px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.f1-logo-text {
    font-family: 'Titillium Web', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: white;
    font-style: italic;
    letter-spacing: -1px;
    text-transform: uppercase;
    display: flex;
    align-items: baseline;
    gap: 0.1em;
}

.juan-logo {
    display: inline-flex;
    align-items: baseline;
    color: white;
}

.large-j {
    color: var(--primary-color);
    font-size: 1.4em;
    line-height: 0.7;
    margin-right: -0.05em;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    position: relative;
    top: 0.05em;
}

.year-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.league-controls .nav-btn {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    padding: 10px 18px !important;
    background: linear-gradient(180deg, rgba(28, 32, 42, 0.9) 0%, rgba(14, 16, 22, 0.96) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.league-controls .nav-btn::after {
    display: none !important;
}

.league-controls .nav-btn:hover {
    border-color: var(--theme-btn-hover-border, rgba(255, 255, 255, 0.5)) !important;
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(38, 44, 58, 0.95) 0%, rgba(20, 24, 32, 0.98) 100%)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 16px var(--theme-btn-glow, rgba(255, 255, 255, 0.2)) !important;
}

.league-controls .nav-btn.primary {
    background: linear-gradient(180deg, var(--theme-btn-accent, #ff1835) 0%, rgba(16, 20, 28, 0.95) 100%) !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.6)) !important;
    color: var(--theme-btn-text, #ffffff) !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.4)) !important;
}

.league-controls .nav-btn.primary:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, #ff1835 0%, #b80015 100%)) !important;
    border-color: var(--theme-btn-hover-border, #ffffff) !important;
    box-shadow: 0 0 24px var(--theme-btn-glow, rgba(255, 24, 53, 0.75)), inset 0 0 10px rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

.add-user-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
}

.pulsing-text {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    animation: pulse-ongoing 1.5s infinite;
    font-weight: 900;
}

@keyframes pulse-ongoing {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* DASHBOARD LAYOUT */
.dashboard-top-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 30px;
    max-width: 1400px;
    margin: 20px auto 0;
}

.stat-card.large {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 320px 380px;
    gap: 40px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.section-title {
    font-family: 'Titillium Web', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    font-style: italic;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 0, 0, 0.3);
    padding-bottom: 10px;
}

.managers-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   TECH HUD PANELS (CYBER-F1 AESTHETIC)
   ========================================================================== */

.cyber-panel,
.predictions-card {
    position: relative;
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.96) 0%, rgba(8, 10, 15, 0.98) 100%);
    border: 1px solid var(--theme-border, rgba(255, 30, 50, 0.65));
    border-radius: 16px;
    padding: 24px 24px 28px;
    margin-top: 0;
    box-shadow: 
        0 0 35px var(--theme-border-glow, rgba(230, 20, 40, 0.22)),
        inset 0 0 40px rgba(0, 0, 0, 0.4),
        0 20px 50px rgba(0, 0, 0, 0.85);
    overflow: visible;
}

/* Subtle Hex Carbon Mesh Background */
.cyber-panel::before,
.predictions-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background-image: 
        radial-gradient(circle at 0% 0%, var(--theme-border-glow, rgba(255, 20, 40, 0.15)) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, var(--theme-border-glow, rgba(255, 20, 40, 0.15)) 0%, transparent 45%),
        radial-gradient(#1f2633 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 12px 12px;
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

/* Bottom Laser Flare Streak */
.cyber-panel::after,
.predictions-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--theme-laser, #ff1835) 25%, #ffffff 50%, var(--theme-laser, #ff1835) 75%, transparent 100%);
    box-shadow: 0 0 14px 2px var(--theme-laser, #ff1835);
    pointer-events: none;
    z-index: 2;
}

/* Corner Notch Accents */
.corner-notch {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--theme-notch, #ff1835);
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 0 4px var(--theme-notch-glow, rgba(255, 24, 53, 0.8)));
}
.corner-notch.top-left { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.corner-notch.top-right { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.corner-notch.bottom-left { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.corner-notch.bottom-right { bottom: 8px; right: 8px; border-left: none; border-top: none; }

/* Cyber Card Header & Title */
.cyber-panel .title-wrap,
.predictions-card .title-wrap {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
    border-bottom: none;
    padding-bottom: 0;
    min-height: 28px;
}

.cyber-panel .section-title,
.predictions-card .section-title {
    font-family: 'Orbitron', 'Titillium Web', sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--theme-title, #f5f6f8);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.45), 0 0 20px var(--theme-title-glow, rgba(255, 30, 50, 0.7));
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

/* Header Actions container for info/trophy icons */
.header-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

/* Trophy Icon */
.trophy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: drop-shadow(0 0 6px rgba(255, 200, 0, 0.6));
}
.trophy-icon:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.95));
}

/* Diagonal Neon Hash Vents (///) */
.hash-vents {
    display: inline-block;
    width: 24px;
    height: 12px;
    flex-shrink: 0;
    background: repeating-linear-gradient(
        -55deg,
        var(--theme-vents, #ff1835),
        var(--theme-vents, #ff1835) 3px,
        transparent 3px,
        transparent 7px
    );
    filter: drop-shadow(0 0 6px var(--theme-vents, rgba(255, 24, 53, 0.9)));
}
.hash-vents.right {
    background: repeating-linear-gradient(
        55deg,
        var(--theme-vents, #ff1835),
        var(--theme-vents, #ff1835) 3px,
        transparent 3px,
        transparent 7px
    );
}

/* Tech HUD Floating Cyber Info Accordion Tooltip Matching Panel Style in Blue */
.cyber-panel .info-accordion,
.info-accordion {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: auto !important;
    width: 320px !important;
    max-width: min(340px, calc(100vw - 30px)) !important;
    z-index: 999999 !important;
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.98) 0%, rgba(8, 10, 15, 0.99) 100%) !important;
    border: 1px solid rgba(0, 210, 255, 0.65) !important;
    border-radius: 12px !important;
    padding: 16px 18px 18px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 
        0 0 35px rgba(0, 210, 255, 0.22),
        inset 0 0 30px rgba(0, 210, 255, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    pointer-events: none !important;
    text-transform: none !important;
    font-style: normal !important;
    overflow: visible !important;
}

/* Corner Notches + Carbon Dot Mesh + Cyan Corner Radial Glows */
.cyber-panel .info-accordion::before,
.info-accordion::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background-image: 
        /* Top-Left Notch */
        linear-gradient(to right, #00d2ff 12px, transparent 12px),
        linear-gradient(to bottom, #00d2ff 12px, transparent 12px),
        /* Top-Right Notch */
        linear-gradient(to left, #00d2ff 12px, transparent 12px),
        linear-gradient(to bottom, #00d2ff 12px, transparent 12px),
        /* Bottom-Left Notch */
        linear-gradient(to right, #00d2ff 12px, transparent 12px),
        linear-gradient(to top, #00d2ff 12px, transparent 12px),
        /* Bottom-Right Notch */
        linear-gradient(to left, #00d2ff 12px, transparent 12px),
        linear-gradient(to top, #00d2ff 12px, transparent 12px),
        /* Carbon Dot Matrix & Radial Corner Glows */
        radial-gradient(circle at 0% 0%, rgba(0, 210, 255, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(0, 210, 255, 0.16) 0%, transparent 45%),
        radial-gradient(#1f2633 1px, transparent 1px);
    background-position: 
        left 6px top 6px, left 6px top 6px,
        right 6px top 6px, right 6px top 6px,
        left 6px bottom 6px, left 6px bottom 6px,
        right 6px bottom 6px, right 6px bottom 6px,
        0 0, 0 0, 0 0;
    background-size: 
        12px 2px, 2px 12px,
        12px 2px, 2px 12px,
        12px 2px, 2px 12px,
        12px 2px, 2px 12px,
        100% 100%, 100% 100%, 10px 10px;
    background-repeat: 
        no-repeat, no-repeat,
        no-repeat, no-repeat,
        no-repeat, no-repeat,
        no-repeat, no-repeat,
        no-repeat, no-repeat, repeat;
    filter: drop-shadow(0 0 3px rgba(0, 210, 255, 0.85));
    pointer-events: none;
    z-index: 0;
}

/* Bottom Laser Flare Streak in Cyan/Blue */
.cyber-panel .info-accordion::after,
.info-accordion::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #00d2ff 25%, #ffffff 50%, #00d2ff 75%, transparent 100%);
    box-shadow: 0 0 14px 2px #00d2ff;
    pointer-events: none;
    z-index: 2;
}

.cyber-panel .info-accordion p,
.info-accordion p {
    position: relative;
    z-index: 1;
    font-family: 'Titillium Web', sans-serif !important;
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    color: #cbd5e1 !important;
    margin: 0 !important;
    text-align: left !important;
}

.cyber-panel .info-accordion strong,
.info-accordion strong {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.6) !important;
}

.info-icon:hover + .info-accordion,
.info-accordion.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* --- Panel 1: Team Panel Overrides --- */
.team-panel .manager-card-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    clip-path: none !important;
}
.team-panel .manager-card-item::before {
    display: none !important;
}
.team-panel .manager-card-item .manager-info > .section-title {
    display: none !important;
}
.team-panel .preview-label {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.72rem !important;
    color: #ff3344 !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-shadow: 0 0 8px rgba(255, 51, 68, 0.5) !important;
    border-bottom: 1px solid rgba(255, 24, 53, 0.25) !important;
    padding-bottom: 4px !important;
    margin-bottom: 8px !important;
}
.team-panel .roster-row-item {
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.85) 0%, rgba(10, 13, 18, 0.95) 100%) !important;
    border: 1px solid rgba(255, 24, 53, 0.25) !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    margin-bottom: 4px !important;
    transition: all 0.2s ease !important;
}
.team-panel .roster-row-item:hover {
    background: rgba(255, 24, 53, 0.12) !important;
    border-color: rgba(255, 24, 53, 0.6) !important;
    box-shadow: 0 0 12px rgba(255, 24, 53, 0.25) !important;
}
.team-panel .edit-team-btn {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 12px 35px 12px 16px !important;
    background: linear-gradient(180deg, rgba(32, 12, 16, 0.9) 0%, rgba(16, 8, 10, 0.96) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 24, 53, 0.6) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 16px rgba(255, 24, 53, 0.25), inset 0 0 10px rgba(255, 24, 53, 0.15) !important;
    transition: all 0.25s ease !important;
}
.team-panel .edit-team-btn:hover {
    background: linear-gradient(180deg, rgba(55, 16, 22, 0.96) 0%, rgba(28, 10, 14, 0.98) 100%) !important;
    border-color: #ff2238 !important;
    box-shadow: 0 0 24px rgba(255, 24, 53, 0.6), inset 0 0 16px rgba(255, 24, 53, 0.35) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}

/* --- Panel 2: Time Trials Action Buttons --- */
.time-trials-panel .action-buttons-stack {
    margin-top: 8px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.time-trials-panel .action-buttons-stack .action-btn {
    width: 100%;
    min-width: unset;
    box-sizing: border-box;
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    padding: 14px 45px 14px 20px !important;
    border-radius: 8px !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.5)) !important;
    border-left: 4px solid var(--theme-btn-accent, #ff1835) !important;
    background: linear-gradient(180deg, rgba(24, 28, 38, 0.9) 0%, rgba(12, 14, 20, 0.96) 100%) !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.18)), inset 0 0 10px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.25s ease !important;
}
.time-trials-panel .action-buttons-stack .practice-btn {
    border-left-color: #00d2ff !important;
}
.time-trials-panel .action-buttons-stack .gp-btn {
    border-left-color: #00e676 !important;
}
.time-trials-panel .action-buttons-stack .sprint-btn {
    border-left-color: #ff9100 !important;
}
.time-trials-panel .action-buttons-stack .action-btn:hover {
    border-color: var(--theme-btn-hover-border, #ff1835) !important;
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(40, 16, 24, 0.96) 0%, rgba(20, 10, 15, 0.98) 100%)) !important;
    box-shadow: 0 0 24px var(--theme-btn-glow, rgba(255, 24, 53, 0.55)), inset 0 0 14px rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px) !important;
}

/* --- Panel 3: My League Customization --- */
#leagues-container .leagues-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.league-item {
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.85) 0%, rgba(10, 13, 18, 0.95) 100%) !important;
    border: 1px solid var(--theme-border, rgba(255, 24, 53, 0.35)) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
}
.league-item:hover,
.league-item.active {
    border-color: var(--theme-notch, #ff1835) !important;
    box-shadow: 0 0 16px var(--theme-border-glow, rgba(255, 24, 53, 0.45)), inset 0 0 12px rgba(255, 255, 255, 0.05) !important;
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(38, 14, 20, 0.92) 0%, rgba(18, 8, 12, 0.98) 100%)) !important;
}
#leagues-container .join-league-btn {
    width: 100%;
    margin-top: 10px;
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 12px 40px 12px 18px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 24, 53, 0.5) !important;
    background: linear-gradient(180deg, rgba(28, 12, 16, 0.9) 0%, rgba(14, 8, 10, 0.96) 100%) !important;
    box-shadow: 0 0 14px rgba(255, 24, 53, 0.2) !important;
}
#leagues-container .join-league-btn:hover {
    border-color: #ff1835 !important;
    box-shadow: 0 0 22px rgba(255, 24, 53, 0.5) !important;
    transform: translateY(-1px) !important;
}

/* --- Panel 4: Sounds Customization --- */
.sounds-customization .sounds-content {
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.sound-setting {
    margin-bottom: 4px;
}
.sound-label {
    display: block;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.75rem !important;
    color: #ff3344 !important;
    text-transform: uppercase !important;
    margin-bottom: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-shadow: 0 0 8px rgba(255, 51, 68, 0.5) !important;
}
.slider-scale {
    display: flex;
    justify-content: space-between;
    font-family: 'Orbitron', monospace;
    font-size: 0.68rem;
    color: #8892b0;
    margin-top: 8px;
    letter-spacing: 1px;
}
.cyber-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 24, 53, 0.4);
    border-radius: 4px;
    outline: none;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}
.cyber-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff1835;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 0 12px #ff1835, inset 0 0 4px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cyber-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px #ff1835, inset 0 0 6px #ffffff;
}
.cyber-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff1835;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 0 12px #ff1835, inset 0 0 4px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* --- Panel 5: Race Breakdown & Selectors --- */
.cyber-select,
.race-selector {
    width: 100%;
    padding: 12px 16px !important;
    background: linear-gradient(180deg, #121622 0%, #0a0d14 100%) !important;
    border: 1px solid rgba(255, 24, 53, 0.5) !important;
    color: #ffffff !important;
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    outline: none !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 24, 53, 0.15) !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
}
.cyber-select:hover,
.cyber-select:focus,
.race-selector:hover,
.race-selector:focus {
    border-color: #ff1835 !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 24, 53, 0.45) !important;
}
.breakdown-item {
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.8) 0%, rgba(10, 13, 18, 0.92) 100%) !important;
    border: 1px solid rgba(255, 24, 53, 0.25) !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    transition: all 0.2s ease !important;
}
.breakdown-item:hover {
    border-color: rgba(255, 24, 53, 0.6) !important;
    background: rgba(255, 24, 53, 0.1) !important;
    box-shadow: 0 0 14px rgba(255, 24, 53, 0.25) !important;
}
.breakdown-rank {
    font-family: 'Orbitron', sans-serif !important;
    color: #ff3344 !important;
    text-shadow: 0 0 8px rgba(255, 51, 68, 0.6) !important;
}
.breakdown-name {
    font-family: 'Titillium Web', sans-serif !important;
    letter-spacing: 0.5px;
}
.breakdown-pts {
    font-family: 'Orbitron', monospace !important;
    font-weight: 800 !important;
    color: #00e5ff !important;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5) !important;
}

/* --- Panel 6: Replay Center --- */
#replay-center .replay-controls .action-btn {
    width: 100%;
    min-width: unset;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    padding: 14px 45px 14px 20px !important;
    border-radius: 8px !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.5)) !important;
    border-left: 4px solid var(--theme-btn-accent, #ff1835) !important;
    background: linear-gradient(180deg, rgba(24, 28, 38, 0.9) 0%, rgba(12, 14, 20, 0.96) 100%) !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.18)), inset 0 0 10px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.25s ease !important;
}
#replay-center .replay-controls .action-btn:hover {
    border-color: var(--theme-btn-hover-border, #ff1835) !important;
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(40, 16, 24, 0.96) 0%, rgba(20, 10, 15, 0.98) 100%)) !important;
    box-shadow: 0 0 24px var(--theme-btn-glow, rgba(255, 24, 53, 0.55)), inset 0 0 14px rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px) !important;
}

/* --- Panel 7: Standings & Leaderboard Table --- */
.cyber-panel.leaderboard-panel {
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.96) 0%, rgba(8, 10, 15, 0.98) 100%) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.65)) !important;
    border-radius: 16px !important;
    padding: 24px 16px !important;
}
.table-wrapper {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 480px;
    padding-right: 2px;
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.leaderboard-table th,
.leaderboard-table td {
    padding: 8px 3px !important;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.leaderboard-table th:nth-child(1),
.leaderboard-table td:nth-child(1) {
    width: 26px;
    text-align: left;
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
}
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
    width: auto;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}
.leaderboard-table th:nth-child(3),
.leaderboard-table td:nth-child(3) {
    width: 42px;
}
.leaderboard-table th:nth-child(4),
.leaderboard-table td:nth-child(4) {
    width: 34px;
}
.leaderboard-table th:nth-child(5),
.leaderboard-table td:nth-child(5) {
    width: 34px;
}
.leaderboard-table th:nth-child(6),
.leaderboard-table td:nth-child(6) {
    width: 32px;
}
.leaderboard-table th:nth-child(7),
.leaderboard-table td:nth-child(7) {
    width: 44px;
    text-align: right;
    font-weight: 800;
}
.leaderboard-table th {
    background: #0e121a !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    color: var(--theme-label, #ff3344) !important;
    border-bottom: 1px solid var(--theme-border, rgba(255, 24, 53, 0.45)) !important;
    text-transform: uppercase !important;
    text-shadow: 0 0 8px var(--theme-border-glow, rgba(255, 51, 68, 0.4)) !important;
}
.leaderboard-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-size: 0.82rem !important;
}
.leaderboard-table tr:hover {
    background: var(--theme-border-glow, rgba(255, 24, 53, 0.08));
}

.prediction-session-divider {
    position: relative;
    text-align: center;
    margin: 22px 0 16px;
    z-index: 2;
}
.prediction-session-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--theme-border-glow, rgba(255, 24, 53, 0.5)), transparent);
}
.prediction-session-divider span {
    position: relative;
    background: #0b0e14;
    padding: 3px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--theme-label, #ff3344);
    text-transform: uppercase;
    border: 1px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.4));
    border-radius: 12px;
    box-shadow: 0 0 8px var(--theme-border-glow, rgba(255, 24, 53, 0.3));
}

/* Slots Grid Row */
.predictions-podium-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.podium-slot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 1 0px;
    min-width: 90px;
    max-width: 140px;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.podium-slot-item:hover {
    transform: translateY(-2px);
}

/* Category Label (POLE, 1ST, 2ND, 3RD) */
.podium-slot-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--theme-label, #ff3344);
    text-shadow: 0 0 10px var(--theme-border-glow, rgba(255, 51, 68, 0.85));
    margin-bottom: 12px;
}

/* Targeting Reticle HUD Dial */
.podium-driver-circle {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--theme-border-glow, rgba(255, 24, 53, 0.25)) 0%, #0a0d14 75%);
    border: 2px solid var(--theme-border, rgba(255, 24, 53, 0.7));
    box-shadow: 
        inset 0 0 18px var(--theme-border-glow, rgba(255, 24, 53, 0.5)),
        0 0 14px var(--theme-border-glow, rgba(255, 24, 53, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 10px;
}

/* Outer concentric reticle ring with glowing top & bottom brackets */
.podium-driver-circle::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--theme-border-glow, rgba(255, 24, 53, 0.28));
    border-top: 3px solid var(--theme-laser, #ff2238);
    border-bottom: 3px solid var(--theme-laser, #ff2238);
    filter: drop-shadow(0 0 7px var(--theme-laser, #ff1835));
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Dashed inner alignment guide */
.podium-driver-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px dashed var(--theme-notch, rgba(255, 60, 80, 0.5));
    pointer-events: none;
    transition: all 0.3s ease;
}

.podium-slot-item:hover .podium-driver-circle {
    transform: scale(1.06);
    box-shadow: 
        inset 0 0 24px var(--theme-border-glow, rgba(255, 24, 53, 0.7)),
        0 0 22px var(--theme-border, rgba(255, 24, 53, 0.75));
}

.podium-slot-item:hover .podium-driver-circle::before {
    inset: -10px;
    border-top-color: var(--theme-btn-hover-border, #ff4d61);
    border-bottom-color: var(--theme-btn-hover-border, #ff4d61);
    filter: drop-shadow(0 0 12px var(--theme-laser, #ff1835));
}

/* ==========================================================================
   FIXED PODIUM CIRCULAR GRAPHICS (POLE = ORANGE, 1ST = GOLD, 2ND = SILVER, 3RD = BRONZE)
   These stay fixed across all themes.
   ========================================================================== */

/* 1. POLE POSITION — ELECTRIC ORANGE */
.podium-slot-item.slot-pole .podium-slot-label,
.predictions-podium-row .podium-slot-item:nth-child(1) .podium-slot-label {
    color: #ff7700 !important;
    text-shadow: 0 0 10px rgba(255, 119, 0, 0.85) !important;
}
.podium-driver-circle.slot-pole,
.podium-slot-item.slot-pole .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(1) .podium-driver-circle {
    border-color: #ff6b00 !important;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.26) 0%, #0a0d14 75%) !important;
    box-shadow: inset 0 0 18px rgba(255, 107, 0, 0.5), 0 0 14px rgba(255, 107, 0, 0.45) !important;
}
.podium-driver-circle.slot-pole::before,
.podium-slot-item.slot-pole .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(1) .podium-driver-circle::before {
    border-color: rgba(255, 107, 0, 0.3) !important;
    border-top: 3px solid #ff7700 !important;
    border-bottom: 3px solid #ff7700 !important;
    filter: drop-shadow(0 0 8px #ff6b00) !important;
}
.podium-driver-circle.slot-pole::after,
.podium-slot-item.slot-pole .podium-driver-circle::after,
.predictions-podium-row .podium-slot-item:nth-child(1) .podium-driver-circle::after {
    border-color: rgba(255, 130, 0, 0.7) !important;
}
.podium-slot-item.slot-pole:hover .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(1):hover .podium-driver-circle {
    box-shadow: inset 0 0 24px rgba(255, 107, 0, 0.75), 0 0 22px #ff6b00 !important;
}
.podium-slot-item.slot-pole:hover .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(1):hover .podium-driver-circle::before {
    border-top-color: #ffa142 !important;
    border-bottom-color: #ffa142 !important;
    filter: drop-shadow(0 0 12px #ff7700) !important;
}
.podium-slot-item.slot-pole .reticle-empty-prompt,
.predictions-podium-row .podium-slot-item:nth-child(1) .reticle-empty-prompt {
    color: #ff7700 !important;
    text-shadow: 0 0 8px rgba(255, 119, 0, 0.8) !important;
}

/* 2. 1ST PLACE — RADIANT GOLD */
.podium-slot-item.slot-first .podium-slot-label,
.predictions-podium-row .podium-slot-item:nth-child(2) .podium-slot-label {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.85) !important;
}
.podium-driver-circle.slot-first,
.podium-slot-item.slot-first .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(2) .podium-driver-circle {
    border-color: #ffd700 !important;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.26) 0%, #0a0d14 75%) !important;
    box-shadow: inset 0 0 18px rgba(255, 215, 0, 0.5), 0 0 14px rgba(255, 215, 0, 0.45) !important;
}
.podium-driver-circle.slot-first::before,
.podium-slot-item.slot-first .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(2) .podium-driver-circle::before {
    border-color: rgba(255, 215, 0, 0.3) !important;
    border-top: 3px solid #ffe247 !important;
    border-bottom: 3px solid #ffe247 !important;
    filter: drop-shadow(0 0 8px #ffd700) !important;
}
.podium-driver-circle.slot-first::after,
.podium-slot-item.slot-first .podium-driver-circle::after,
.predictions-podium-row .podium-slot-item:nth-child(2) .podium-driver-circle::after {
    border-color: rgba(255, 230, 80, 0.7) !important;
}
.podium-slot-item.slot-first:hover .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(2):hover .podium-driver-circle {
    box-shadow: inset 0 0 24px rgba(255, 215, 0, 0.75), 0 0 22px #ffd700 !important;
}
.podium-slot-item.slot-first:hover .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(2):hover .podium-driver-circle::before {
    border-top-color: #fff275 !important;
    border-bottom-color: #fff275 !important;
    filter: drop-shadow(0 0 12px #ffd700) !important;
}
.podium-slot-item.slot-first .reticle-empty-prompt,
.predictions-podium-row .podium-slot-item:nth-child(2) .reticle-empty-prompt {
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8) !important;
}

/* 3. 2ND PLACE — CHROME SILVER / TITANIUM */
.podium-slot-item.slot-second .podium-slot-label,
.predictions-podium-row .podium-slot-item:nth-child(3) .podium-slot-label {
    color: #cbd5e1 !important;
    text-shadow: 0 0 10px rgba(203, 213, 225, 0.85) !important;
}
.podium-driver-circle.slot-second,
.podium-slot-item.slot-second .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(3) .podium-driver-circle {
    border-color: #cbd5e1 !important;
    background: radial-gradient(circle, rgba(203, 213, 225, 0.24) 0%, #0a0d14 75%) !important;
    box-shadow: inset 0 0 18px rgba(203, 213, 225, 0.5), 0 0 14px rgba(203, 213, 225, 0.4) !important;
}
.podium-driver-circle.slot-second::before,
.podium-slot-item.slot-second .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(3) .podium-driver-circle::before {
    border-color: rgba(203, 213, 225, 0.3) !important;
    border-top: 3px solid #ffffff !important;
    border-bottom: 3px solid #ffffff !important;
    filter: drop-shadow(0 0 8px rgba(241, 245, 249, 0.95)) !important;
}
.podium-driver-circle.slot-second::after,
.podium-slot-item.slot-second .podium-driver-circle::after,
.predictions-podium-row .podium-slot-item:nth-child(3) .podium-driver-circle::after {
    border-color: rgba(226, 232, 240, 0.7) !important;
}
.podium-slot-item.slot-second:hover .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(3):hover .podium-driver-circle {
    box-shadow: inset 0 0 24px rgba(203, 213, 225, 0.75), 0 0 22px #e2e8f0 !important;
}
.podium-slot-item.slot-second:hover .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(3):hover .podium-driver-circle::before {
    border-top-color: #ffffff !important;
    border-bottom-color: #ffffff !important;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.95)) !important;
}
.podium-slot-item.slot-second .reticle-empty-prompt,
.predictions-podium-row .podium-slot-item:nth-child(3) .reticle-empty-prompt {
    color: #cbd5e1 !important;
    text-shadow: 0 0 8px rgba(203, 213, 225, 0.8) !important;
}

/* 4. 3RD PLACE — METALLIC BRONZE */
.podium-slot-item.slot-third .podium-slot-label,
.predictions-podium-row .podium-slot-item:nth-child(4) .podium-slot-label {
    color: #cd7f32 !important;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.85) !important;
}
.podium-driver-circle.slot-third,
.podium-slot-item.slot-third .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(4) .podium-driver-circle {
    border-color: #cd7f32 !important;
    background: radial-gradient(circle, rgba(205, 127, 50, 0.26) 0%, #0a0d14 75%) !important;
    box-shadow: inset 0 0 18px rgba(205, 127, 50, 0.5), 0 0 14px rgba(205, 127, 50, 0.45) !important;
}
.podium-driver-circle.slot-third::before,
.podium-slot-item.slot-third .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(4) .podium-driver-circle::before {
    border-color: rgba(205, 127, 50, 0.3) !important;
    border-top: 3px solid #e28a38 !important;
    border-bottom: 3px solid #e28a38 !important;
    filter: drop-shadow(0 0 8px #cd7f32) !important;
}
.podium-driver-circle.slot-third::after,
.podium-slot-item.slot-third .podium-driver-circle::after,
.predictions-podium-row .podium-slot-item:nth-child(4) .podium-driver-circle::after {
    border-color: rgba(225, 140, 60, 0.7) !important;
}
.podium-slot-item.slot-third:hover .podium-driver-circle,
.predictions-podium-row .podium-slot-item:nth-child(4):hover .podium-driver-circle {
    box-shadow: inset 0 0 24px rgba(205, 127, 50, 0.75), 0 0 22px #cd7f32 !important;
}
.podium-slot-item.slot-third:hover .podium-driver-circle::before,
.predictions-podium-row .podium-slot-item:nth-child(4):hover .podium-driver-circle::before {
    border-top-color: #fca454 !important;
    border-bottom-color: #fca454 !important;
    filter: drop-shadow(0 0 12px #cd7f32) !important;
}
.podium-slot-item.slot-third .reticle-empty-prompt,
.predictions-podium-row .podium-slot-item:nth-child(4) .reticle-empty-prompt {
    color: #cd7f32 !important;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.8) !important;
}

/* Driver Avatar inside reticle */
.podium-driver-circle .driver-avatar {
    box-sizing: border-box;
    width: 76px;
    height: 76px;
    margin: 0;
    border-radius: 50%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.85));
}

/* Empty Reticle Crosshair Placeholder */
.reticle-empty-prompt {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-border, rgba(255, 24, 53, 0.6));
    text-shadow: 0 0 8px var(--theme-border-glow, rgba(255, 24, 53, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Driver Name Label */
.podium-driver-name {
    font-family: 'Orbitron', 'Titillium Web', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 8px rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    text-align: center;
}

/* Predictions Button Group & Tech Button */
.predictions-btn-group {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.predict-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(32, 12, 16, 0.85) 0%, rgba(16, 8, 10, 0.95) 100%);
    color: var(--theme-btn-text, #ffffff);
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.6));
    border-left: 4px solid var(--theme-btn-accent, #ff1835);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.25)), inset 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease;
    text-align: center;
}

.predict-btn:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(55, 16, 22, 0.95) 0%, rgba(28, 10, 14, 0.98) 100%));
    border-color: var(--theme-btn-hover-border, #ff2238);
    box-shadow: 0 0 24px var(--theme-btn-glow, rgba(255, 24, 53, 0.6)), inset 0 0 16px rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

/* PREDICTIONS PAGE STYLES */
.predictions-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.selection-sidebar {
    position: relative;
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.96) 0%, rgba(8, 10, 15, 0.98) 100%);
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.65));
    border-radius: 16px;
    padding: 26px 24px 30px;
    position: sticky;
    top: 30px;
    height: fit-content;
    box-shadow: 
        0 0 35px var(--theme-border-glow, rgba(230, 20, 40, 0.22)),
        inset 0 0 40px var(--theme-border-glow, rgba(255, 15, 40, 0.08)),
        0 20px 50px rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

.selection-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(255, 20, 40, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(255, 20, 40, 0.15) 0%, transparent 45%),
        radial-gradient(#1f2633 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 12px 12px;
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.selection-sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #ff1835 25%, #ffffff 50%, #ff1835 75%, transparent 100%);
    box-shadow: 0 0 14px 2px #ff1835;
    pointer-events: none;
    z-index: 2;
}

.selection-sidebar .section-title {
    font-family: 'Orbitron', 'Titillium Web', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #f5f6f8;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 18px rgba(255, 30, 50, 0.65);
}

.slot-group {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.slot-title-outside {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-style: normal;
    color: #ff3344;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin-bottom: 8px;
    padding-left: 2px;
    text-shadow: 0 0 8px rgba(255, 51, 68, 0.7);
}

.slot-selection-item {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: rgba(10, 14, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.slot-selection-item:hover {
    border-color: rgba(255, 24, 53, 0.45);
    background: rgba(22, 26, 36, 0.9);
}

.slot-selection-item.selected {
    border-color: #ff1835;
    background: linear-gradient(90deg, rgba(255, 24, 53, 0.18) 0%, rgba(20, 24, 32, 0.95) 100%);
    box-shadow: 0 0 16px rgba(255, 24, 53, 0.35), inset 0 0 14px rgba(255, 24, 53, 0.15);
}

.selection-sidebar .driver-avatar.small {
    margin: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #ff1835;
    box-shadow: 0 0 10px rgba(255, 24, 53, 0.6);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #555;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.selected .radio-dot {
    border-color: #ff1835;
    box-shadow: 0 0 8px rgba(255, 24, 53, 0.5);
}

.selected .radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #ff1835;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff1835;
}

/* Slot-specific color accents for predictions setup (Orange, Gold, Silver, Bronze) */
#slot-pole.selected, .slot-group:nth-child(1) .slot-selection-item.selected {
    border-color: #ff6b00 !important;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.22) 0%, rgba(20, 24, 32, 0.95) 100%) !important;
    box-shadow: 0 0 16px rgba(255, 107, 0, 0.4), inset 0 0 14px rgba(255, 107, 0, 0.15) !important;
}
#slot-pole .radio-dot, .slot-group:nth-child(1) .radio-dot { border-color: #ff6b00; }
#slot-pole.selected .radio-dot, .slot-group:nth-child(1) .selected .radio-dot { border-color: #ff7700 !important; box-shadow: 0 0 8px rgba(255, 119, 0, 0.6) !important; }
#slot-pole.selected .radio-dot::after, .slot-group:nth-child(1) .selected .radio-dot::after { background: #ff7700 !important; box-shadow: 0 0 8px #ff7700 !important; }
#slot-pole .driver-avatar.small, .slot-group:nth-child(1) .driver-avatar.small { border-color: #ff6b00 !important; box-shadow: 0 0 10px rgba(255, 107, 0, 0.6) !important; }
.slot-group:nth-child(1) .slot-title-outside { color: #ff7700 !important; text-shadow: 0 0 8px rgba(255, 119, 0, 0.7) !important; }

#slot-first.selected, .slot-group:nth-child(2) .slot-selection-item.selected {
    border-color: #ffd700 !important;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.22) 0%, rgba(20, 24, 32, 0.95) 100%) !important;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.4), inset 0 0 14px rgba(255, 215, 0, 0.15) !important;
}
#slot-first .radio-dot, .slot-group:nth-child(2) .radio-dot { border-color: #ffd700; }
#slot-first.selected .radio-dot, .slot-group:nth-child(2) .selected .radio-dot { border-color: #ffe247 !important; box-shadow: 0 0 8px rgba(255, 215, 0, 0.6) !important; }
#slot-first.selected .radio-dot::after, .slot-group:nth-child(2) .selected .radio-dot::after { background: #ffe247 !important; box-shadow: 0 0 8px #ffd700 !important; }
#slot-first .driver-avatar.small, .slot-group:nth-child(2) .driver-avatar.small { border-color: #ffd700 !important; box-shadow: 0 0 10px rgba(255, 215, 0, 0.6) !important; }
.slot-group:nth-child(2) .slot-title-outside { color: #ffd700 !important; text-shadow: 0 0 8px rgba(255, 215, 0, 0.7) !important; }

#slot-second.selected, .slot-group:nth-child(3) .slot-selection-item.selected {
    border-color: #cbd5e1 !important;
    background: linear-gradient(90deg, rgba(203, 213, 225, 0.2) 0%, rgba(20, 24, 32, 0.95) 100%) !important;
    box-shadow: 0 0 16px rgba(203, 213, 225, 0.4), inset 0 0 14px rgba(203, 213, 225, 0.15) !important;
}
#slot-second .radio-dot, .slot-group:nth-child(3) .radio-dot { border-color: #cbd5e1; }
#slot-second.selected .radio-dot, .slot-group:nth-child(3) .selected .radio-dot { border-color: #ffffff !important; box-shadow: 0 0 8px rgba(241, 245, 249, 0.6) !important; }
#slot-second.selected .radio-dot::after, .slot-group:nth-child(3) .selected .radio-dot::after { background: #ffffff !important; box-shadow: 0 0 8px #ffffff !important; }
#slot-second .driver-avatar.small, .slot-group:nth-child(3) .driver-avatar.small { border-color: #cbd5e1 !important; box-shadow: 0 0 10px rgba(203, 213, 225, 0.6) !important; }
.slot-group:nth-child(3) .slot-title-outside { color: #cbd5e1 !important; text-shadow: 0 0 8px rgba(203, 213, 225, 0.7) !important; }

#slot-third.selected, .slot-group:nth-child(4) .slot-selection-item.selected {
    border-color: #cd7f32 !important;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.22) 0%, rgba(20, 24, 32, 0.95) 100%) !important;
    box-shadow: 0 0 16px rgba(205, 127, 50, 0.4), inset 0 0 14px rgba(205, 127, 50, 0.15) !important;
}
#slot-third .radio-dot, .slot-group:nth-child(4) .radio-dot { border-color: #cd7f32; }
#slot-third.selected .radio-dot, .slot-group:nth-child(4) .selected .radio-dot { border-color: #e28a38 !important; box-shadow: 0 0 8px rgba(205, 127, 50, 0.6) !important; }
#slot-third.selected .radio-dot::after, .slot-group:nth-child(4) .selected .radio-dot::after { background: #e28a38 !important; box-shadow: 0 0 8px #cd7f32 !important; }
#slot-third .driver-avatar.small, .slot-group:nth-child(4) .driver-avatar.small { border-color: #cd7f32 !important; box-shadow: 0 0 10px rgba(205, 127, 50, 0.6) !important; }
.slot-group:nth-child(4) .slot-title-outside { color: #cd7f32 !important; text-shadow: 0 0 8px rgba(205, 127, 50, 0.7) !important; }

.slot-info {
    flex: 1;
}

.slot-info .driver-chosen {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.4px;
    font-family: 'Orbitron', 'Titillium Web', sans-serif;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Driver Selection Pool Cards */
.driver-selection-grid .pool-card {
    background: linear-gradient(180deg, rgba(16, 20, 26, 0.88) 0%, rgba(10, 12, 16, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.driver-selection-grid .pool-card:hover {
    border-color: #ff1835;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 24, 53, 0.45);
}

.driver-selection-grid .pool-card .card-name {
    font-family: 'Orbitron', 'Titillium Web', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
    margin-top: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.driver-selection-grid .pool-card .card-team {
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn,
.nav-btn,
.cta-btn,
.save-n-exit-btn,
.save-team-btn,
.how-to-btn,
.add-user-btn,
.predict-btn,
.edit-team-btn,
.cat-btn,
.modal-close-styled {
    padding: 12px 60px 12px 25px;
    /* Increased right padding to clear the dash */
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: left;
    text-decoration: none;
    border: none;
    background: var(--metallic-bg);
    color: #fff;
    cursor: pointer;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    font-style: italic;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    width: fit-content;
    /* Sized to text */
    border-radius: 2px;
}

.action-btn::after,
.nav-btn::after,
.cta-btn::after,
.save-n-exit-btn::after,
.save-team-btn::after,
.how-to-btn::after,
.add-user-btn::after,
.predict-btn::after,
.edit-team-btn::after,
.cat-btn::after,
.modal-close-styled::after {
    content: '';
    position: absolute;
    right: 15px;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
}

.action-btn:hover,
.nav-btn:hover,
.cta-btn:hover,
.save-n-exit-btn:hover,
.save-team-btn:hover,
.how-to-btn:hover,
.add-user-btn:hover,
.predict-btn:hover,
.edit-team-btn:hover,
.cat-btn:hover,
.modal-close-styled:hover {
    background: linear-gradient(90deg, #1A1A20 0%, #25252D 100%);
    box-shadow: var(--glow-red);
    padding-right: 45px;
}

.manager-card-item {
    background: var(--card-bg);
    background-image: linear-gradient(45deg, rgba(255, 0, 0, 0.05) 0%, transparent 100%);
    border: var(--card-border);
    border-radius: 0;
    /* Square sleek look */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.manager-card-item::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
}

.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    align-items: center;
}

.action-buttons-stack .action-btn {
    width: fit-content;
    min-width: 200px;
    padding: 15px 50px 15px 25px;
    font-size: 1rem;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    border: none;
    border-left: 4px solid #333;
    background: var(--metallic-bg);
    color: #fff;
    cursor: pointer;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    font-style: italic;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.action-buttons-stack .action-btn::after {
    content: '';
    position: absolute;
    right: 15px;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
}

.action-btn:hover {
    border-left-color: var(--primary-color);
    background: linear-gradient(90deg, #1A1A20 0%, #25252D 100%);
    box-shadow: var(--glow-red);
    padding-left: 25px;
}

.practice-btn {
    background: linear-gradient(135deg, #4da3ff, #2b82e4);
    color: white;
}

.gp-btn {
    background: linear-gradient(135deg, #00D26A, #008f49);
    color: white;
}

.sprint-btn {
    background: linear-gradient(135deg, #f39c12, #d35400);
    color: white;
}

.sim-next-btn {
    background: #f0f0f0;
    color: #111;
}

.sim-full-btn {
    background: linear-gradient(135deg, #ff4d4d, #e10600);
    color: white;
}

.action-buttons-stack .action-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    filter: brightness(1.2);
}

/* LAYOUT */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.manager-card-item h3 {
    margin: 0 0 15px 0;
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.manager-card-item h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.manager-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 15px;
}

/* DRAFT POOL & CARDS */
.pool-section {
    width: 100%;
}

.pool-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    font-family: 'Titillium Web', sans-serif;
    font-style: italic;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    letter-spacing: 1px;
}


.pool-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.card {
    background: var(--card-bg);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        repeating-linear-gradient(45deg, transparent, transparent 1px, rgba(255, 255, 255, 0.02) 1px, rgba(255, 255, 255, 0.02) 2px);
    border: var(--card-border);
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    min-height: 105px;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--glow-red);
}

.card.selected {
    border-color: var(--success-color);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.card-color-stripe {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2px;
    margin-left: 10px;
    position: relative;
    z-index: 2;
}

.card-name {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-left: 10px;
    position: absolute;
    bottom: 0px;
    left: 4px;
    right: 0;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-price {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.card-team {
    writing-mode: sideways-lr;
    margin-left: 0;
    font-size: 0.9rem;
    color: #ffffff;
    position: absolute;
    bottom: 10px;
    left: 0;
    padding-left: 5px;
    right: 0;
    text-align: center;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-rating {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #666;
    letter-spacing: 1px;
    z-index: 2;
}

/* Make driver avatars large and sit behind text in the selection pools */
.pool-card .driver-avatar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px !important;
    height: 130px !important;
    margin: 0 !important;
    opacity: 0.9;
    border: none;
    box-shadow: none;
    background-color: transparent;
    z-index: 0;
    pointer-events: none;
}

/* TEAM LOGOS - SPRITE SHEET */
.team-logo {
    width: 222px;
    height: 126px;
    background-image: url('team_logos_v2.png');
    background-repeat: no-repeat;
    background-size: 400% 300%;
    /* 4 cols x 3 rows - each cell is square in the sprite */
    background-color: transparent;
    border-radius: 4px;
    background-position: center;
}

/* Row 0 - Top row */
.logo-alpine {
    background-position: 0% 0%;
}

.logo-aston-martin {
    background-position: 33.333% 0%;
}

.logo-audi {
    background-position: 66.666% 0%;
}

.logo-cadillac {
    background-position: 100% 0%;
}

/* Row 1 - Middle row */
.logo-ferrari {
    background-position: 0% 50%;
}

.logo-haas {
    background-position: 33.333% 50%;
}

.logo-mclaren {
    background-position: 66.666% 50%;
}

.logo-mercedes {
    background-position: 100% 50%;
}

/* Row 2 - Bottom row */
.logo-rb {
    background-position: 0% 100%;
}

.logo-redbull {
    background-position: 33.333% 100%;
}

.logo-williams {
    background-position: 66.666% 100%;
}

/* Reuse Audi or assign another slot? Let's reuse Audi for now or fallback */

/* DRIVER AVATARS - SPRITE SHEET (5x5 Grid) */
.driver-avatar {
    width: 50px;
    height: 50px;
    margin: 5px auto;
    background-image: url('drivers_avatars.gif');
    background-repeat: no-repeat;
    background-size: 500% 500%;
    /* 5 cols, 5 rows */
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Small variation for roster */
.driver-avatar.small {
    width: 32px;
    height: 32px;
}

/* Sprite Positions for 22 Drivers (Column %, Row %) */
/* Row 0 */
.avatar-pierre-gasly {
    background-position: 0% 0%;
}

.avatar-franco-colapinto {
    background-position: 25% 0%;
}

.avatar-fernando-alonso {
    background-position: 50% 0%;
}

.avatar-lance-stroll {
    background-position: 75% 0%;
}

.avatar-nico-hulkenberg {
    background-position: 100% 0%;
}

/* Row 1 */
.avatar-gabriel-bortoleto {
    background-position: 0% 25%;
}

.avatar-sergio-perez {
    background-position: 25% 25%;
}

.avatar-valtteri-bottas {
    background-position: 50% 25%;
}

.avatar-charles-leclerc {
    background-position: 75% 25%;
}

.avatar-lewis-hamilton {
    background-position: 100% 25%;
}

/* Row 2 */
.avatar-esteban-ocon {
    background-position: 0% 50%;
}

.avatar-oliver-bearman {
    background-position: 25% 50%;
}

.avatar-lando-norris {
    background-position: 50% 50%;
}

.avatar-oscar-piastri {
    background-position: 75% 50%;
}

.avatar-george-russell {
    background-position: 100% 50%;
}

/* Row 3 */
.avatar-kimi-antonelli {
    background-position: 0% 75%;
}

.avatar-liam-lawson {
    background-position: 25% 75%;
}

.avatar-arvid-lindblad {
    background-position: 50% 75%;
}

.avatar-max-verstappen {
    background-position: 75% 75%;
}

.avatar-isack-hadjar {
    background-position: 100% 75%;
}

/* Row 4 */
.avatar-alexander-albon {
    background-position: 0% 100%;
}

.avatar-carlos-sainz-jr {
    background-position: 25% 100%;
}

.avatar-yuki-tsunoda {
    background-position: 50% 100%;
}

/* SIDEBAR & STATS */
.stat-card {
    background: var(--card-bg);
    border: var(--card-border);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #888;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* ==========================================================================
   TEAM.HTML CYBER HUD PANELS (Drivers, Constructors, Remaining Budget)
   ========================================================================== */
.sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
    height: fit-content;
}

.my-team-panel.cyber-panel {
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.96) 0%, rgba(8, 10, 15, 0.98) 100%) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.65)) !important;
    border-radius: 16px !important;
    padding: 24px 20px 26px !important;
}

.my-team-panel .title-wrap {
    padding-right: 32px !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
}

.my-team-panel .section-title {
    font-size: 0.86rem !important;
    letter-spacing: 1.2px !important;
}

.my-team-panel .hash-vents {
    width: 16px !important;
    height: 10px !important;
}

.my-team-panel .header-actions {
    right: 0 !important;
}

.my-team-panel .info-accordion {
    width: 295px !important;
    right: 0 !important;
}

.budget-card-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(22, 26, 36, 0.75) 0%, rgba(12, 14, 20, 0.9) 100%);
    border: 1px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.25));
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

.budget-card-bar .budget-display {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 0;
}

.budget-card-bar .budget-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #94a3b8;
}

.budget-card-bar .budget-val {
    font-family: 'Orbitron', monospace !important;
    font-size: 1.85rem !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    line-height: 1.1 !important;
    margin-top: 4px !important;
    color: var(--theme-telemetry, #ff3344) !important;
    text-shadow: 0 0 14px var(--theme-telemetry-glow, rgba(255, 24, 53, 0.75)) !important;
}

.random-picks-btn {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3) 0%, rgba(88, 28, 135, 0.5) 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.6) !important;
    border-radius: 8px !important;
    color: #f3e8ff !important;
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.2 !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.25), inset 0 0 10px rgba(168, 85, 247, 0.15) !important;
}

.random-picks-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.5) 0%, rgba(126, 34, 206, 0.7) 100%) !important;
    border-color: #c084fc !important;
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.65), inset 0 0 14px rgba(192, 132, 252, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

.my-team-panel .slot-group-title {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.72rem !important;
    color: var(--theme-label, #ff3344) !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-shadow: 0 0 8px var(--theme-border-glow, rgba(255, 51, 68, 0.5)) !important;
    border-bottom: 1px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.25)) !important;
    padding-bottom: 4px !important;
    margin-top: 14px !important;
    margin-bottom: 8px !important;
}

.my-team-panel .roster-slot {
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.85) 0%, rgba(10, 12, 18, 0.95) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-family: 'Titillium Web', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    min-height: 44px !important;
    height: auto !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6) !important;
    transition: all 0.25s ease !important;
}

.my-team-panel .roster-slot:not(.filled) {
    color: #64748b !important;
    font-style: italic !important;
    border: 1px dashed rgba(255, 255, 255, 0.15) !important;
    background: rgba(10, 14, 20, 0.4) !important;
}

.my-team-panel .roster-slot.filled {
    background: linear-gradient(180deg, rgba(22, 26, 38, 0.9) 0%, rgba(12, 14, 22, 0.98) 100%) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.35)) !important;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.7), inset 0 0 10px var(--theme-border-glow, rgba(255, 24, 53, 0.08)) !important;
}

.my-team-panel .roster-slot.filled:hover {
    border-color: var(--theme-border, rgba(255, 24, 53, 0.7)) !important;
    box-shadow: 0 0 16px var(--theme-border-glow, rgba(255, 24, 53, 0.3)) !important;
}

.my-team-panel .roster-slot .driver-avatar.small {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 1.5px solid #00d2ff !important;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.5) !important;
    flex-shrink: 0;
}

.my-team-panel .roster-slot .remove-btn {
    cursor: pointer;
    font-size: 1.05rem;
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
}

.my-team-panel .roster-slot .remove-btn:hover {
    transform: scale(1.25);
    filter: drop-shadow(0 0 8px var(--theme-btn-accent, rgba(255, 24, 53, 0.9)));
}

.my-team-panel .save-n-exit-btn {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 12px 16px !important;
    background: linear-gradient(180deg, rgba(24, 28, 38, 0.94) 0%, rgba(12, 14, 20, 0.98) 100%) !important;
    color: var(--theme-btn-text, #ffffff) !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.6)) !important;
    border-left: 4px solid var(--theme-btn-accent, #ff1835) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.25)), inset 0 0 10px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.25s ease !important;
    text-align: center !important;
    justify-content: center !important;
    width: auto !important;
}

.my-team-panel .save-n-exit-btn::after {
    display: none !important;
}

.my-team-panel .save-n-exit-btn:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(55, 16, 22, 0.96) 0%, rgba(28, 10, 14, 0.98) 100%)) !important;
    border-color: var(--theme-btn-hover-border, #ff2238) !important;
    box-shadow: 0 0 24px var(--theme-btn-glow, rgba(255, 24, 53, 0.6)), inset 0 0 16px rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

/* Enhanced Cyber Styling for Draft Pool Cards */
.drivers-panel.cyber-panel,
.constructors-panel.cyber-panel {
    padding: 24px 20px 28px !important;
}

.drivers-panel .pool-grid,
.constructors-panel .pool-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.cyber-panel .pool-card.card {
    background: linear-gradient(180deg, rgba(18, 22, 30, 0.92) 0%, rgba(10, 12, 16, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 10px !important;
    padding: 10px !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
    min-height: 105px !important;
}

.cyber-panel .pool-card.card:hover {
    transform: translateY(-4px) !important;
    border-color: var(--theme-border, rgba(255, 24, 53, 0.8)) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85), 0 0 18px var(--theme-border-glow, rgba(255, 24, 53, 0.45)) !important;
}

.cyber-panel .pool-card.card.selected {
    border: 2px solid #00ff88 !important;
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.08) 0%, rgba(10, 18, 14, 0.98) 100%) !important;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4), inset 0 0 15px rgba(0, 255, 136, 0.12) !important;
}

.cyber-panel .pool-card.card .card-price {
    font-family: 'Orbitron', monospace !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.5px !important;
    background: rgba(0, 0, 0, 0.65) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.35)) !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    color: var(--theme-telemetry, #ff3344) !important;
    text-shadow: 0 0 8px var(--theme-telemetry-glow, rgba(255, 24, 53, 0.6)) !important;
}

.cyber-panel .pool-card.card .card-name {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9) !important;
}

/* RESULTS MODAL (CYBER HUD MODAL THEME) */
#results-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 10, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.98) 0%, rgba(8, 10, 15, 0.99) 100%) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.65)) !important;
    border-radius: 16px !important;
    padding: 34px 30px 32px !important;
    max-width: 500px;
    width: 90%;
    position: relative !important;
    box-shadow: 
        0 0 50px var(--theme-border-glow, rgba(230, 20, 40, 0.28)),
        inset 0 0 40px var(--theme-border-glow, rgba(255, 15, 40, 0.08)),
        0 30px 80px rgba(0, 0, 0, 0.95) !important;
    overflow: visible;
}

/* Subtle Carbon Dot Matrix & Radial Corner Glows */
.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background-image: 
        radial-gradient(circle at 0% 0%, var(--theme-border-glow, rgba(255, 20, 40, 0.16)) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, var(--theme-border-glow, rgba(255, 20, 40, 0.16)) 0%, transparent 45%),
        radial-gradient(#1f2633 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 12px 12px;
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

/* Bottom Laser Flare Streak */
.modal-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--theme-laser, #ff1835) 25%, #ffffff 50%, var(--theme-laser, #ff1835) 75%, transparent 100%);
    box-shadow: 0 0 16px 2px var(--theme-laser, #ff1835);
    pointer-events: none;
    z-index: 2;
}

.modal-content > *:not(.corner-notch):not(::before):not(::after) {
    position: relative;
    z-index: 5;
}

.close-modal {
    position: absolute;
    right: 18px;
    top: 18px;
    color: var(--theme-btn-accent, #ff3344) !important;
    background: linear-gradient(135deg, rgba(24, 28, 38, 0.9) 0%, rgba(12, 14, 20, 0.96) 100%) !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 40, 60, 0.65)) !important;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif !important;
    cursor: pointer;
    border-radius: 8px !important;
    z-index: 10001;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px var(--theme-btn-glow, rgba(255, 24, 53, 0.35)), inset 0 0 8px rgba(0, 0, 0, 0.5) !important;
    line-height: 1;
}

.close-modal:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(135deg, rgba(255, 30, 50, 0.95) 0%, rgba(200, 10, 25, 0.98) 100%)) !important;
    color: #ffffff !important;
    border-color: var(--theme-btn-hover-border, #ff3344) !important;
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 0 25px var(--theme-btn-glow, rgba(255, 24, 53, 0.85)), 0 0 10px rgba(255, 255, 255, 0.4) !important;
}

.table-wrapper {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar styling for table-wrapper */
.table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(225, 6, 0, 0.4);
    border-radius: 3px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    color: #888;
    font-size: 0.8rem;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
}

.leaderboard-table td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ANIMATIONS */
.animate {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

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

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* COMPONENT: ERROR MODAL */
#error-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

#error-modal.show {
    display: flex;
}

#error-modal .error-box {
    background: #1A1A20;
    border: 2px solid var(--primary-color);
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(225, 6, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#error-modal .error-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#error-modal .error-message {
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

#error-modal .error-close-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Titillium Web', sans-serif;
    transition: all 0.2s;
}

#error-modal .error-close-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* MANAGER CARD ROSTER STYLES */
.manager-roster-preview {
    margin-top: 15px;
    display: flex;
    flex-direction: row;
    /* Side-by-side Layout */
    gap: 10px;
}

.preview-section {
    flex: 1;
    /* Equal Width Columns */
    min-width: 0;
    /* Allow text truncate */
}

.preview-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.preview-icons {
    display: flex;
    flex-direction: column;
    /* Vertical Layout */
    gap: 8px;
    /* Remove if you want them tight, but gap is good */
    width: 100%;
}

/* Row item for vertical list */
.roster-row-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 6px;
    border-radius: 4px;
    width: 100%;
    position: relative;
    /* For tooltip */
    transition: background 0.2s;
    min-width: 0;
    /* Important for flex children */
}

.roster-row-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mini-driver-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-width: 2px;
    border-style: solid;
    overflow: hidden;
    position: relative;
    background: #222;
    flex-shrink: 0;
}

/* Override existing driver-avatar class when nested */
.mini-driver-avatar .driver-avatar {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Tiny Team Logos - BIGGER NOW */
.mini-team-logo {
    width: 70px;
    /* Increased from 44px */
    height: 40px;
    /* Increased from 25px */
    background-image: url('team_logos_v2.png');
    background-repeat: no-repeat;
    background-size: 400% 300%;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.item-name {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.empty-text {
    font-size: 0.75rem;
    color: #444;
    font-style: italic;
    padding: 5px 0;
}

/* STYLIZED TOOLTIP */
.roster-row-item::after,
.remove-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: #1A1A20;
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.roster-row-item:hover::after,
.remove-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.remove-btn {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    filter: grayscale(1);
    opacity: 0.6;
    transition: all 0.2s;
}

.remove-btn:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.2);
}

.car-sprite {
    width: 200px;
    height: 80px;
    background-image: url('cars_marquee.gif');
    background-size: 300% 400%;
    /* Based on the 3x4 generated grid */
    background-repeat: no-repeat;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* Tiny History Button on Team Panel */
.history-btn-small {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #AAA;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 25px;
    /* Separation from slots */
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Titillium Web', sans-serif;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.history-btn-small:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.history-btn-small::before {
    content: '📋';
    /* or specific icon */
    font-size: 1.1em;
    filter: grayscale(1);
    opacity: 0.7;
}

.history-btn-small:hover::before {
    filter: grayscale(0);
    opacity: 1;
}

.random-picks-btn {
    background: linear-gradient(135deg, #2a0a6e, #5b1ad4);
    border: 1px solid rgba(150, 100, 255, 0.5);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 14px rgba(120, 60, 220, 0.35);
}

.random-picks-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: rgba(255, 255, 255, 0.15);
    transform: skewX(-20deg);
    animation: shimmer 2.4s infinite;
}

@keyframes shimmer {
    0% {
        left: -75%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        left: 125%;
        opacity: 0;
    }
}

.random-picks-btn:hover {
    background: linear-gradient(135deg, #3d13a0, #7730f0);
    box-shadow: 0 0 22px rgba(140, 80, 255, 0.6);
    transform: translateY(-1px);
}

.random-picks-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Modal Close Button Styled */
.modal-close-styled {
    width: 100%;
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px;
    border-radius: 4px;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-styled:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
}

/* LANDING PAGE */
.landing-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('relaxing.gif') no-repeat center center;
    background-size: cover;
    position: relative;
}

/* ==========================================================================
   CYBER-F1 HUD LANDING & SPLASH SCREEN PANEL (index.html)
   ========================================================================== */
.landing-content.cyber-panel {
    z-index: 10;
    text-align: center;
    padding: 38px 48px 44px !important;
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.94) 0%, rgba(8, 10, 15, 0.98) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.65)) !important;
    box-shadow: 
        0 0 50px var(--theme-border-glow, rgba(230, 20, 40, 0.3)),
        inset 0 0 45px var(--theme-border-glow, rgba(255, 15, 40, 0.08)),
        0 30px 80px rgba(0, 0, 0, 0.95) !important;
    max-width: 1140px;
    width: min(92%, 1140px);
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

/* Landing Page Top Bar: Flags (Left), Countdown Clock (Center), Info (Right) */
.landing-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 22px;
    position: relative;
    z-index: 100;
    gap: 16px;
}

.landing-flags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.landing-flag-img {
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 3px;
    display: block;
}

.landing-flag-img:hover {
    transform: scale(1.2);
}

.landing-countdown {
    margin: 0 auto;
    flex-shrink: 0;
}

.landing-info-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    flex-shrink: 0;
}

.landing-info-btn span {
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
}

.landing-info-btn .info-icon {
    position: static;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.landing-info-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

@media (max-width: 860px) {
    .landing-top-bar {
        flex-direction: column;
        gap: 12px;
    }
    .landing-countdown {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}

.landing-title {
    font-family: 'Titillium Web', sans-serif;
    font-size: 5.8rem !important;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin: 0;
    line-height: 0.95;
    color: white;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 24, 53, 0.6) !important;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15em;
}

.landing-subtitle {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 1.22rem !important;
    color: #e2e8f0 !important;
    font-weight: 800 !important;
    margin-top: 18px !important;
    text-transform: uppercase !important;
    letter-spacing: 5px !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

.cta-container {
    margin-top: 42px !important;
    display: flex;
    gap: 16px !important;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 15px 32px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7) !important;
}

@media (max-width: 900px) {
    .landing-content.cyber-panel {
        padding: 24px 20px 28px !important;
        width: 95% !important;
    }
    .landing-title {
        font-size: 3.6rem !important;
    }
    .landing-subtitle {
        font-size: 0.95rem !important;
        letter-spacing: 2px !important;
    }
    .cta-container {
        gap: 10px !important;
        margin-top: 24px !important;
    }
    .cta-btn {
        padding: 12px 20px !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 500px) {
    .landing-title {
        font-size: 2.8rem !important;
    }
    .cta-btn {
        width: 100%;
    }
}

/* Primary CTA (Join the Grid / Sign Up) */
#join-grid-btn.cta-btn,
.cta-btn:not(.secondary):not(.mini-tt-btn):not(#create-league-btn) {
    background: linear-gradient(180deg, var(--theme-btn-accent, #ff1835) 0%, rgba(16, 20, 28, 0.95) 100%) !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.6)) !important;
    color: var(--theme-btn-text, #ffffff) !important;
    box-shadow: 0 0 20px var(--theme-btn-glow, rgba(255, 24, 53, 0.45)), inset 0 0 12px rgba(255, 255, 255, 0.2) !important;
}

#join-grid-btn.cta-btn:hover,
.cta-btn:not(.secondary):not(.mini-tt-btn):not(#create-league-btn):hover {
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, #ff1835 0%, #b80015 100%)) !important;
    border-color: var(--theme-btn-hover-border, #ffffff) !important;
    box-shadow: 0 0 30px var(--theme-btn-glow, rgba(255, 24, 53, 0.75)), inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-3px) !important;
    color: #ffffff !important;
}

/* Paddock Login CTA */
.cta-btn.secondary {
    background: linear-gradient(180deg, rgba(24, 28, 38, 0.94) 0%, rgba(12, 14, 20, 0.98) 100%) !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.6)) !important;
    border-left: 4px solid var(--theme-btn-accent, #ff1835) !important;
    color: var(--theme-btn-text, #ffffff) !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.2)) !important;
}

.cta-btn.secondary:hover {
    background: var(--theme-btn-hover-bg, rgba(255, 24, 53, 0.15)) !important;
    border-color: var(--theme-btn-hover-border, #ff1835) !important;
    color: #ffffff !important;
    box-shadow: 0 0 24px var(--theme-btn-glow, rgba(255, 24, 53, 0.5)) !important;
    transform: translateY(-3px) !important;
}

/* Create League CTA */
#create-league-btn.cta-btn {
    background: linear-gradient(180deg, rgba(24, 28, 38, 0.94) 0%, rgba(12, 14, 20, 0.98) 100%) !important;
    border: 1px solid var(--theme-btn-border, rgba(168, 85, 247, 0.6)) !important;
    border-left: 4px solid var(--theme-btn-accent, #a855f7) !important;
    color: var(--theme-btn-text, #ffffff) !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(168, 85, 247, 0.25)) !important;
}

#create-league-btn.cta-btn:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, rgba(168, 85, 247, 0.4) 0%, rgba(126, 34, 206, 0.6) 100%)) !important;
    border-color: var(--theme-btn-hover-border, #c084fc) !important;
    color: #ffffff !important;
    box-shadow: 0 0 25px var(--theme-btn-glow, rgba(192, 132, 252, 0.6)) !important;
    transform: translateY(-3px) !important;
}

/* Mini Time Trial CTA */
.cta-btn.mini-tt-btn {
    background: linear-gradient(180deg, rgba(28, 32, 42, 0.9) 0%, rgba(14, 16, 22, 0.96) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.cta-btn.mini-tt-btn:hover {
    border-color: #ffffff !important;
    background: linear-gradient(180deg, rgba(40, 46, 60, 0.95) 0%, rgba(20, 24, 32, 0.98) 100%) !important;
    transform: translateY(-3px) !important;
}

/* Team panel sign up badge in header actions */
.team-signup-badge {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    color: #00d2ff !important;
    background: rgba(0, 210, 255, 0.08) !important;
    border: 1px solid rgba(0, 210, 255, 0.4) !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.6) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.team-signup-badge:hover {
    background: rgba(0, 210, 255, 0.25) !important;
    border-color: #00d2ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.6) !important;
    transform: translateY(-1px) !important;
}

/* MARQUEES */
.marquee-row {
    position: absolute;
    width: 250%;
    left: -25%;
    height: 160px;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

.marquee-row-1 {
    top: 15%;
    transform: rotate(-3deg);
}

.marquee-row-2 {
    top: 50%;
    opacity: 0.8 !important;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 0;
}

.marquee-row-3 {
    bottom: 15%;
    transform: rotate(3deg);
}

.marquee-track {
    display: flex;
    flex-shrink: 0;
    gap: 70px;
    animation: marquee-scroll 45s linear infinite;
    padding-left: 70px;
    white-space: nowrap;
    will-change: transform;
}

.marquee-item {
    flex-shrink: 0;
}

.marquee-row-2 .marquee-track {
    animation-direction: reverse;
    animation-duration: 80s;
}

.marquee-row-3 .marquee-track {
    animation-duration: 38s;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Marquees Cyber-HUD Upgrades */
.marquee-driver-capsule {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.25s ease;
}

.marquee-driver-capsule:hover {
    transform: scale(1.15);
}

.marquee-driver-capsule .driver-avatar {
    width: 86px !important;
    height: 86px !important;
    border-radius: 50% !important;
    border: 2px solid #00d2ff !important;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.65), inset 0 0 12px rgba(0, 210, 255, 0.3) !important;
    background-color: rgba(10, 14, 22, 0.8) !important;
}

.marquee-name-pill {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    background: rgba(10, 14, 22, 0.9) !important;
    border: 1px solid rgba(0, 210, 255, 0.45) !important;
    border-radius: 12px !important;
    padding: 3px 12px !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.7) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8) !important;
}

.marquee-car-capsule {
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.92) 0%, rgba(10, 12, 18, 0.98) 100%) !important;
    border: 1.5px solid var(--theme-border-rgba, rgba(255, 24, 53, 0.7)) !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 20px var(--theme-border-glow, rgba(255, 24, 53, 0.4)) !important;
    transition: transform 0.25s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.marquee-car-capsule:hover {
    transform: scale(1.08) translateY(-4px);
    border-color: var(--theme-btn-hover-border, #ff1835) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 28px var(--theme-btn-glow, rgba(255, 24, 53, 0.7)) !important;
}

.marquee-logo-capsule {
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.85) 0%, rgba(10, 12, 18, 0.95) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 6px 14px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
}

/* ==========================================================================
   CYBER-F1 HUD AUTH PAGES (login.html & signup.html)
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #151822 0%, #06070a 100%) !important;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.form-container.cyber-panel {
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.96) 0%, rgba(8, 10, 15, 0.98) 100%) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.65)) !important;
    padding: 44px 40px 48px !important;
    border-radius: 18px !important;
    width: 100%;
    max-width: 460px;
    box-shadow: 
        0 0 45px var(--theme-border-glow, rgba(230, 20, 40, 0.25)),
        inset 0 0 40px var(--theme-border-glow, rgba(255, 15, 40, 0.08)),
        0 30px 70px rgba(0, 0, 0, 0.95) !important;
    position: relative;
    overflow: visible;
}

.form-header h2 {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 1.05rem !important;
    letter-spacing: 4px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: #e2e8f0 !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3) !important;
    margin-top: 5px !important;
}

.form-group label {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #ff3344 !important;
    text-shadow: 0 0 8px rgba(255, 51, 68, 0.4) !important;
    margin-bottom: 8px !important;
}

.form-group input {
    width: 100%;
    background: rgba(12, 16, 24, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    padding: 14px 18px !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: 'Titillium Web', sans-serif !important;
    font-size: 1rem !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.25s ease !important;
}

.form-group input:focus {
    border-color: var(--theme-btn-accent, #ff1835) !important;
    background: rgba(22, 26, 36, 0.98) !important;
    box-shadow: 0 0 16px var(--theme-btn-glow, rgba(255, 24, 53, 0.45)), inset 0 0 8px rgba(0, 0, 0, 0.5) !important;
}

.form-container .action-btn {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 14px !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, var(--theme-btn-accent, #ff1835) 0%, rgba(16, 20, 28, 0.95) 100%) !important;
    border: 1px solid var(--theme-btn-border, rgba(255, 24, 53, 0.6)) !important;
    color: var(--theme-btn-text, #ffffff) !important;
    box-shadow: 0 0 20px var(--theme-btn-glow, rgba(255, 24, 53, 0.45)) !important;
    width: 100% !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

.form-container .action-btn::after {
    display: none !important;
}

.form-container .action-btn:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(180deg, #ff1835 0%, #b80015 100%)) !important;
    border-color: var(--theme-btn-hover-border, #ffffff) !important;
    box-shadow: 0 0 28px var(--theme-btn-glow, rgba(255, 24, 53, 0.75)) !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

.form-footer {
    margin-top: 24px !important;
    text-align: center !important;
    font-family: 'Titillium Web', sans-serif !important;
    font-size: 0.92rem !important;
    color: #94a3b8 !important;
}

.form-footer a {
    color: #00d2ff !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.5) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    transition: color 0.2s, text-shadow 0.2s !important;
}

.form-footer a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.9) !important;
    text-decoration: underline !important;
}

/* DASHBOARD: RACE RESULTS SECTION */
.results-breakdown-panel {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

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

.race-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Titillium Web', sans-serif;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

.race-selector option {
    background: #15151E;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.2s;
}

.breakdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.breakdown-rank {
    font-weight: 900;
    color: var(--primary-color);
    width: 30px;
    font-style: italic;
}

.breakdown-name {
    flex: 1;
    font-weight: 700;
    font-size: 1.1rem;
}

.breakdown-pts {
    font-weight: 800;
    color: var(--success-color);
    font-size: 1.2rem;
}

/* MY TEAM BUTTON & NAV LINKS */
.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: white;
    color: black !important;
    transform: translateY(-2px);
}

.nav-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.nav-btn.primary:hover {
    background: #ff0700;
    color: white !important;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
}

/* FORM STYLES */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box;
    /* Ensures alignment */
}

.form-group input:focus {
    border-color: var(--primary-color);
    background: rgba(225, 6, 0, 0.05);
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.1);
}

.form-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a00000 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    font-family: 'Titillium Web', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
    letter-spacing: 2px;
    box-shadow: 0 10px 20px rgba(225, 6, 0, 0.3);
}

.form-submit-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(225, 6, 0, 0.5);
    filter: brightness(1.1);
}

/* CHART TOOLTIP (CYBER HUD TELEMETRY TOOLTIP) */
#chart-tooltip {
    position: fixed;
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.97) 0%, rgba(8, 10, 15, 0.99) 100%) !important;
    border: 1px solid rgba(0, 210, 255, 0.65) !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    pointer-events: none;
    z-index: 999999 !important;
    font-family: 'Titillium Web', sans-serif;
    box-shadow: 
        0 0 25px rgba(0, 210, 255, 0.25),
        0 15px 35px rgba(0, 0, 0, 0.85),
        inset 0 0 15px rgba(0, 210, 255, 0.08) !important;
    display: none;
    min-width: 160px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#chart-tooltip .tooltip-player {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    font-size: 0.88rem !important;
    margin-bottom: 6px !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding-bottom: 6px !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4) !important;
}

#chart-tooltip .tooltip-race {
    font-family: 'Orbitron', monospace !important;
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
    letter-spacing: 0.8px !important;
}

#chart-tooltip .tooltip-pts {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-family: 'Orbitron', monospace !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    color: #cbd5e1 !important;
}

#chart-tooltip .tooltip-pts .val {
    color: #00ff88 !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5) !important;
}

/* CHART FULLSCREEN MODAL (CYBER HUD OVERHAUL) */
.chart-fullscreen-modal {
    max-width: 980px !important;
    width: 95% !important;
    padding: 30px 28px 32px !important;
}

.chart-fullscreen-modal #modal-content-body {
    position: relative;
    z-index: 10;
}

.chart-fullscreen-modal #modal-content-body > div {
    padding: 0 !important;
}

/* Modal Title Header Bar */
.chart-fullscreen-modal #modal-content-body > div > div:first-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding-right: 42px !important; /* ensure title doesn't collide with close button */
}

.chart-fullscreen-modal #modal-content-body h3 {
    font-family: 'Orbitron', 'Titillium Web', sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4), 0 0 22px rgba(255, 24, 53, 0.8) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
}

.chart-fullscreen-modal #modal-content-body h3::before {
    content: '///';
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    color: #ff1835;
    letter-spacing: -2px;
    font-size: 1.05rem;
    text-shadow: 0 0 10px rgba(255, 24, 53, 0.9);
}

.chart-fullscreen-modal #modal-content-body h3::after {
    content: '\\\\\\';
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    color: #ff1835;
    letter-spacing: -2px;
    font-size: 1.05rem;
    text-shadow: 0 0 10px rgba(255, 24, 53, 0.9);
}

/* Double click to close pill */
.chart-fullscreen-modal #modal-content-body span {
    font-family: 'Orbitron', monospace !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    white-space: nowrap !important;
}

/* Telemetry Canvas */
#historyChartModal {
    background: linear-gradient(180deg, rgba(8, 12, 18, 0.96) 0%, rgba(5, 7, 11, 0.99) 100%) !important;
    border: 1px solid rgba(0, 210, 255, 0.28) !important;
    border-radius: 12px !important;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(0, 210, 255, 0.04),
        0 0 15px rgba(0, 210, 255, 0.1) !important;
    cursor: crosshair !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

/* Legend Container */
.chart-fullscreen-modal #modal-content-body > div > div:last-child {
    margin-top: 18px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    max-height: 120px !important;
    overflow-y: auto !important;
    padding: 4px 6px !important;
}

/* Custom scrollbar for legend */
.chart-fullscreen-modal #modal-content-body > div > div:last-child::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.chart-fullscreen-modal #modal-content-body > div > div:last-child::-webkit-scrollbar-thumb {
    background: rgba(255, 24, 53, 0.45);
    border-radius: 3px;
}

/* Individual Legend Chips */
.chart-fullscreen-modal #modal-content-body > div > div:last-child > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-family: 'Titillium Web', 'Orbitron', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    color: #e2e8f0 !important;
    background: linear-gradient(180deg, rgba(20, 26, 38, 0.85) 0%, rgba(10, 14, 20, 0.94) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 6px 13px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.02) !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    cursor: default !important;
    user-select: none !important;
}

.chart-fullscreen-modal #modal-content-body > div > div:last-child > div:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(255, 24, 53, 0.6) !important;
    background: linear-gradient(180deg, rgba(30, 38, 54, 0.95) 0%, rgba(14, 20, 30, 0.98) 100%) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 12px rgba(255, 24, 53, 0.35) !important;
}

.chart-fullscreen-modal #modal-content-body > div > div:last-child > div > div {
    width: 10px !important;
    height: 10px !important;
    border-radius: 3px !important;
    box-shadow: 0 0 8px currentColor, 0 0 2px #fff !important;
    flex-shrink: 0 !important;
}

#historyChart {
    cursor: crosshair;
}

.form-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: #ff5555;
    text-decoration: underline;
}

/* INFO ICONS & ACCORDIONS (ELEVATED STACKING CONTEXT) */
.title-wrap,
.cyber-panel .title-wrap,
.predictions-card .title-wrap,
.countdown-container,
.selection-sidebar .title-wrap {
    position: relative !important;
    z-index: 1000 !important;
}

.title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.title-wrap .section-title {
    margin-bottom: 0;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 210, 255, 0.05);
    /* Blue tinge */
    color: var(--accent-color);
    /* Blue tinge */
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 210, 255, 0.3);
    /* Blue tinge */
    user-select: none;
}

.info-icon:hover,
.info-icon.active {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-color);
}

/* HOW TO BUTTON */
/* Removed as it now uses standard nav-btn style */

/* PASSWORD VISIBILITY TOGGLE */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
    outline: none;
    z-index: 2;
}

.password-toggle:hover {
    color: #ccc;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* TROPHY ICON */
.trophy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.05);
    color: #ffd700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 215, 0, 0.3);
    user-select: none;
}

.trophy-icon:hover {
    background: #ffd700;
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 15px #ffd700;
}

/* REPLAY STATS MODAL LAYOUT */
.replay-stats-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #1e1e24;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    overflow-y: auto;
}

.replay-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .replay-stats-grid {
        grid-template-columns: 1fr;
    }
}

.replay-stats-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.replay-stats-title {
    color: #aaa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.replay-stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

.replay-stats-list::-webkit-scrollbar {
    width: 4px;
}

.replay-stats-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.replay-stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.replay-stats-item.top-rank {
    border-left-color: #ffd700;
    background: rgba(255, 215, 0, 0.03);
}

.replay-stats-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.stats-circ-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.stats-winner-name {
    color: #ffd700;
    font-weight: 600;
    font-size: 0.85rem;
}

.stats-best-time {
    font-family: monospace;
    font-size: 0.9rem;
    color: #ccc;
    font-weight: bold;
}

.action-btn.tyre-btn:hover {
    border-color: #00d2ff !important;
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.25) 0%, rgba(12, 18, 30, 0.98) 100%) !important;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.6) !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   CYBER ALERT / MODAL SYSTEM
   ========================================================================== */
.cyber-alert-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(6, 8, 14, 0.88) 0%, rgba(2, 3, 6, 0.96) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    box-sizing: border-box;
}

.cyber-alert-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.cyber-alert-card {
    background: linear-gradient(180deg, rgba(16, 20, 28, 0.98) 0%, rgba(8, 10, 15, 0.99) 100%) !important;
    border: 1px solid var(--theme-border-rgba, rgba(255, 30, 50, 0.75)) !important;
    border-radius: 16px !important;
    padding: 34px 32px 30px !important;
    max-width: 490px;
    width: 92%;
    position: relative !important;
    box-shadow: 
        0 0 55px var(--theme-border-glow, rgba(255, 24, 53, 0.35)),
        inset 0 0 40px var(--theme-border-glow, rgba(255, 24, 53, 0.08)),
        0 30px 80px rgba(0, 0, 0, 0.95) !important;
    text-align: center;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
    font-family: 'Titillium Web', sans-serif;
    color: #ffffff;
}

.cyber-alert-overlay.show .cyber-alert-card {
    transform: scale(1) translateY(0);
}

.cyber-alert-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(255, 24, 53, 0.22) 0%, transparent 60%),
        radial-gradient(#1f2633 1px, transparent 1px);
    background-size: 100% 100%, 14px 14px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.cyber-alert-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #ff1835 25%, #ffffff 50%, #ff1835 75%, transparent 100%);
    box-shadow: 0 0 16px 2px #ff1835;
    pointer-events: none;
    z-index: 2;
}

.cyber-alert-card > * {
    position: relative;
    z-index: 5;
}

.cyber-alert-notch {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 10;
}
.cyber-alert-notch.top-left {
    top: 0; left: 0;
    border-top: 2px solid #ff1835;
    border-left: 2px solid #ff1835;
    border-top-left-radius: 6px;
}
.cyber-alert-notch.top-right {
    top: 0; right: 0;
    border-top: 2px solid #ff1835;
    border-right: 2px solid #ff1835;
    border-top-right-radius: 6px;
}
.cyber-alert-notch.bottom-left {
    bottom: 0; left: 0;
    border-bottom: 2px solid #ff1835;
    border-left: 2px solid #ff1835;
    border-bottom-left-radius: 6px;
}
.cyber-alert-notch.bottom-right {
    bottom: 0; right: 0;
    border-bottom: 2px solid #ff1835;
    border-right: 2px solid #ff1835;
    border-bottom-right-radius: 6px;
}

.cyber-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 24, 53, 0.14);
    border: 1px solid rgba(255, 24, 53, 0.5);
    box-shadow: 0 0 16px rgba(255, 24, 53, 0.28);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ff3b56;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.cyber-alert-badge .badge-icon {
    font-size: 0.95rem;
    animation: cyber-alert-pulse 1.6s ease-in-out infinite;
}

@keyframes cyber-alert-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #ff1835); }
    50% { transform: scale(1.2); filter: drop-shadow(0 0 8px #ff1835); }
}

.cyber-alert-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(255, 24, 53, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cyber-alert-vents {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 20px;
}

.cyber-alert-vents .hash-mini {
    color: #ff1835;
    font-weight: 900;
    text-shadow: 0 0 6px rgba(255, 24, 53, 0.5);
}

.cyber-alert-cat {
    color: #00d2ff;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.45);
}

.cyber-alert-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.cyber-alert-icon-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.cyber-alert-radial-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 24, 53, 0.35) 0%, transparent 70%);
    animation: cyber-radial-breathe 2.2s ease-in-out infinite;
}

@keyframes cyber-radial-breathe {
    0%, 100% { transform: scale(0.92); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.cyber-alert-icon {
    position: relative;
    font-size: 2.6rem;
    z-index: 2;
    filter: drop-shadow(0 0 14px rgba(255, 24, 53, 0.65));
}

.cyber-alert-message {
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.12rem;
    color: #f1f5f9;
    line-height: 1.5;
    margin: 0 0 16px 0;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.cyber-alert-telemetry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 11px 16px;
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    box-sizing: border-box;
}

.cyber-alert-telemetry .telemetry-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-family: 'Orbitron', sans-serif;
}

.cyber-alert-telemetry .telemetry-label {
    color: #718096;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.cyber-alert-telemetry .telemetry-val {
    color: #f6ad55;
    font-weight: 800;
}

.cyber-alert-telemetry .telemetry-val.status-locked {
    color: #ff3b56;
    text-shadow: 0 0 8px rgba(255, 24, 53, 0.6);
}

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

.cyber-alert-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 1.4px;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.cyber-alert-btn.primary {
    background: var(--theme-btn-hover-bg, linear-gradient(135deg, #ff1835 0%, #b80d24 100%));
    color: var(--theme-btn-text, #ffffff);
    border: 1px solid var(--theme-btn-border, #ff4760);
    box-shadow: 0 0 28px var(--theme-btn-glow, rgba(255, 24, 53, 0.45)), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cyber-alert-btn.primary:hover {
    background: var(--theme-btn-hover-bg, linear-gradient(135deg, #ff2e49 0%, #d1102b 100%));
    border-color: var(--theme-btn-hover-border, #ffffff);
    box-shadow: 0 0 38px var(--theme-btn-glow, rgba(255, 24, 53, 0.75)), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.cyber-alert-btn.secondary {
    background: rgba(16, 22, 32, 0.85);
    color: #cbd5e0;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.cyber-alert-btn.secondary:hover {
    background: rgba(26, 34, 48, 0.95);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.38);
    transform: translateY(-1px);
}
/* Dashboard reflow: retain every control and every standings column. */
.dashboard-page .standings-scroll-hint {
    display: none;
}

@media (max-width: 1279px) {
    body.dashboard-page {
        overflow-x: visible;
    }

    .dashboard-page > header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px !important;
    }

    .dashboard-page > header > * {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .dashboard-page > header .logo-container,
    .dashboard-page > header .f1-logo-text,
    .dashboard-page > header .league-controls {
        flex-wrap: wrap;
    }

    .dashboard-page > header .countdown-container {
        flex: 1 1 20rem;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px !important;
    }

    .dashboard-page > header .countdown-next-race,
    .dashboard-page > header .countdown-clock {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .dashboard-page > header .countdown-clock {
        flex-wrap: wrap;
        gap: 8px;
    }

    .dashboard-page > header .nav-btn {
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
        overflow-wrap: anywhere;
        margin-right: 0 !important;
    }

    .dashboard-page .dashboard-main-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 16px;
    }

    .dashboard-page .dashboard-main-grid > * {
        min-width: 0;
    }

    .dashboard-page .dashboard-main-grid .title-wrap {
        flex-wrap: wrap;
        min-width: 0;
    }

    .dashboard-page .dashboard-main-grid .section-title {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .dashboard-page .dashboard-main-grid .title-wrap .header-actions {
        position: static;
        transform: none;
        flex-shrink: 0;
    }

    .dashboard-page .standings-scroll-hint {
        display: block;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .dashboard-page .standings-scroll-region {
        overflow-x: auto;
        overflow-y: auto;
    }

    .dashboard-page .standings-scroll-region:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 3px;
    }

    .dashboard-page .leaderboard-table {
        table-layout: auto;
        min-width: 32rem;
    }

    .dashboard-page .leaderboard-table th:nth-child(2),
    .dashboard-page .leaderboard-table td:nth-child(2) {
        min-width: 10ch;
        white-space: normal;
        overflow-wrap: anywhere;
        overflow: visible;
        text-overflow: initial;
    }
}

/* ==========================================================================
   OFFROAD RESPONSIVE 2026-11-12: phone / tablet layout (additive only).
   Every rule below sits inside a max-width or coarse-pointer media query,
   so desktop layouts at 1280px and wider are unchanged.
   ========================================================================== */
@media (max-width: 1100px) {
    body:not(.dashboard-page) > header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 14px;
        padding: 10px 14px !important;
    }
    body:not(.dashboard-page) > header > * {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    body:not(.dashboard-page) > header .countdown-container {
        flex: 1 1 18rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 14px;
        padding: 8px 12px !important;
    }
    body:not(.dashboard-page) > header .countdown-next-race {
        text-align: center;
        overflow-wrap: anywhere;
    }
    body:not(.dashboard-page) > header .league-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    body:not(.dashboard-page) > header .league-controls .nav-btn {
        margin-right: 0 !important;
    }
}

@media (max-width: 1023px) {
    .main-layout,
    .predictions-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 16px;
    }
    .main-layout > *,
    .predictions-layout > * {
        min-width: 0;
    }
    .sidebar-col,
    .selection-sidebar {
        position: static;
        top: auto;
    }
}

@media (max-width: 600px) {
    body > header .f1-logo-text {
        font-size: 1.45rem;
    }
    body > header .countdown-next-race {
        font-size: 0.95rem !important;
    }
    body > header .countdown-clock {
        font-size: 1.45rem !important;
        gap: 10px;
    }
    .league-controls .nav-btn,
    .nav-btn,
    .predict-btn {
        min-height: 44px;
        box-sizing: border-box;
    }
    .predict-btn {
        white-space: normal !important;
        max-width: 100%;
    }
    .auth-page #invalid-token-message {
        padding: 16px 0 !important;
    }
    .auth-page .form-container {
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
    }
}

@media (pointer: coarse) {
    button, .nav-btn, .cta-btn, .start-btn, .tab-btn, select, input[type="submit"] {
        touch-action: manipulation;
    }
}

@media (max-width: 700px) {
    .drivers-panel .pool-grid,
    .constructors-panel .pool-grid,
    .pool-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 8px;
    }
    .drivers-panel.cyber-panel,
    .constructors-panel.cyber-panel {
        padding: 18px 12px 20px !important;
    }
}

@media (max-width: 1023px) {
    /* Auth pages: let tall forms scroll on phones (body overflow was hidden). */
    body.auth-page {
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 16px 12px;
    }
    /* Landing page: grow with its content instead of clipping at 100vh. */
    .landing-container {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-x: clip;
        overflow-y: visible;
        padding: 16px 0;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {
    .landing-countdown {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        box-sizing: border-box;
        gap: 8px 14px;
    }
}

@media (max-width: 1100px) and (max-height: 500px) {
    /* Landscape phones: don't pin the wrapped header over a short screen. */
    body > header {
        position: static;
    }
}
