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


/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    background: #080808;

    color: #f5f5f5;

    font-family:
        "Inter",
        Arial,
        sans-serif;

}


/* =====================================================
   VARIABLES
===================================================== */

:root {

    --red: #e10600;

    --black: #080808;

    --surface: #111111;

    --surface-2: #151515;

    --border: #272727;

    --white: #f5f5f5;

    --muted: #858585;

    --dim: #4c4c4c;

    --mercedes: #00a19c;

    --ferrari: #e10600;

    --redbull: #3671c6;

    --mclaren: #ff8700;

}


/* =====================================================
   NAVBAR
===================================================== */

.navbar {

    height: 76px;

    padding: 0 6%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid var(--border);

    background: #080808;

}


.brand {

    display: flex;

    align-items: center;

    gap: 18px;

}


.f1-logo {

    color: var(--red);

    font-size: 29px;

    font-weight: 900;

    font-style: italic;

    letter-spacing: -4px;

    transform: skew(-10deg);

}


.logo-year {

    color: #ffffff;

    padding-left: 5px;

}


.brand-divider {

    width: 1px;

    height: 17px;

    background: #303030;

}


.brand-title {

    color: #8a8a8a;

    font-size: 9px;

    font-weight: 600;

    letter-spacing: 2px;

}


.season {

    color: #777;

    font-size: 9px;

    letter-spacing: 2px;

}


/* =====================================================
   MAIN
===================================================== */

main {

    width: 88%;

    max-width: 1400px;

    margin: auto;

}


/* =====================================================
   RACE NAVIGATION
===================================================== */

.race-navigation {

    padding: 35px 0 28px;

    border-bottom:
        1px solid var(--border);

}


.navigation-header {

    display: flex;

    align-items: end;

    justify-content: space-between;

    margin-bottom: 20px;

}


.navigation-header h2 {

    font-size: 25px;

    letter-spacing: -1px;

}


.navigation-controls {

    display: flex;

    gap: 6px;

}


.nav-button {

    width: 38px;

    height: 34px;

    border:
        1px solid #303030;

    background: #111111;

    color: #888888;

    font-size: 15px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;

}


.nav-button:hover {

    border-color: #555555;

    background: #171717;

    color: #ffffff;

}


/* =====================================================
   RACE TRACK
===================================================== */

.race-track-wrapper {

    width: 100%;

    overflow: hidden;

}


.race-track {

    display: flex;

    gap: 7px;

    overflow-x: auto;

    overflow-y: hidden;

    scroll-behavior: smooth;

    scrollbar-width: none;

    cursor: none !important;

    padding-bottom: 2px;

}


.race-track::-webkit-scrollbar {

    display: none;

}


.race-track.dragging {

    cursor: none !important;

    scroll-behavior: auto;

}


/* =====================================================
   RACE BUTTON
===================================================== */

.race-button {

    flex: 0 0 auto;

    width: 116px;

    height: 54px;

    padding: 0 15px;

    position: relative;

    border:
        1px solid #282828;

    background: #101010;

    color: #777777;

    text-align: left;

    font-family: inherit;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;

}


.race-button:hover {

    background: #171717;

    border-color: #444444;

    color: #ffffff;

}


.race-button.active {

    background: var(--red);

    border-color: var(--red);

    color: #ffffff;

}


.race-button.upcoming {

    opacity: 0.8;

}


.race-number {

    display: block;

    margin-bottom: 5px;

    color: #555555;

    font-size: 8px;

    letter-spacing: 1.5px;

}


.race-button.active .race-number {

    color:
        rgba(255, 255, 255, 0.75);

}


.race-name {

    display: block;

    white-space: nowrap;

    font-size: 10px;

    font-weight: 600;

}


.race-state {

    position: absolute;

    top: 7px;

    right: 7px;

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: #3b3b3b;

}


.race-button.active .race-state {

    background: #ffffff;

}


/* =====================================================
   EMPTY STATE
===================================================== */

.empty-state {

    min-height: 620px;

    position: relative;

    display: flex;

    align-items: center;

}


.empty-line {

    position: absolute;

    top: 0;

    left: 0;

    width: 1px;

    height: 100%;

    background: #151515;

}


.empty-content {

    margin-left: 40px;

}


.empty-state h1 {

    margin-bottom: 25px;

    font-size:
        clamp(55px, 7vw, 95px);

    line-height: 0.88;

    letter-spacing: -6px;

}


.empty-state p {

    max-width: 350px;

    color: #666666;

    font-size: 13px;

    line-height: 1.7;

}


.empty-state[hidden] {

    display: none;

}


/* =====================================================
   EYEBROW
===================================================== */

.eyebrow {

    display: block;

    margin-bottom: 10px;

    color: var(--red);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 2.5px;

}


/* =====================================================
   RACE VIEW
===================================================== */

.race-view[hidden] {

    display: none;

}


/* =====================================================
   HERO
===================================================== */

.hero {

    min-height: 470px;

    display: grid;

    grid-template-columns:
        0.82fr 1.18fr;

    border-bottom:
        1px solid var(--border);

}


.hero-content {

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding-right: 50px;

}


.hero h1 {

    max-width: 600px;

    margin-bottom: 20px;

    font-size:
        clamp(48px, 5vw, 76px);

    line-height: 0.91;

    letter-spacing: -5px;

}


.hero-content > p {

    color: #777777;

    font-size: 13px;

}


.race-meta {

    display: flex;

    gap: 42px;

    margin-top: 55px;

}


.race-meta div {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.race-meta span {

    color: #555555;

    font-size: 8px;

    letter-spacing: 2px;

}


.race-meta strong {

    color: #d4d4d4;

    font-size: 11px;

}


#raceStatus.upcoming-status {

    color: var(--red);

}


/* =====================================================
   TRACK IMAGE
===================================================== */

.track-image {

    min-height: 470px;

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background: #080808;

}


.track-image img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: contain;

    object-position: center;

    opacity: 1;

    transition:
        opacity 0.25s ease;

}


/* No blur or edge gradient */


.track-image-label {

    position: absolute;

    left: 18px;

    bottom: 18px;

    padding: 7px 10px;

    background:
        rgba(8, 8, 8, 0.9);

    border-left:
        2px solid var(--red);

}


.track-image-label span {

    color: #dddddd;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 3px;

}


/* =====================================================
   SECTIONS
===================================================== */

.section {

    padding: 75px 0;

    border-bottom:
        1px solid var(--border);

}


.section-heading {

    margin-bottom: 30px;

}


.section h2 {

    font-size: 28px;

    letter-spacing: -1.5px;

}


/* =====================================================
   PODIUM
===================================================== */

.podium {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;

    align-items: end;

}


.podium-card {

    min-height: 175px;

    position: relative;

    padding: 25px;

    background: var(--surface);

    border:
        1px solid var(--border);

    overflow: hidden;

}


.podium-card.first {

    min-height: 205px;

    border:
        1px solid var(--border);

}


.position {

    position: absolute;

    top: 7px;

    right: 18px;

    color: #292929;

    font-size: 50px;

    font-weight: 900;

    line-height: 1;

}


.driver-info {

    position: absolute;

    bottom: 24px;

    left: 25px;

    z-index: 4;

}


.driver-number {

    color: #555555;

    font-family: monospace;

    font-size: 9px;

}


.driver-info h3 {

    margin: 5px 0;

    color: #eeeeee;

    font-size: 16px;

    letter-spacing: -0.4px;

}


.driver-info p {

    color: #666666;

    font-size: 10px;

}


.team-color {

    position: absolute;

    bottom: 0;

    left: 0;

    width: 100%;

    height: 3px;

    background: #333333;

    z-index: 5;

}


.team-color.mercedes {

    background: var(--mercedes);

}


.team-color.ferrari {

    background: var(--ferrari);

}


.team-color.redbull {

    background: var(--redbull);

}


.team-color.mclaren {

    background: var(--mclaren);

}


/* =====================================================
   FULL PODIUM DRIVER IMAGES
===================================================== */

.driver-image {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center top;

    z-index: 1;

    pointer-events: none;

    user-select: none;

    -webkit-user-drag: none;

}


.driver-image-fade {

    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(17, 17, 17, 0.95) 0%,
            rgba(17, 17, 17, 0.72) 25%,
            rgba(17, 17, 17, 0.20) 55%,
            transparent 80%
        );

}


.podium-card .position {

    z-index: 3;

}


.podium-card .driver-info {

    z-index: 4;

}


.podium-card .team-color {

    z-index: 5;

}


/* =====================================================
   FASTEST LAP FEATURE
===================================================== */

.fastest-lap-card {

    position: relative;

    min-height: 275px;

    display: grid;

    grid-template-columns: 1fr 0.85fr;

    overflow: hidden;

    background: #111111;

    border:
        1px solid var(--border);

}


.fastest-lap-card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 4px;
    height: 100%;

    background: var(--red);

    z-index: 8;

}


.fastest-lap-main {

    position: relative;

    z-index: 5;

    padding: 38px 42px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    background:
        linear-gradient(
            90deg,
            #111111 0%,
            rgba(17,17,17,0.98) 55%,
            rgba(17,17,17,0.78) 100%
        );

}


.fastest-lap-label {

    margin-bottom: 15px;

    color: #555555;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 2.5px;

}


.fastest-lap-time {

    color: #f5f5f5;

    font-family: monospace;

    font-size:
        clamp(44px, 5vw, 70px);

    font-weight: 700;

    line-height: 0.95;

    letter-spacing: -4px;

}


.fastest-lap-driver {

    margin-top: 22px;

    color: #eeeeee;

    font-size: 19px;

    font-weight: 700;

    letter-spacing: -0.5px;

}


.fastest-lap-team {

    margin-top: 5px;

    color: #666666;

    font-size: 11px;

}


.fastest-lap-visual {

    position: relative;

    min-width: 0;

    overflow: hidden;

    background: #0d0d0d;

}


.fastest-lap-driver-image {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: center 15%;

    opacity: 0.95;

    z-index: 1;

    pointer-events: none;

    user-select: none;

    -webkit-user-drag: none;

}


.fastest-lap-image-fade {

    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            #111111 0%,
            rgba(17,17,17,0.55) 18%,
            rgba(17,17,17,0.08) 58%,
            rgba(17,17,17,0.15) 100%
        );

}


.fastest-lap-stats {

    position: absolute;

    right: 28px;
    bottom: 25px;

    z-index: 4;

    display: flex;

    gap: 28px;

    padding: 13px 16px;

    background:
        rgba(8,8,8,0.88);

    border:
        1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(8px);

}


.fastest-lap-stats div {

    display: flex;

    flex-direction: column;

    gap: 5px;

}


.fastest-lap-stats span {

    color: #555555;

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1.7px;

}


.fastest-lap-stats strong {

    color: #eeeeee;

    font-family: monospace;

    font-size: 17px;

}


.fastest-lap-visual-placeholder {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #333333;

    font-size: 60px;

    font-weight: 800;

}


.fastest-lap-card.empty .fastest-lap-time {

    color: #333333;

}


.fastest-lap-card.empty .fastest-lap-driver {

    color: #444444;

}


.fastest-lap-card.empty .fastest-lap-team {

    color: #444444;

}


/* =====================================================
   FASTEST LAP RESPONSIVE
===================================================== */

@media (max-width: 700px) {

    .fastest-lap-card {

        grid-template-columns: 1fr;

        min-height: 440px;

    }


    .fastest-lap-main {

        min-height: 255px;

        padding: 30px;

    }


    .fastest-lap-visual {

        min-height: 185px;

    }


    .fastest-lap-driver-image {

        object-position: center 30%;

    }


    .fastest-lap-stats {

        right: 20px;
        bottom: 18px;

        gap: 20px;

    }


    .fastest-lap-time {

        font-size: 44px;

        letter-spacing: -3px;

    }

}


/* =====================================================
   FUTURE RACE
===================================================== */

.upcoming-card {

    border-top-color:
        #242424 !important;

}


.upcoming-driver {

    color: #444444 !important;

}


/* =====================================================
   FOOTER
===================================================== */

footer {

    width: 88%;

    max-width: 1400px;

    height: 100px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.footer-logo {

    color: var(--red);

    font-size: 24px;

    font-weight: 900;

    font-style: italic;

}


.footer-logo span {

    color: #ffffff;

    font-size: inherit;

}


footer p {

    color: #7d7d7d;

    font-size: 9px;

    letter-spacing: 1px;

}


footer > span {

    color: #7d7d7d;

    font-size: 9px;

}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {

    main {

        width: 90%;

    }


    .hero {

        grid-template-columns: 1fr;

    }


    .hero-content {

        min-height: 330px;

        padding:
            60px 0 40px;

    }


    .track-image {

        min-height: 350px;

    }


    .podium {

        grid-template-columns: 1fr;

    }


    .podium-card,
    .podium-card.first {

        min-height: 160px;

    }

    .podium {
        grid-template-columns: 1fr;
    }

    .podium-card[data-position="1"] {
        order: 1;
    }

    .podium-card[data-position="2"] {
        order: 2;
    }

    .podium-card[data-position="3"] {
        order: 3;
    }

}


@media (max-width: 600px) {

    .navbar {

        padding: 0 5%;

    }


    .season {

        display: none;

    }


    .brand-divider,
    .brand-title {

        display: none;

    }


    main {

        width: 90%;

    }


    .race-navigation {

        padding-top: 25px;

    }


    .navigation-header {

        align-items: flex-start;

        gap: 15px;

    }


    .navigation-header h2 {

        font-size: 22px;

    }


    .race-button {

        width: 105px;

    }


    .empty-state {

        min-height: 500px;

    }


    .empty-state h1 {

        font-size: 58px;

        letter-spacing: -4px;

    }


    .hero h1 {

        font-size: 48px;

        letter-spacing: -4px;

    }


    .race-meta {

        gap: 25px;

        flex-wrap: wrap;

        margin-top: 40px;

    }


    .track-image {

        min-height: 270px;

    }


    .section {

        padding: 55px 0;

    }


    footer {

        width: 90%;

    }

}


/* =====================================================
   RED SCROLLBAR
===================================================== */

html {

    scrollbar-width: thin;

    scrollbar-color:
        #e10600
        #080808;

}


::-webkit-scrollbar {

    width: 6px;

    height: 6px;

}


::-webkit-scrollbar-track {

    background: #080808;

}


::-webkit-scrollbar-thumb {

    background: #e10600;

    border-radius: 0;

    box-shadow:
        0 0 4px rgba(225, 6, 0, 0.9),
        0 0 10px rgba(225, 6, 0, 0.55),
        0 0 20px rgba(225, 6, 0, 0.25);

}


::-webkit-scrollbar-thumb:hover {

    background: #ff1a14;

    box-shadow:
        0 0 5px rgba(225, 6, 0, 1),
        0 0 12px rgba(225, 6, 0, 0.8),
        0 0 25px rgba(225, 6, 0, 0.4);

}


::-webkit-scrollbar-button {

    display: none;

}


/* =====================================================
   LASER CURSOR
===================================================== */

html,
body,
button,
a,
input,
select,
textarea,
[role="button"] {

    cursor: none !important;

}


.laser-cursor {

    position: fixed;

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: #ff1a14;

    box-shadow:
        0 0 4px #e10600,
        0 0 10px #e10600,
        0 0 20px
            rgba(225, 6, 0, 0.8);

    pointer-events: none;

    z-index: 99999;

    transform:
        translate(-50%, -50%);

    transition:
        width 0.15s ease,
        height 0.15s ease,
        box-shadow 0.15s ease;

}


.laser-trail {

    position: fixed;

    width: 55px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(225, 6, 0, 0.2),
            rgba(225, 6, 0, 0.8)
        );

    box-shadow:
        0 0 5px
            rgba(225, 6, 0, 0.7);

    pointer-events: none;

    z-index: 99998;

    transform-origin:
        right center;

}


.laser-cursor::before,
.laser-cursor::after {

    content: "";

    position: absolute;

    background:
        rgba(225, 6, 0, 0.7);

}


.laser-cursor::before {

    width: 18px;

    height: 1px;

    left: -5px;

    top: 3px;

}


.laser-cursor::after {

    width: 1px;

    height: 18px;

    left: 3px;

    top: -5px;

}


/* =====================================================
   NEVER SHOW NATIVE CURSOR ON RACE SELECTOR
===================================================== */

.race-track,
.race-track *,
.race-button,
.race-button * {

    cursor: none !important;

}


/* =====================================================
   LASER HOVER
===================================================== */

body.cursor-hover
.laser-cursor {

    width: 11px;

    height: 11px;

    box-shadow:
        0 0 5px #e10600,
        0 0 14px #e10600,
        0 0 30px
            rgba(225, 6, 0, 0.8);

}


/* =====================================================
   TOUCH DEVICES
   Completely remove fake cursor.
===================================================== */

@media (hover: none) and (pointer: coarse) {

    .laser-cursor,
    .laser-trail {

        display: none !important;

    }


    html,
    body,
    button,
    a,
    input,
    select,
    textarea,
    [role="button"],
    .race-track,
    .race-track *,
    .race-button,
    .race-button * {

        cursor: auto !important;

    }

}

/* =====================================================
   INITIAL ASSET LOADER
===================================================== */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080808;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}
.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-content {
    width: min(420px, 78vw);
}
.loader-logo {
    margin-bottom: 32px;
    color: var(--red);
    font-size: 58px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    letter-spacing: -6px;
    transform: skew(-10deg);
}
.loader-label {
    margin-bottom: 12px;
    color: #777777;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2.5px;
}
.loader-progress {
    width: 100%;
    height: 2px;
    overflow: hidden;
    background: #202020;
}
.loader-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--red);
    box-shadow: 0 0 8px rgba(225, 6, 0, 0.7);
    transition: width 0.18s ease;
}
.loader-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #444444;
    font-family: monospace;
    font-size: 8px;
    letter-spacing: 1px;
}
#loaderPercentage { color: #888888; }
@media (max-width: 600px) {
    .loader-content { width: 80vw; }
    .loader-logo { font-size: 50px; margin-bottom: 28px; }
}
