
/* GENERAL WEBSITE STYLING */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #101318;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
}

/* NAVIGATION BAR */

.navbar {
    background-color: #191d24;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%;
    border-bottom: 3px solid #dc283b;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: #dc283b;
    letter-spacing: 2px;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.2s;
}

nav a:hover {
    color: #ff4655;
}

/* HOMEPAGE BANNER */

.hero {
    min-height: 480px;
    display: flex;
    align-items: center;
    padding: 70px 8%;

    background: linear-gradient(
        120deg,
        #202733,
        #101318 75%
    );
}

.hero-content {
    max-width: 760px;
}

.hero-label {
    color: #ff4655;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 22px;
}

.hero-description {
    font-size: 18px;
    color: #b8bec9;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* BUTTONS */

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 25px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: 0.2s;
}

.primary {
    background-color: #dc283b;
    color: white;
}

.primary:hover {
    background-color: #fa4559;
}

.secondary {
    border: 2px solid #808895;
    color: white;
}

.secondary:hover {
    background-color: #333b47;
}

/* MOBILE LAYOUT */

@media (max-width: 750px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
    }

    .hero {
        padding: 60px 6%;
        min-height: 400px;
    }
}

/* LEAGUE BRAND COLORS */

:root {
    --background: #090D26;
    --navy: #101831;
    --orange: #FF7915;
    --orange-hover: #FF9A40;
    --green: #249E42;
    --white: #F5F6FA;
    --muted: #C3CAD8;
}

/* MAIN BACKGROUND */

body {
    background-color: var(--background);
    color: var(--white);
}

/* NAVIGATION */

.navbar {
    background-color: var(--navy);
    border-bottom: 3px solid var(--orange);
}

.logo {
    color: var(--orange);
}

nav a:hover {
    color: var(--orange);
}

/* HOMEPAGE BANNER */

.hero {
    background: linear-gradient(
        115deg,
        #19264B 0%,
        #090D26 80%
    );
}

.hero-label {
    color: var(--orange);
}

.hero-description {
    color: var(--muted);
}

/* DISCORD BUTTON */

.primary {
    background-color: var(--orange);
    color: #090D26;
}

.primary:hover {
    background-color: var(--orange-hover);
}

/* STANDINGS BUTTON */

.secondary {
    border: 2px solid var(--green);
    color: var(--white);
}

.secondary:hover {
    background-color: var(--green);
}

/* UPDATED LEAGUE COLORS */

:root {
    --bg: #080D1D;
    --nav: #11182A;
    --card: #151D30;
    --orange: #F58A18;
    --green: #28AC55;
    --yellow: #F6CF35;
    --white: #F4F5F8;
    --muted: #ADB8CA;
}

/* BACKGROUND */

body {
    background-color: var(--bg);
    color: var(--white);
}

/* NAVIGATION */

.navbar {
    background-color: var(--nav);
    border-bottom: 2px solid var(--orange);
}

.logo {
    color: var(--white);
}

nav a {
    color: var(--white);
}

nav a:hover {
    color: var(--orange);
}

/* MAIN BANNER */

.hero {
    background: linear-gradient(
        115deg,
        #1C2942 0%,
        #10182B 50%,
        #080D1D 100%
    );
}

.hero-label {
    color: var(--green);
}

.hero h1 {
    color: var(--white);
}

.hero-description {
    color: var(--muted);
}

/* BUTTONS */

.primary {
    background-color: var(--orange);
    color: var(--bg);
}

.primary:hover {
    background-color: #FFAA45;
}

.secondary {
    border: 2px solid #53627A;
    color: var(--white);
}

.secondary:hover {
    background-color: var(--green);
    border-color: var(--green);
    color: white;
}

/* FUTURE CONTENT SECTIONS */

main {
    background-color: var(--bg);
}

.quick-card {
    background-color: var(--card);
}

/* ============================= */
/* TEAMS & RESULTS SECTION       */
/* ============================= */

.quick-links {
    padding: 70px 8%;
    background-color: var(--bg);
}

/* SECTION HEADING */

.section-heading {
    margin-bottom: 32px;
}

.section-label {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-heading h2 {
    color: var(--white);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 900;
    margin-bottom: 10px;
}

.section-description {
    color: var(--muted);
    font-size: 15px;
}

/* TWO-COLUMN CARD LAYOUT */

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* CARD DESIGN */

.quick-card {
    display: flex;
    flex-direction: column;

    padding: 32px;
    min-height: 270px;

    background-color: var(--card);
    border: 1px solid #26344C;
    border-radius: 8px;

    color: var(--white);
    text-decoration: none;

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

/* INDIVIDUAL CARD ACCENTS */

.teams-card {
    border-top: 3px solid var(--orange);
}

.results-card {
    border-top: 3px solid var(--green);
}

/* HOVER EFFECTS */

.quick-card:hover {
    transform: translateY(-5px);
    background-color: #1B2942;
    border-color: var(--orange);
}

/* CARD CONTENT */

.card-icon {
    font-size: 32px;
    margin-bottom: 22px;
}

.card-category {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--green);
    margin-bottom: 8px;
}

.teams-card .card-category {
    color: var(--yellow);
}

.quick-card h3 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 12px;
}

.card-description {
    color: var(--muted);
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 24px;
}

.card-link {
    margin-top: auto;
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* MOBILE SUPPORT */

@media (max-width: 750px) {

    .quick-links {
        padding: 45px 6%;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .quick-card {
        min-height: 230px;
        padding: 25px;
    }

}

/* ============================= */
/* CURRENT SEASON STANDINGS      */
/* ============================= */

.standings-section {
    padding: 70px 8%;
    background-color: #0D1425;
}

/* THREE DIVISION COLUMNS */

.standings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* STANDINGS CARDS */

.standings-card {
    background-color: var(--card);
    border: 1px solid #28344B;
    border-radius: 8px;
    padding: 24px;
    min-width: 0;
}

.d1-card {
    border-top: 4px solid var(--orange);
}

.d2-card {
    border-top: 4px solid var(--green);
}

.d3-card {
    border-top: 4px solid var(--yellow);
}

/* DIVISION HEADERS */

.standings-header {
    margin-bottom: 25px;
}

.division-tag {
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
}

.d2-card .division-tag {
    color: var(--green);
}

.d3-card .division-tag {
    color: var(--yellow);
}

.standings-header h3 {
    font-size: 21px;
    font-weight: 900;
    margin-top: 7px;
}

/* TABLE STYLING */

.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    text-align: left;
}

.standings-table th {
    color: #8593AB;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 12px 6px;
    border-bottom: 1px solid #344158;
}

.standings-table td {
    padding: 14px 6px;
    font-size: 14px;
    border-bottom: 1px solid #27334A;
}

.standings-table th:last-child,
.standings-table td:last-child {
    text-align: right;
    font-weight: bold;
}

.standings-table th:nth-child(3),
.standings-table td:nth-child(3) {
    text-align: center;
}

.standings-table td:nth-child(2) {
    overflow-wrap: anywhere;
}

/* LEADER HIGHLIGHT */

.standings-table tbody tr:first-child {
    background-color: #222B3A;
}

.standings-table tbody tr:first-child td:first-child {
    color: var(--yellow);
    font-weight: 900;
}

/* FULL STANDINGS LINKS */

.standings-link {
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.standings-link:hover {
    color: var(--yellow);
    text-decoration: underline;
}

/* RESPONSIVE LAYOUT */

@media (max-width: 1100px) {
    .standings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 750px) {
    .standings-section {
        padding: 45px 6%;
    }

    .standings-card {
        padding: 20px;
    }
}

/* ============================= */
/* DIVISION SCHEDULES            */
/* ============================= */

.schedules-section {
    padding: 70px 8%;
    background-color: var(--bg);
}

/* SCHEDULE CARD CONTAINER */

.schedules-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* INDIVIDUAL SCHEDULE CARDS */

.schedule-card {
    display: flex;
    align-items: center;
    gap: 30px;

    padding: 30px;
    min-height: 140px;

    background-color: var(--card);
    border: 1px solid #28344B;
    border-left: 5px solid transparent;
    border-radius: 8px;

    color: var(--white);
    text-decoration: none;

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

/* DIVISION ACCENTS */

.schedule-d1 {
    border-left-color: var(--orange);
}

.schedule-d2 {
    border-left-color: var(--green);
}

.schedule-d3 {
    border-left-color: var(--yellow);
}

/* LARGE DIVISION LABEL */

.schedule-division {
    width: 85px;
    flex-shrink: 0;

    font-size: 42px;
    font-weight: 900;
    letter-spacing: -2px;
    text-align: center;
    color: var(--orange);
}

.schedule-d2 .schedule-division {
    color: var(--green);
}

.schedule-d3 .schedule-division {
    color: var(--yellow);
}

/* SCHEDULE DESCRIPTION */

.schedule-info {
    flex: 1;
}

.schedule-info h3 {
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 10px;
}

.schedule-info p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* RIGHT ARROW */

.schedule-arrow {
    color: var(--orange);
    font-size: 30px;
    font-weight: bold;
    transition: transform 0.2s ease;
}

/* HOVER EFFECTS */

.schedule-card:hover {
    background-color: #1B2942;
    transform: translateX(5px);
    border-color: var(--orange);
}

.schedule-d2:hover {
    border-color: var(--green);
}

.schedule-d3:hover {
    border-color: var(--yellow);
}

.schedule-card:hover .schedule-arrow {
    transform: translate(3px, -3px);
}

/* MOBILE SUPPORT */

@media (max-width: 750px) {

    .schedules-section {
        padding: 45px 6%;
    }

    .schedule-card {
        gap: 15px;
        padding: 20px;
        min-height: 120px;
    }

    .schedule-division {
        width: 45px;
        font-size: 28px;
    }

    .schedule-info h3 {
        font-size: 18px;
    }

    .schedule-info p {
        font-size: 12px;
    }

    .schedule-arrow {
        font-size: 22px;
    }
}

/* ============================= */
/* DISCORD JOIN SECTION          */
/* ============================= */

.join-section {
    background: linear-gradient(
        135deg,
        #1B2B47 0%,
        #101A30 55%,
        #0B1222 100%
    );

    padding: 90px 8%;
    text-align: center;

    border-top: 1px solid #344158;
    border-bottom: 3px solid var(--orange);
}

.join-content {
    max-width: 750px;
    margin: 0 auto;
}

.join-label {
    color: var(--green);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.join-content h2 {
    color: var(--white);
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 900;
    margin-bottom: 20px;
}

.join-description {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.join-button {
    display: inline-block;
    padding: 18px 35px;

    background-color: var(--orange);
    color: var(--bg);

    font-weight: 900;
    font-size: 15px;
    text-decoration: none;

    border-radius: 5px;

    transition:
        background-color 0.2s,
        transform 0.2s;
}

.join-button:hover {
    background-color: #FFAA45;
    transform: translateY(-3px);
}

.join-note {
    margin-top: 20px;
    color: #ADB8CA;
    font-size: 13px;
}

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

.site-footer {
    background-color: #10182A;
    padding: 40px 8% 20px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-brand h3 {
    color: var(--orange);
    font-size: 27px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-bottom {
    border-top: 1px solid #304057;
    padding-top: 20px;
}

.footer-bottom p {
    color: #8995A9;
    font-size: 12px;
}

/* MOBILE SUPPORT */

@media (max-width: 750px) {

    .join-section {
        padding: 65px 6%;
    }

    .join-description {
        font-size: 16px;
    }

    .site-footer {
        padding: 35px 6% 20px;
    }

    .footer-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        gap: 15px;
    }

}

/* ============================= */
/* HOMEPAGE HERO BACKGROUND      */
/* ============================= */

.hero {
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 13, 29, 0.95) 0%,
            rgba(8, 13, 29, 0.80) 45%,
            rgba(8, 13, 29, 0.35) 100%
        ),
        url("images/hero.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============================= */
/* SCHEDULE CARD HOVER IMAGES    */
/* ============================= */

.schedule-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* IMAGE LAYER */

.schedule-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    transform: scale(1.06);

    transition:
        opacity 0.35s ease,
        transform 0.45s ease;

    z-index: 0;
}

/* D1 CUP IMAGE */

.schedule-d1::before {
    background-image:
        linear-gradient(
            90deg,
            rgba(8,13,29,0.92),
            rgba(8,13,29,0.45)
        ),
        url("images/d1.jpg");
}

/* D2 O'REILLY IMAGE */

.schedule-d2::before {
    background-image:
        linear-gradient(
            90deg,
            rgba(8,13,29,0.92),
            rgba(8,13,29,0.45)
        ),
        url("images/d2.jpg");
}

/* D3 TRUCK IMAGE */

.schedule-d3::before {
    background-image:
        linear-gradient(
            90deg,
            rgba(8,13,29,0.92),
            rgba(8,13,29,0.45)
        ),
        url("images/d3.jpg");
}

/* FADE IN WHEN HOVERED */

.schedule-card:hover::before,
.schedule-card:focus-visible::before {
    opacity: 1;
    transform: scale(1);
}

/* KEEP TEXT ABOVE IMAGES */

.schedule-card > * {
    position: relative;
    z-index: 1;
}

/* ============================= */
/* DISCORD JOIN BACKGROUND       */
/* ============================= */

.join-section {
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 13, 29, 0.90),
            rgba(8, 13, 29, 0.65),
            rgba(8, 13, 29, 0.90)
        ),
        url("images/join.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* CHAMPIONSHIP PHASE LABEL */

.standings-phase {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.d1-card .standings-phase {
    color: var(--orange);
}

.d2-card .standings-phase {
    color: var(--green);
}

.d3-card .standings-phase {
    color: var(--yellow);
}

/* ================================= */
/* FULL CHAMPIONSHIP STANDINGS PAGE  */
/* ================================= */

.full-standings-page {
    min-height: 100vh;
    background: var(--bg);
    padding: 65px 8%;
}

/* TITLE */

.standings-page-heading {
    margin-bottom: 35px;
}

.standings-page-heading h1 {
    font-size: clamp(34px, 5vw, 55px);
    font-weight: 900;
    margin: 12px 0;
}

.standings-page-heading > p:last-child {
    color: var(--muted);
    font-size: 16px;
}

/* DIVISION BUTTONS */

.division-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.division-btn {
    background: var(--card);
    border: 1px solid #344158;
    border-bottom: 3px solid transparent;

    color: var(--white);
    padding: 20px 12px;
    border-radius: 5px;

    font-size: 16px;
    font-weight: 900;
    cursor: pointer;

    transition: 0.2s;
}

.division-btn:hover {
    background: #24314A;
}

.division-btn[data-division="D1"].active {
    border-bottom-color: var(--orange);
}

.division-btn[data-division="D2"].active {
    border-bottom-color: var(--green);
}

.division-btn[data-division="D3"].active {
    border-bottom-color: var(--yellow);
}

.division-btn.active {
    background: #222D45;
}

/* CURRENT / REGULAR SELECTOR */

.standings-view-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 35px;
}

.view-btn {
    padding: 12px 20px;
    border: 1px solid #53627A;
    border-radius: 4px;
    background: transparent;

    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.view-btn.active {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--bg);
}

.view-btn:hover:not(.active) {
    background: #24314A;
}

/* TABLE HEADING */

.full-standings-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.full-standings-heading h2 {
    font-size: 27px;
    margin-bottom: 7px;
}

#full-standings-phase {
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* TABLE CONTAINER */

.full-standings-container {
    width: 100%;
    overflow-x: auto;

    background: var(--card);
    border: 1px solid #344158;
    border-radius: 7px;
}

/* TABLE */

.full-standings-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    text-align: left;
}

.full-standings-table th {
    background: #202B42;
    color: #AAB6CB;
    padding: 16px 12px;

    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.full-standings-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #29364D;
    font-size: 14px;
}

.full-standings-table tbody tr:hover {
    background: #202D46;
}

/* CHAMPIONSHIP LEADER */

.full-standings-table tbody tr:first-child {
    background: #253149;
}

.full-standings-table tbody tr:first-child td:first-child {
    color: var(--yellow);
    font-weight: 900;
}

/* BELOW PLAYOFF CUTLINE */

.full-standings-table tr.below-cutline {
    background: rgba(210, 63, 63, 0.08);
}

.full-standings-table tr.below-cutline td:last-child {
    color: #FF8080;
}

/* STATUS MESSAGES */

.full-standings-message {
    color: var(--muted);
    font-size: 13px;
    margin-top: 15px;
}

/* MOBILE SUPPORT */

@media (max-width: 750px) {

    .full-standings-page {
        padding: 45px 5%;
    }

    .division-selector {
        gap: 8px;
    }

    .division-btn {
        padding: 16px 5px;
        font-size: 12px;
    }

    .standings-view-selector {
        gap: 8px;
    }

    .view-btn {
        padding: 11px 12px;
        font-size: 11px;
    }

    .full-standings-heading h2 {
        font-size: 22px;
    }
}

/* ============================= */
/* NASCAR-STYLE CUTLINE          */
/* ============================= */

.full-standings-table .cutline-divider td {
    background-color: #422716;
    color: #FFAA55;

    border-top: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);

    padding: 10px 15px;

    text-align: center;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

/* DRIVERS BELOW THE CUTLINE */

.full-standings-table tr.below-cutline {
    background-color: rgba(210, 63, 63, 0.06);
}

.full-standings-table tr.below-cutline td {
    color: #A7AEBB;
}

/* NEGATIVE PLAYOFF CUTLINE VALUES */

.full-standings-table tr.below-cutline.playoff-row td:last-child {
    color: #FF8080;
}

/* KEEP REGULAR-SEASON STATS NEUTRAL */

.full-standings-table tr.below-cutline:not(.playoff-row) td:last-child {
    color: #A7AEBB;
}

/* DRIVER / TEAM CHAMPIONSHIP SELECTOR */

.championship-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.mode-btn {
    flex: 1;
    padding: 16px;

    background: var(--card);
    color: var(--white);

    border: 1px solid #344158;
    border-radius: 5px;

    font-size: 14px;
    font-weight: 900;
    cursor: pointer;

    transition: 0.2s;
}

.mode-btn:hover {
    background: #24314A;
}

.mode-btn.active {
    background: var(--orange);
    color: var(--bg);
    border-color: var(--orange);
}

@media (max-width: 750px) {
    .mode-btn {
        padding: 12px 8px;
        font-size: 11px;
    }
}

/* ELIMINATED / NON-CONTENDING DRIVERS */

.noncontender-section {
    margin-top: 65px;
}

.noncontender-section[hidden] {
    display: none;
}

.noncontender-section h2 {
    font-size: clamp(25px, 4vw, 35px);
    color: var(--white);
}

.noncontender-section .full-standings-table
tbody tr:first-child {
    background: transparent;
}

.noncontender-section .full-standings-table
tbody tr:first-child td:first-child {
    color: var(--white);
}

/* ================================= */
/* PLAYOFF ROUND SELECTOR            */
/* ================================= */

.playoff-round-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -15px 0 30px;
}

.playoff-round-selector[hidden] {
    display: none;
}

/* ROUND BUTTONS */

.playoff-round-btn {
    background-color: var(--card);
    color: var(--white);

    border: 1px solid #344158;
    border-radius: 5px;

    padding: 12px 18px;

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;
    transition: 0.2s;
}

/* SELECTED ROUND */

.playoff-round-btn.active {
    background-color: var(--orange);
    color: var(--bg);
    border-color: var(--orange);
}

/* HOVER */

.playoff-round-btn:hover:not(.active):not(:disabled) {
    background-color: #24314A;
    border-color: var(--green);
}

/* FUTURE ROUNDS */

.playoff-round-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* MOBILE */

@media (max-width: 750px) {

    .playoff-round-selector {
        gap: 8px;
    }

    .playoff-round-btn {
        padding: 10px 12px;
        font-size: 11px;
    }
}

/* ================================= */
/* FULL SCHEDULES PAGE               */
/* ================================= */

.schedule-page {
    min-height: 100vh;
    padding: 65px 8%;
    background-color: var(--bg);
}

/* PAGE HEADING */

.schedule-page-heading {
    margin-bottom: 35px;
}

.schedule-page-heading h1 {
    font-size: clamp(34px, 5vw, 55px);
    font-weight: 900;
    margin: 12px 0;
}

/* DIVISION SELECTOR */

.schedule-page-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 35px;
}

.schedule-tab {
    padding: 20px 12px;
    background-color: var(--card);
    color: var(--white);

    border: 1px solid #344158;
    border-bottom: 3px solid transparent;
    border-radius: 5px;

    font-size: 16px;
    font-weight: 900;

    cursor: pointer;
    transition: background-color 0.2s;
}

.schedule-tab:hover {
    background-color: #24314A;
}

.schedule-tab.active {
    background-color: #253149;
}

.schedule-tab[data-division="D1"].active {
    border-bottom-color: var(--orange);
}

.schedule-tab[data-division="D2"].active {
    border-bottom-color: var(--green);
}

.schedule-tab[data-division="D3"].active {
    border-bottom-color: var(--yellow);
}

/* SELECTED DIVISION */

.schedule-page-info {
    margin-bottom: 30px;
}

.schedule-page-info h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.schedule-page-info p {
    color: var(--muted);
    font-size: 14px;
}

/* CHAMPIONSHIP ROUNDS */

.schedule-round {
    margin-bottom: 30px;
    background-color: var(--card);

    border: 1px solid #344158;
    border-radius: 8px;
    overflow: hidden;
}

.schedule-round-heading {
    padding: 20px 25px;
    background-color: #202B42;
    border-left: 4px solid var(--orange);
}

.schedule-round-heading h3 {
    font-size: 18px;
    font-weight: 900;
}

/* ================================= */
/* INDIVIDUAL RACE CARDS             */
/* ================================= */

.schedule-race {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    gap: 25px;

    min-height: 110px;
    padding: 22px 25px;

    background-color: transparent;
    border-top: 1px solid #344158;

    transition: background-color 0.3s ease;
}

.schedule-race:hover {
    background-color: #202D46;
}

/* KEEP TEXT ABOVE THE TRACK IMAGE */

.schedule-race-number,
.schedule-race-details,
.schedule-race-status {
    position: relative;
    z-index: 2;
}

/* RACE NUMBER */

.schedule-race-number {
    min-width: 65px;

    font-size: 14px;
    font-weight: 900;
    color: var(--orange);
}

/* RACE INFORMATION */

.schedule-race-details {
    flex: 1;
    min-width: 0;
}

.schedule-race-details h4 {
    font-size: 19px;
    font-weight: 900;
    margin-bottom: 8px;
}

.schedule-race-details p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* RACE STATUS */

.schedule-race-status {
    padding: 7px 12px;
    border-radius: 4px;

    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;

    background-color: #3A2B1C;
    color: var(--orange);
}

.schedule-race-status.completed {
    background-color: #163A2B;
    color: #5DE38D;
}

/* ================================= */
/* TRACK MAP HOVER IMAGES            */
/* ================================= */

.schedule-race-map {
    position: absolute;

    top: 50%;
    right: 135px;

    width: 35%;
    height: 90%;

    object-fit: contain;
    object-position: center;

    /* Change black track outlines to white */
    filter: brightness(0) invert(1);

    opacity: 0;

    transform: translateY(-50%) scale(1.05);

    transition:
        opacity 0.35s ease,
        transform 0.45s ease;

    pointer-events: none;
    z-index: 1;
}

/* SHOW MAP ONLY WHEN HOVERED */

.schedule-race:hover .schedule-race-map {
    opacity: 0.40;
    transform: translateY(-50%) scale(1);
}

/* EMPTY ROUNDS */

.schedule-round-empty {
    padding: 25px;
    color: var(--muted);
    font-size: 14px;
}

/* ================================= */
/* MOBILE SUPPORT                    */
/* ================================= */

@media (max-width: 750px) {

    .schedule-page {
        padding: 45px 5%;
    }

    .schedule-page-tabs {
        gap: 8px;
    }

    .schedule-tab {
        padding: 15px 5px;
        font-size: 12px;
    }

    .schedule-race {
        flex-wrap: wrap;
        gap: 12px;
        padding: 18px;
    }

    .schedule-race-details {
        flex-basis: calc(100% - 80px);
    }

    .schedule-race-details h4 {
        font-size: 17px;
    }

    .schedule-race-status {
        margin-left: auto;
    }

    .schedule-race-map {
        right: 12px;
        width: 45%;
        opacity: 0;
    }

    .schedule-round-heading {
        padding: 16px 20px;
    }

}

/* ================================= */
/* NON-POINTS SCHEDULE EVENTS        */
/* ================================= */

.non-points-race {
    background-color: rgba(246, 207, 53, 0.025);
}

.non-points-race .schedule-race-number {
    color: var(--yellow);
}

.non-points-race .schedule-race-status {
    background-color: #35311E;
    color: var(--yellow);
}
.track-image {
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: contain;
}

/* ================================= */
/* RACE RESULTS PAGE                 */
/* ================================= */

.results-page {
    min-height: 100vh;
    padding: 65px 8%;
    background: var(--bg);
}

.results-page-heading {
    margin-bottom: 35px;
}

.results-page-heading h1 {
    font-size: clamp(34px, 5vw, 55px);
    font-weight: 900;
    margin: 12px 0;
}

/* DIVISION BUTTONS */

.results-division-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.results-tab {
    padding: 20px 12px;
    background: var(--card);
    color: var(--white);

    border: 1px solid #344158;
    border-bottom: 3px solid transparent;
    border-radius: 5px;

    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.results-tab:hover {
    background: #24314A;
}

.results-tab.active {
    background: #253149;
}

.results-tab[data-division="D1"].active {
    border-bottom-color: var(--orange);
}

.results-tab[data-division="D2"].active {
    border-bottom-color: var(--green);
}

.results-tab[data-division="D3"].active {
    border-bottom-color: var(--yellow);
}

/* TWO-COLUMN LAYOUT */

.results-layout {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(0, 2.5fr);
    gap: 25px;
    align-items: start;
}

/* COMPLETED RACE LIST */

.results-sidebar {
    background: var(--card);
    border: 1px solid #344158;
    border-radius: 8px;
    padding: 22px;
}

.results-sidebar h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

#results-race-count {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 20px;
}

.results-race-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 650px;
    overflow-y: auto;
}

.results-race-option {
    width: 100%;
    padding: 14px;
    text-align: left;

    background: #202B42;
    color: var(--white);
    border: 1px solid #344158;
    border-radius: 5px;

    cursor: pointer;
    transition: 0.2s;
}

.results-race-option:hover {
    background: #2A3A56;
}

.results-race-option.active {
    border-color: var(--orange);
    background: #29354A;
}

.results-race-option strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.results-race-option span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

/* SELECTED RACE */

.results-main {
    min-width: 0;
}

.results-race-heading {
    padding: 26px;
    margin-bottom: 20px;

    background: var(--card);
    border-top: 4px solid var(--orange);
    border-radius: 8px;
}

.results-race-heading h2 {
    font-size: clamp(23px, 3vw, 32px);
    margin: 10px 0;
}

#results-race-details {
    color: var(--muted);
    font-size: 14px;
}

/* STAGE RESULTS */

.results-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.results-stage-panel {
    padding: 22px;
    background: var(--card);
    border: 1px solid #344158;
    border-radius: 8px;
}

.results-stage-panel h3 {
    font-size: 17px;
    margin-bottom: 12px;
}

.results-stage-panel p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* FINAL CLASSIFICATION */

.results-final-panel {
    padding: 22px;
    background: var(--card);
    border: 1px solid #344158;
    border-radius: 8px;
}

.results-final-panel h3 {
    font-size: 20px;
    margin-bottom: 18px;
}

/* MOBILE */

@media (max-width: 850px) {

    .results-page {
        padding: 45px 5%;
    }

    .results-layout {
        grid-template-columns: 1fr;
    }

    .results-division-tabs {
        gap: 8px;
    }

    .results-tab {
        padding: 15px 6px;
        font-size: 12px;
    }

    .results-race-list {
        max-height: 230px;
    }

    .results-stage-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================= */
/* LIVE STAGE RESULTS TABLES         */
/* ================================= */

.results-stage-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.results-stage-table th {
    padding: 10px 8px;

    color: #AAB6CB;
    font-size: 11px;
    font-weight: 800;

    border-bottom: 1px solid #344158;
}

.results-stage-table td {
    padding: 11px 8px;

    color: var(--white);
    font-size: 13px;

    border-bottom: 1px solid #29364D;
}

.results-stage-table th:last-child,
.results-stage-table td:last-child {
    text-align: right;
}

.results-stage-table tbody tr:first-child td:first-child {
    color: var(--yellow);
    font-weight: 900;
}

/* CANCELED RACE STATUS */

.schedule-race-status.canceled {
    background-color: #43252B;
    color: #FF8383;
}

/* ================================= */
/* EXHIBITION WINNER CARD            */
/* ================================= */

.results-exhibition-winner {
    grid-column: 1 / -1;

    background: #151D30;
    border: 1px solid #344158;
    border-top: 4px solid #F6CF35;
    border-radius: 8px;

    padding: 32px;
    text-align: center;
}

.results-winner-label {
    color: #F6CF35;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1.5px;

    margin-bottom: 15px;
}

.results-exhibition-winner h3 {
    color: #F4F5F8;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 900;
}

.results-winner-team {
    color: #ADB8CA;
    font-size: 15px;
    margin-top: 8px;
}

.results-winner-note {
    color: #ADB8CA;
    font-size: 13px;
    line-height: 1.6;

    margin-top: 25px;
    padding-top: 20px;

    border-top: 1px solid #344158;
}

.results-final-panel[hidden] {
    display: none;
}

/* ================================= */
/* RACE ACHIEVEMENT HIGHLIGHTS       */
/* ================================= */

.results-race-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 14px;
    margin-top: 24px;
}

.results-race-highlights[hidden] {
    display: none;
}

.results-highlight-card {
    min-width: 0;

    padding: 20px;
    background: #202B42;

    border-radius: 6px;
    border-top: 3px solid transparent;
}

.results-highlight-winner {
    border-top-color: #F6CF35;
}

.results-highlight-pole {
    border-top-color: #F58A18;
}

.results-highlight-fastlap {
    border-top-color: #28AC55;
}

.results-highlight-label {
    margin-bottom: 12px;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;

    color: #ADB8CA;
}

.results-highlight-winner .results-highlight-label {
    color: #F6CF35;
}

.results-highlight-pole .results-highlight-label {
    color: #F58A18;
}

.results-highlight-fastlap .results-highlight-label {
    color: #28AC55;
}

.results-highlight-card h3 {
    margin: 0;

    color: #F4F5F8;
    font-size: 17px;
    font-weight: 900;

    overflow-wrap: anywhere;
}

/* RACE WINNER IN FINAL CLASSIFICATION */

.results-winning-row {
    background: rgba(246, 207, 53, 0.09);
}

.results-winning-row td:first-child {
    color: #F6CF35;
    font-weight: 900;
}

/* MOBILE */

@media (max-width: 900px) {

    .results-race-highlights {
        grid-template-columns: 1fr;
    }

    .results-highlight-card {
        padding: 16px;
    }
}

/* ================================= */
/* CLICKABLE COMPLETED RACE CARDS    */
/* ================================= */

a.schedule-race {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.schedule-race:hover {
    border-color: #F58A18;
}

a.schedule-race:focus-visible {
    outline: 2px solid #F58A18;
    outline-offset: 3px;
}

/* UPCOMING AND CANCELED RACES */

div.schedule-race {
    cursor: default;
}

/* ========================================= */
/* TEAMS AND DRIVERS PAGE                    */
/* ========================================= */

.teams-page {
    min-height: 100vh;
    padding: 65px 8%;
    background: #080D1D;
}

.teams-page-heading {
    margin-bottom: 35px;
}

.teams-page-heading h1 {
    font-size: clamp(34px, 5vw, 55px);
    font-weight: 900;
    margin: 12px 0;
}

/* DIVISION TABS */

.teams-division-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 35px;
}

.teams-tab {
    padding: 20px 12px;
    background: #151D30;
    color: #F4F5F8;
    border: 1px solid #344158;
    border-bottom: 3px solid transparent;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.teams-tab:hover {
    background: #24314A;
}

.teams-tab.active {
    background: #253149;
}

.teams-tab[data-division="D1"].active {
    border-bottom-color: #F58A18;
}

.teams-tab[data-division="D2"].active {
    border-bottom-color: #28AC55;
}

.teams-tab[data-division="D3"].active {
    border-bottom-color: #F6CF35;
}

/* DIVISION SUMMARY */

.teams-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

.teams-summary h2 {
    color: #F4F5F8;
    font-size: 22px;
}

#teams-count {
    color: #ADB8CA;
    font-size: 12px;
    font-weight: 700;
}

/* TEAM DIRECTORY */

.teams-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.team-directory-card {
    background: #151D30;
    border: 1px solid #344158;
    border-radius: 8px;
    overflow: hidden;
}

.team-directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;

    padding: 25px;
    border-bottom: 1px solid #344158;
}

.team-directory-header h2 {
    color: #F4F5F8;
    font-size: 24px;
    font-weight: 900;
}

.team-directory-count {
    color: #ADB8CA;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.team-directory-roster {
    padding: 12px 25px;
}

/* INDIVIDUAL DRIVER */

.team-driver-card {
    display: grid;

    grid-template-columns:
        90px
        minmax(0, 1fr)
        minmax(180px, 36%);

    gap: 25px;
    align-items: center;
    padding: 22px 0;
}

.team-driver-card + .team-driver-card {
    border-top: 1px solid #344158;
}

/* ROBLOX AVATAR */

.team-driver-avatar {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background: #253149;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.team-driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

/* DRIVER INFORMATION */

.team-driver-number {
    color: #F58A18;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 5px;
}

.team-driver-details h3 {
    color: #F4F5F8;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 15px;
    overflow-wrap: anywhere;
}

.team-driver-best-label {
    color: #ADB8CA;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.team-driver-best {
    color: #F4F5F8;
    font-size: 14px;
    font-weight: 600;
}

/* CAR IMAGE */

.team-driver-car {
    height: 135px;
    border-radius: 8px;
    background: #202B42;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.team-driver-car img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

/* IMAGE PLACEHOLDERS */

.team-image-placeholder {
    color: #ADB8CA;
    font-size: 12px;
    font-weight: 800;
}

.team-driver-avatar .team-image-placeholder {
    font-size: 33px;
}

.image-loaded img {
    display: block;
}

.image-loaded .team-image-placeholder {
    display: none;
}

.teams-empty {
    background: #151D30;
    padding: 30px;
    color: #ADB8CA;
    border-radius: 8px;
}

/* MOBILE */

@media (max-width: 750px) {

    .teams-page {
        padding: 45px 5%;
    }

    .teams-division-tabs {
        gap: 8px;
    }

    .teams-tab {
        font-size: 12px;
        padding: 15px 5px;
    }

    .teams-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-directory-header {
        padding: 18px;
    }

    .team-directory-header h2 {
        font-size: 19px;
    }

    .team-directory-roster {
        padding: 10px 18px;
    }

    .team-driver-card {
        grid-template-columns: 65px minmax(0, 1fr);
        gap: 15px;
    }

    .team-driver-avatar {
        width: 65px;
        height: 65px;
    }

    .team-driver-details h3 {
        font-size: 20px;
    }

    .team-driver-car {
        grid-column: 1 / -1;
        height: 135px;
    }
}

/* ENSURE LOADED DRIVER IMAGES ARE VISIBLE */

.team-driver-avatar.image-loaded img,
.team-driver-car.image-loaded img {
    display: block;
}

.team-driver-avatar.image-loaded .team-image-placeholder,
.team-driver-car.image-loaded .team-image-placeholder {
    display: none;
}

/* ========================================= */
/* TOUCHSCREEN TRACK MAPS                    */
/* ========================================= */

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

    .schedule-race-map {
        opacity: 0.25;
        transform: translateY(-50%) scale(1);
    }

}
