/* =====================================================
   TEJDEKH
   Premium dark F1-inspired UI
===================================================== */

:root {
    --red: #e10600;
    --red-bright: #ff211b;
    --green: #19c37d;
    --black: #030303;
    --dark: #080808;
    --card: #0d0d0d;
    --border: #202020;
    --text: #f5f5f5;
    --muted: #858585;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.28);
    --shadow-strong: 0 28px 90px rgba(0, 0, 0, 0.52);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
}

body {
    width: 100%;
    max-width: 100%;
    background: var(--black);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

img,
iframe,
video,
svg,
canvas,
object,
a,
button,
select,
input,
textarea {
    max-width: 100%;
}

#app,
main,
section,
header,
footer,
nav,
div,
span,
p,
h1,
h2,
h3,
label,
select,
button {
    max-width: 100%;
    min-width: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(120deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.025) 40.2%, transparent 40.5%),
        radial-gradient(circle at 75% 30%, rgba(225, 6, 0, 0.08), transparent 35%);
}

a {
    color: inherit;
}

button,
select {
    font: inherit;
}

.hidden {
    display: none !important;
}

.notifications-section {
    width: min(1180px, 92%);
    margin: 0 auto 90px;
}

.replay-library-section {
    width: min(1180px, 92%);
    margin: 0 auto 100px;
}

.replay-library {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.replay-card {
    overflow: hidden;
    border: 1px solid rgba(138,153,173,.2);
    border-radius: 4px;
    background: #0b0e14;
    box-shadow: 0 14px 35px rgba(0,0,0,.25);
    transition: transform .2s ease, border-color .2s ease;
}
.replay-card:hover { transform: translateY(-3px); border-color: #00f0ff; }

.replay-card-art {
    display: grid;
    aspect-ratio: 16 / 9;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,240,255,.16), rgba(225,6,0,.16), #090909);
}

.replay-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.replay-card-placeholder {
    color: #fff;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -2px;
}

.replay-card-placeholder span { color: var(--red); }

.replay-card-copy {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.replay-card-kicker {
    color: #00f0ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.replay-card h3 {
    font-size: 20px;
    line-height: 1.1;
}

.replay-card p {
    min-height: 40px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.replay-watch-button {
    justify-self: start;
    margin-top: 4px;
    text-decoration: none;
}

.replay-empty {
    display: grid;
    gap: 8px;
    padding: 30px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
}

.replay-empty span { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
    .replay-library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .replay-library { grid-template-columns: 1fr; }
}

.notification-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px 30px;
    align-items: center;
    padding: 28px;
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.12), rgba(255, 255, 255, 0.035));
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
}

.notification-copy p {
    color: var(--muted);
    line-height: 1.65;
}

.notification-copy .notification-status {
    margin-top: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.notification-preferences {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 20px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.notification-preferences label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.notification-preferences input {
    accent-color: var(--red);
}

.notification-preferences .btn {
    justify-self: start;
}

@media (max-width: 680px) {
    .notification-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .notification-preferences {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   LOADER
===================================================== */

#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(circle at 50% 35%, rgba(225, 6, 0, 0.1), transparent 30%),
        linear-gradient(180deg, #050505, #020202);
    opacity: 1;
    transition: opacity 0.45s ease;
}

.loader-content {
    width: min(520px, 92%);
}

.loader-brand {
    font-size: clamp(50px, 10vw, 95px);
    font-weight: 950;
    letter-spacing: -6px;
}

.loader-brand span {
    color: var(--red);
}

.starting-lights {
    display: flex;
    justify-content: center;
    gap: 13px;
    margin: 35px 0 18px;
}

.light {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #121212;
    border: 1px solid #2f2f2f;
    transform: translateY(0);
    opacity: 0.6;
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease,
        transform 0.25s ease,
        border-color 0.25s ease;
}

.light.is-on {
    background: var(--red);
    border-color: rgba(225, 6, 0, 0.6);
    opacity: 1;
    animation: trafficPulse 0.9s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(225, 6, 0, 0.8), 0 0 30px rgba(225, 6, 0, 0.35);
}

@keyframes trafficPulse {
    0% {
        transform: translateY(0) scale(0.96);
    }
    50% {
        transform: translateY(-2px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(0.96);
    }
}

#loader.lights-out .light {
    animation: greenPulse 0.7s ease-in-out infinite alternate;
    background: var(--green);
    box-shadow: 0 0 12px rgba(25, 195, 125, 0.9), 0 0 28px rgba(25, 195, 125, 0.35);
}

.loader-count {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

#loader.lights-out .loader-count {
    color: var(--green);
}

#loader.lights-out .loader-line span {
    background: var(--green);
}

@keyframes greenPulse {
    from {
        transform: translateY(0) scale(0.95);
        opacity: 0.85;
    }
    to {
        transform: translateY(-2px) scale(1.04);
        opacity: 1;
    }
}

#loader-text {
    color: #777;
    font-size: 10px;
    letter-spacing: 3px;
    font-weight: 700;
}

.loader-line {
    height: 2px;
    width: 230px;
    background: #151515;
    margin: 20px auto 0;
    overflow: hidden;
}

.loader-line span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--red);
    animation: loadingLine 2s ease forwards;
}

@keyframes loadingLine {
    to { width: 100%; }
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    border-bottom: 1px solid #151515;
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.logo {
    text-decoration: none;
    font-size: 23px;
    font-weight: 950;
    letter-spacing: -1px;
}

.logo span {
    color: var(--red);
}

#desktop-nav {
    display: flex;
    gap: 32px;
}

#desktop-nav a {
    text-decoration: none;
    color: #858585;
    font-size: 13px;
    transition: color 0.2s ease;
}

#desktop-nav a:hover {
    color: #fff;
}

.menu-button {
    display: none;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 23px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(5, 5, 5, 0.97);
    border-bottom: 1px solid #222;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 18px 7%;
    text-decoration: none;
    border-bottom: 1px solid #151515;
}

/* =====================================================
   HERO
===================================================== */

.hero {
    min-height: 680px;
    padding: 90px 7%;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    align-items: center;
    gap: 80px;
    position: relative;
    overflow: hidden;
}

.hero-background-line {
    position: absolute;
    width: 900px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    transform: rotate(-18deg) translateX(30%);
    opacity: 0.25;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--red);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 3px;
}

.red-dot {
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--red);
}

.hero h1 {
    font-size: clamp(58px, 9vw, 125px);
    line-height: 0.86;
    letter-spacing: -8px;
    margin: 24px 0;
    font-weight: 950;
}

.hero h1 span {
    color: var(--red);
}

.hero-description {
    max-width: 550px;
    color: #8b8b8b;
    font-size: 17px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 9px;
    border: 1px solid #292929;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}

.btn-primary:hover {
    background: var(--red-bright);
}

.btn-secondary {
    background: #101010;
    color: #fff;
}

.btn-secondary:hover {
    border-color: #444;
}

/* =====================================================
   RACE CARD
===================================================== */

.race-card {
    position: relative;
    z-index: 2;
    isolation: isolate;
    padding: 32px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01) 42%),
        linear-gradient(145deg, #111, #070707);
    box-shadow: var(--shadow-strong);
}

.race-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-indicator {
    font-size: 10px;
    color: #aaa;
    letter-spacing: 2px;
}

.live-indicator i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
}

.race-status {
    color: #555;
    font-size: 9px;
    letter-spacing: 1px;
}

.race-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-top: 34px;
    border: 1px solid rgba(255,30,30,0.25);
    border-radius: 12px;
    background: rgba(255,30,30,0.08);
    font-size: 25px;
}

.race-card h2 {
    margin-top: 7px;
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.race-location {
    margin-top: 18px;
    color: var(--red-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.race-card p {
    color: #c4c4c8;
    margin-top: 5px;
    font-size: 13px;
}

.weekend-timetable {
    margin-top: 20px;
    padding: 12px 13px 5px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    background: rgba(0,0,0,0.24);
}

.timetable-loading {
    padding: 12px 0 8px;
    color: #85858b;
    font-size: 11px;
    line-height: 1.5;
}

.timetable-heading,
.timetable-day,
.day-sessions > div {
    display: grid;
    align-items: center;
}

.timetable-heading {
    grid-template-columns: 42px minmax(0, 1fr) 94px 58px;
    padding: 0 0 8px;
    color: #69696f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.timetable-heading span:first-child {
    grid-column: 1 / 3;
}

.timetable-heading span:not(:first-child) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.timetable-day {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0 5px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.timetable-day > strong {
    color: #77777d;
    font-size: 10px;
    letter-spacing: 1px;
    align-self: start;
    padding-top: 2px;
}

.day-sessions {
    display: grid;
    gap: 0;
    min-width: 0;
}

.day-sessions > div {
    grid-template-columns: minmax(0, 1fr) 94px 58px;
    min-height: 28px;
    min-width: 0;
    color: #bdbdc2;
    font-size: 12px;
}

.day-sessions > div + div {
    border-top: 1px solid rgba(255,255,255,0.045);
}

.day-sessions span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timetable-day b {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.day-sessions b:last-child {
    margin-left: 8px;
    color: #d6d6da;
}

.day-sessions b:first-of-type {
    color: #bdbdc2;
}

.session-results {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 0 0 7px;
    color: #8f8f96;
    font-size: 10px;
}

.session-results small {
    color: var(--red-bright);
    font-weight: 800;
    letter-spacing: 0.8px;
}

.session-results span {
    color: #c7c7cc;
    white-space: nowrap;
}

.day-sessions .highlight-session span,
.day-sessions .highlight-session b {
    color: var(--red-bright);
    font-weight: 800;
}

.next-session-box {
    margin-top: 18px;
    padding: 17px;
    border: 1px solid rgba(255, 30, 30, 0.42);
    border-radius: 11px;
    background:
        linear-gradient(135deg, rgba(255,30,30,0.14), rgba(255,255,255,0.025) 60%),
        #0b0b0b;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.next-session-box-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--red-bright);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.next-session-live {
    color: #a1a1aa;
}

.next-session-box h3 {
    margin-top: 12px;
    color: #fff;
    font-size: 20px;
    text-transform: uppercase;
}

.next-session-box p {
    margin-top: 5px;
    color: #c4c4c8;
    font-size: 11px;
}

.next-session-box .countdown {
    margin-top: 18px;
    font-size: clamp(25px, 3vw, 34px);
}

.countdown {
    margin-top: 30px;
    font-family: monospace;
    font-size: clamp(27px, 4vw, 40px);
    font-weight: 800;
}

.countdown-labels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    color: #444;
    font-size: 8px;
    letter-spacing: 1px;
    margin-top: 8px;
}

/* =====================================================
   STATS
===================================================== */

.stats-section {
    padding: 0 7% 100px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 23px;
    border-radius: 17px;
    border: 1px solid var(--border);
    background: #0b0b0b;
}

.stat-card-action {
    position: relative;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.stat-card-action:hover,
.stat-card-action:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(225, 6, 0, 0.55);
    background: #131313;
}

.stat-card-action:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.stat-card-action .stat-card-arrow {
    margin-left: auto;
    color: var(--red);
    font-size: 20px;
    line-height: 1;
    margin-top: 0;
}

.stat-icon {
    font-size: 25px;
}

.stat-card strong {
    display: block;
    font-size: 12px;
}

.stat-card span {
    display: block;
    color: #5c5c5c;
    font-size: 11px;
    margin-top: 4px;
}

/* =====================================================
   SECTIONS
===================================================== */

.section {
    padding: 90px 7%;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 25px;
}

.section-heading h2 {
    font-size: clamp(32px, 5vw, 50px);
    letter-spacing: -2px;
    margin-top: 6px;
}

.quality-badge {
    padding: 8px 12px;
    border: 1px solid #292929;
    border-radius: 100px;
    color: #666;
    font-size: 9px;
    letter-spacing: 1px;
}

/* =====================================================
   PLAYER
===================================================== */

.player-wrapper {
    padding: 18px;
    display: grid;
    gap: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
        radial-gradient(circle at top, rgba(225,6,0,0.12), transparent 42%),
        linear-gradient(145deg, #121212, #070707 60%);
    box-shadow: var(--shadow-soft);
}

.player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.player-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.player-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    box-shadow:
        0 0 0 6px rgba(225,6,0,0.14),
        0 0 18px rgba(225,6,0,0.6);
}

.player-meta {
    color: #898989;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.stream-refresh {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    color: #f5f5f5;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    font: inherit;
    font-size: 9px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.stream-refresh:hover,
.stream-refresh:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(225,6,0,0.72);
    box-shadow: 0 0 0 1px rgba(225,6,0,0.24);
    color: #fff;
}

.stream-refresh:disabled {
    cursor: wait;
    opacity: 0.55;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: clamp(280px, 46vw, 460px);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.4)), #050505;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.player-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #050505;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.player-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at top, rgba(225, 6, 0, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(6,6,6,0.9), rgba(10,10,10,0.96));
    text-align: center;
}

.player-shell.is-fallback .player-fallback {
    display: flex;
}

.player-shell.is-fallback .player-embed {
    opacity: 0;
}

.player-fallback-card {
    max-width: 460px;
    padding: 22px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
}

.player-fallback-badge {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--red);
    letter-spacing: 2px;
    font-size: 10px;
    font-weight: 800;
}

.player-fallback-card h3 {
    font-size: clamp(22px, 4vw, 34px);
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.player-fallback-card p {
    color: #8d8d8d;
    line-height: 1.6;
    font-size: 14px;
}

.player-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 4px;
    color: #757575;
    font-size: 11px;
    letter-spacing: 0.4px;
}

.performance-note {
    color: #666;
    font-size: 11px;
    margin-top: 12px;
    line-height: 1.6;
}

.device-status-box {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(225, 6, 0, 0.35);
    background: rgba(225, 6, 0, 0.06);
    color: #f5f5f5;
}

.device-status-box strong {
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.device-status-box span {
    color: #d0d0d0;
    font-size: 13px;
    line-height: 1.6;
}

/* =====================================================
   PREDICTIONS
===================================================== */

.prediction-section {
    margin: 0 7% 100px;
    padding: 40px;
    border-radius: 22px;
    border: 1px solid #202020;
    background: linear-gradient(145deg, #111, #080808);
}

.prediction-panel {
    margin-top: 10px;
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.prediction-field {
    position: relative;
}

.prediction-field label {
    display: block;
    color: #777;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.prediction-field::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 45px;
    color: rgba(255,255,255,0.45);
    pointer-events: none;
    font-size: 11px;
}

.prediction-field select {
    width: 100%;
    height: 48px;
    padding: 0 38px 0 12px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.1);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
        #080808;
    color: white;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 10px 24px rgba(0,0,0,0.18);
}

.prediction-field select:hover {
    border-color: rgba(225,6,0,0.45);
    transform: translateY(-1px);
}

.prediction-field select:focus {
    border-color: var(--red);
    box-shadow:
        0 0 0 4px rgba(225,6,0,0.16),
        0 12px 28px rgba(0,0,0,0.25);
}

.prediction-field select option {
    background: #101010;
    color: #f5f5f5;
}

.prediction-button {
    margin-top: 4px;
}

.replay-spotlight-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin: 0 7% 100px;
    padding: 38px 40px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(225, 6, 0, .14), transparent 48%),
        linear-gradient(145deg, #111, #080808);
    box-shadow: var(--shadow-soft);
}

.replay-spotlight-copy {
    max-width: 650px;
}

.replay-spotlight-copy h2 {
    margin-top: 10px;
    font-size: clamp(32px, 5vw, 54px);
    letter-spacing: -3px;
}

.replay-spotlight-copy p {
    max-width: 560px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.7;
}

.replay-spotlight-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.prediction-result {
    margin-top: 22px;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid #292929;
    background: #090909;
    line-height: 1.8;
}

.prediction-result .result-title {
    color: var(--red);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1px;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 30px 7%;
    border-top: 1px solid #151515;
    color: #555;
    font-size: 11px;
}

.footer-brand {
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

.footer-brand span {
    color: var(--red);
}

/* =====================================================
   DRIVER STANDINGS
===================================================== */

.standings-section {
    margin: 0 7% 100px;
    padding: 40px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
        linear-gradient(180deg, #111, #080808);
    box-shadow: var(--shadow-soft);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
}

.section-header h2 {
    margin: 6px 0 0;
    line-height: 1;
}

.driver-standings {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.standings-row {
    display: grid;
    grid-template-columns: 45px 1fr 160px 70px;
    align-items: center;
    gap: 15px;
    position: relative;
    padding: 16px 18px 16px 22px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    overflow: hidden;
}

.standings-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: rgba(255,255,255,0.14);
}

.standings-row:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 18px 36px rgba(0,0,0,0.25);
}

.standings-position {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    font-weight: 900;
    letter-spacing: 0.5px;
}

.standings-driver {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.2px;
}

.standings-team {
    opacity: 0.7;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.standings-points {
    text-align: right;
    font-weight: 900;
    color: var(--red-bright);
    letter-spacing: 0.6px;
}

.standings-loading {
    padding: 34px 24px;
    text-align: center;
    opacity: 0.72;
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.02);
}

.standings-row--top-1 {
    border-color: rgba(255, 215, 0, 0.45);
    background: linear-gradient(180deg, rgba(255,215,0,0.12), rgba(255,255,255,0.03));
}

.standings-row--top-1 .standings-position {
    background: rgba(255, 215, 0, 0.18);
    color: #ffd95a;
}

.standings-row--top-1::before {
    background: linear-gradient(180deg, #ffd95a, #c9a227);
}

.standings-row--top-2 {
    border-color: rgba(192, 192, 192, 0.36);
}

.standings-row--top-2 .standings-position {
    background: rgba(192, 192, 192, 0.16);
    color: #d6d6d6;
}

.standings-row--top-2::before {
    background: linear-gradient(180deg, #d6d6d6, #8f8f8f);
}

.standings-row--top-3 {
    border-color: rgba(205, 127, 50, 0.36);
}

.standings-row--top-3 .standings-position {
    background: rgba(205, 127, 50, 0.16);
    color: #f0b07a;
}

.standings-row--top-3::before {
    background: linear-gradient(180deg, #f0b07a, #8b4b22);
}

/* =====================================================
   SEASON CALENDAR
===================================================== */

.calendar-section {
    contain: layout paint;
    margin: 0 7% 100px;
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    background: linear-gradient(145deg, #111, #080808);
    box-shadow: var(--shadow-soft);
}

.calendar-note {
    color: #77777d;
    font-size: 10px;
    letter-spacing: 1.5px;
}

.season-calendar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.calendar-round {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.calendar-round:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.045);
}

.calendar-round--next {
    border-color: rgba(255,30,30,0.6);
    background: rgba(255,30,30,0.08);
}

.round-number {
    grid-row: 1 / 3;
    color: var(--red-bright);
    font-size: 15px;
    font-weight: 900;
}

.round-details h3 {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
}

.round-details p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.calendar-round time {
    color: #d4d4d8;
    font-size: 11px;
    white-space: nowrap;
}

.status-badge {
    grid-column: 2 / 4;
    justify-self: start;
    margin-top: 10px;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.status-completed {
    color: #76d9ae;
    background: rgba(25,195,125,0.12);
}

.status-next-up {
    color: #fff;
    background: var(--red);
}

.status-upcoming {
    color: #aaaab0;
    background: rgba(255,255,255,0.08);
}

.race-results {
    scroll-margin-top: 94px;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(0,0,0,0.22);
}

.results-header,
.results-tabs,
.results-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.results-header h3 {
    margin-top: 6px;
    font-size: clamp(20px, 3vw, 30px);
    text-transform: uppercase;
}

.results-source {
    color: #77777d;
    font-size: 9px;
    letter-spacing: 1.2px;
}

.results-tabs {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 22px 0 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.results-tab {
    padding: 9px 2px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #77777d;
    background: transparent;
    font: inherit;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
}

.results-tab + .results-tab { margin-left: 20px; }

.results-tab.is-active {
    border-bottom-color: var(--red);
    color: #fff;
}

.results-table { overflow-x: auto; }

.result-heading,
.result-row {
    display: grid;
    grid-template-columns: 42px minmax(150px, 1fr) 52px 52px minmax(110px, 0.8fr) 48px;
    align-items: center;
    gap: 12px;
    min-width: 560px;
}

.session-result-heading,
.session-result-row {
    grid-template-columns: 42px minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(110px, 0.8fr) 48px;
    min-width: 560px;
}

.result-heading {
    padding: 0 12px 9px;
    color: #69696f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.result-row {
    min-height: 46px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: #c4c4c8;
    font-size: 12px;
}

.result-position,
.result-points { color: #fff; font-weight: 800; }
.result-driver { color: #fff; font-weight: 700; }
.result-grid,
.result-diff,
.result-time { white-space: nowrap; }
.result-diff { font-weight: 800; }
.pos-gained { color: #2ecc71; }
.pos-lost { color: #e74c3c; }
.pos-same,
.neutral { color: #95a5a6; }

.results-footer-note,
.results-summary {
    margin-top: 14px;
    color: #9a9aa1;
    font-size: 11px;
}

.results-summary { justify-content: flex-start; }
.is-hidden { display: none; }

.prediction-meter {
    display: grid;
    grid-template-columns: auto auto;
    gap: 7px 12px;
    margin-top: 20px;
    padding: 16px 16px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(25,195,125,0.08), rgba(255,255,255,0.02));
    color: #bdbdc2;
    font-size: 12px;
}

.prediction-meter strong {
    color: #fff;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.prediction-meter span {
    color: var(--green);
    font-weight: 800;
    text-align: right;
}

.prediction-meter-track {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}

.prediction-meter-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #19c37d, #72e6b0);
    box-shadow: 0 0 12px rgba(25,195,125,0.45);
    transition: width 0.35s ease;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1180px) {
    .prediction-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    #desktop-nav {
        gap: 18px;
    }

    #desktop-nav a {
        font-size: 12px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .prediction-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-shell {
        min-height: clamp(290px, 54vw, 400px);
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 700px) {
    .standings-section {
        margin-left: 6%;
        margin-right: 6%;
        padding: 28px 22px;
    }

    .standings-row {
        grid-template-columns: 34px 1fr 74px;
    }

    .standings-team {
        display: none;
    }
}

@media (max-width: 650px) {
    #desktop-nav { display: none; }
    .menu-button { display: block; }

    .navbar {
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero {
        padding-top: 65px;
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero h1 {
        font-size: clamp(53px, 17vw, 85px);
        letter-spacing: -5px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .section {
        padding: 70px 6%;
    }

    .stats-section {
        padding-left: 6%;
        padding-right: 6%;
    }

    .prediction-section {
        margin-left: 6%;
        margin-right: 6%;
    }

    .replay-spotlight-section {
        align-items: flex-start;
        flex-direction: column;
        margin-left: 6%;
        margin-right: 6%;
    }

    .replay-spotlight-actions {
        justify-content: flex-start;
        padding: 25px;
    }

    .prediction-grid {
        grid-template-columns: 1fr;
    }

    .calendar-section {
        margin-left: 6%;
        margin-right: 6%;
        padding: 25px;
    }

    .timetable-heading {
        grid-template-columns: 34px minmax(0, 1fr) 82px 54px;
    }

    .timetable-day {
        grid-template-columns: 34px 1fr;
    }

    .day-sessions > div {
        grid-template-columns: minmax(0, 1fr) 82px 54px;
        font-size: 10px;
    }

    .timetable-day b {
        font-size: 10px;
    }

    .season-calendar {
        grid-template-columns: 1fr;
    }

    .race-results {
        padding: 18px 14px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-wrapper {
        padding: 12px;
    }

    .player-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .player-controls {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .player-meta {
        font-size: 10px;
    }

    .stream-refresh {
        padding: 7px 10px;
    }

    .navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(3, 3, 3, 0.96);
    }

    .player-shell {
        min-height: 270px;
        aspect-ratio: 16 / 9;
    }

    .player-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-footer {
        font-size: 10px;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .prediction-field::after {
        top: 44px;
    }

    .prediction-field select {
        height: 46px;
    }

    .standings-section {
        padding: 22px 16px;
    }

    .standings-row {
        grid-template-columns: 34px 1fr;
        gap: 10px 12px;
    }

    .standings-points {
        grid-column: 2;
        text-align: left;
    }

    .section-header h2 {
        font-size: clamp(28px, 8vw, 42px);
    }
}

@media (max-width: 400px) {
    .hero h1 {
        letter-spacing: -4px;
    }

    .race-card {
        padding: 23px;
    }

    .calendar-section {
        padding: 22px 16px;
    }

    .calendar-round {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .calendar-round time {
        grid-column: 2;
        margin-top: 8px;
    }

    .status-badge {
        grid-column: 2;
    }

    .countdown {
        font-size: 25px;
    }

    .section {
        padding-left: 5%;
        padding-right: 5%;
    }

    .player-wrapper {
        padding: 10px;
    }

    .player-shell {
        min-height: 220px;
        aspect-ratio: 16 / 9;
    }
}

.calendar-round--next:hover {
    border-color: rgba(255,30,30,0.8);
    background: rgba(255,30,30,0.11);
}