/* ============================================================
   F1 DUELO — Folha de estilos única (todas as páginas)
   Seções: 1) Base/compartilhado  2) Index (Duelo)
           3) Ranking  4) Drivers  5) Driver (perfil)
   ============================================================ */

/* ── 1. BASE & COMPARTILHADO ── */
/* ============================================================
   F1 DUELO — Estilos compartilhados entre todas as páginas
   (reset, tokens de cor, header, navegação, wrapper de página)
   ============================================================ */

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

:root {
    --black: #0D0D0D;
    --dark: #141414;
    --panel: #1C1C1C;
    --border: #2A2A2A;
    --red: #E8002D;
    --white: #F0F0F0;
    --gray: #777;
}

html,
body {
    height: 100%;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* ── HEADER ── */
header {
    width: 100%;
    padding: 0 28px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--black);
    z-index: 100;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.logo .fast {
    color: var(--red);
}

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

.logo .elo {
    color: var(--red);
}

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

nav a {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gray);
    padding: 6px 14px;
    border: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

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

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

/* ── PAGE WRAPPER (ranking, drivers, driver) ── */
.page {
    width: 100%;
    max-width: 960px;
    padding: 40px 20px 60px;
    flex: 1;
}

.page-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 24px;
}

/* TODO: VOTING LOCKED, but maybe not enough to complete the voting lock feature. */
.driver-card:not(:disabled):hover,
.driver-card:not(:disabled):focus-visible {
    border-color: var(--red);
    transform: scale(1.012);
    z-index: 2;
}

.driver-card:not(:disabled):active {
    transform: scale(0.98);
}

.driver-card:disabled {
    cursor: wait;
    opacity: 0.7;
}

/* Configuration button for cookie preferences modal */
footer {
    width: 100%;
    min-height: 48px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    padding: 12px 20px;

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

    font-size: 0.62rem;
    color: var(--gray);
}

.cookie-preferences-link {
    appearance: none;

    background: none;
    border: none;
    padding: 0;

    font-family: 'Inter', sans-serif;
    font-size: inherit;
    color: var(--gray);

    cursor: pointer;

    transition: color 0.15s;
}

.cookie-preferences-link:hover {
    color: var(--white);
}

.cookie-preferences-link:focus-visible {
    color: var(--white);
    outline: 1px solid var(--red);
    outline-offset: 4px;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
    header {
        padding: 0 16px;
        height: 52px;
    }

    .logo {
        font-size: 0.92rem;
    }

    nav a {
        font-size: 0.62rem;
        padding: 6px 10px;
    }

    .page {
        padding: 24px 12px 48px;
    }
}

/* ── 2. PÁGINA: INDEX (Duelo) ── */
/* override local: nesta página o conteúdo não rola */

/* TODO: Disable scrolling only on the duel page if necessary. */

/* ── ARENA ── */
.arena {
    width: 100%;
    max-width: 960px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 20px;
}

.question {
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gray);
    flex-shrink: 0;
}

/* ── DUEL (desktop/landscape: lado a lado) ── */
.duel {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: grid;

    /*
    grid-template-columns: 1fr 44px 1fr;
    align-items: stretch;
    */

    grid-template-columns: minmax(260px, 340px) 44px minmax(260px, 340px);
    justify-content: center;
    align-items: start;
}

/* ── CARD ── */
.driver-card {
    cursor: pointer;
    background: var(--panel);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    transition: border-color 0.15s, transform 0.15s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@keyframes flash-win {
    0% {
        border-color: var(--border);
    }

    35% {
        border-color: var(--red);
        box-shadow: 0 0 48px #6B001455;
    }

    100% {
        border-color: var(--border);
    }
}

@keyframes flash-lose {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }

    100% {
        opacity: 1;
    }
}

.driver-card.winner {
    animation: flash-win 0.6s ease forwards;
}

.driver-card.loser {
    animation: flash-lose 0.6s ease forwards;
}

.team-strip {
    width: 100%;
    height: 4px;
    flex-shrink: 0;
}

/* foto cresce para ocupar todo espaço entre faixa e legenda */
.driver-photo-wrap {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--dark);
}

.driver-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(15%) contrast(1.05);
    transition: filter 0.2s;
    display: block;
}

.driver-card:hover .driver-photo-wrap img {
    filter: grayscale(0%) contrast(1.1);
}

.driver-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--border);
}

/* legenda: altura fixa */
.driver-info {
    width: 100%;
    padding: 12px 16px 14px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.driver-number {
    font-family: 'Orbitron', monospace;
    font-size: 0.56rem;
    color: #aaa;
    letter-spacing: 0.1em;
}

.driver-name {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.25;
    color: #f0f0f0;
}

.driver-team {
    font-size: 0.64rem;
    color: #999;
    margin-top: 1px;
}

/* ── VS (vertical em desktop) ── */
.vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.vs-line {
    width: 1px;
    flex: 1;
    background: var(--border);
}

.vs-text {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 0.78rem;
    color: var(--red);
    padding: 10px 0;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    flex-shrink: 0;
}

/* ── MOBILE PORTRAIT (≤600px): cards um abaixo do outro ── */
@media (max-width: 600px) {
    header {
        padding: 0 16px;
        height: 52px;
    }

    .logo {
        font-size: 0.92rem;
    }

    nav a {
        font-size: 0.62rem;
        padding: 6px 10px;
    }

    .arena {
        overflow: hidden;
        padding: 12px 12px 12px;
        gap: 10px;
    }

    /* duel vira coluna */
    .duel {
        display: flex;
        flex-direction: column;
        width: 100%;
        flex: 1;
        min-height: 0;
    }

    /* cada card ocupa metade da altura, layout interno horizontal */
    .driver-card {
        flex: 1;
        min-height: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: stretch;
    }

    .team-strip {
        width: 4px;
        height: auto;
        flex-shrink: 0;
    }

    .driver-photo-wrap {
        flex: unset;
        flex-shrink: 0;
        /* width: 36%; */
        width: 40%;
        height: 100%;
        min-height: unset;
    }

    .driver-info {
        flex: 1;
        padding: 10px 14px;
        justify-content: center;
        min-width: 0;
        gap: 4px;
    }

    .driver-number {
        font-size: 0.7rem;
    }

    .driver-name {
        font-size: 1.05rem;
    }

    .driver-team {
        font-size: 0.78rem;
    }

    /* VS vira horizontal */
    .vs-divider {
        flex-direction: row;
        flex-shrink: 0;
        height: 26px;
        width: 100%;
    }

    .vs-line {
        flex: 1;
        width: auto;
        height: 1px;
        min-height: unset;
    }

    .vs-text {
        writing-mode: horizontal-tb;
        padding: 0 10px;
        font-size: 0.64rem;
    }
}

/* ── 3. PÁGINA: RANKING ── */
/* ── PAGE ── */
.page {
    width: 100%;
    max-width: 960px;
    padding: 40px 20px 60px;
    flex: 1;
}

/* ── TÍTULO ── */
.page-title {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    text-align: center;
    margin-bottom: 36px;
}

.page-title span {
    color: var(--red);
}

/* ── GRID DE CORRIDA ── */
.grid-track {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

/* linha central tracejada */
.grid-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(to bottom,
            var(--border) 0px, var(--border) 8px,
            transparent 8px, transparent 16px);
    opacity: 0.35;
    pointer-events: none;
}

.grid-row {
    display: flex;
}

.grid-row.left {
    justify-content: flex-start;
}

.grid-row.right {
    justify-content: flex-end;
}

/* ── CARD ── */
.grid-card {
    width: clamp(280px, 48%, 440px);
    background: var(--panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.grid-card:hover {
    border-color: #3d3d3d;
}

/* faixa de posição */
.pos-strip {
    width: 56px;
    flex-shrink: 0;
    background: var(--dark);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 0;
}

.pos-number {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--white);
}

.pos-number.p1 {
    color: #FFD700;
    font-size: 1.75rem;
}

.pos-number.p2 {
    color: #C0C0C0;
    font-size: 1.6rem;
}

.pos-number.p3 {
    color: #CD7F32;
    font-size: 1.55rem;
}

.pos-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* foto — maior */
.card-photo {
    width: 110px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--dark);
}

.card-photo img {
    /* Height is now proportional to width, so that the image is always square. */
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(15%) contrast(1.05);
    transition: filter 0.2s;
}

.grid-card:hover .card-photo img {
    filter: grayscale(0%) contrast(1.1);
}

.card-photo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--border);
}

/* info */
.card-info {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}

.card-number {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    color: #aaa;
    letter-spacing: 0.1em;
}

.card-name {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-team {
    font-size: 0.72rem;
    color: #999;
    margin-top: 2px;
}

.card-elo {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.elo-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
}

.elo-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 900;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
    .page {
        padding: 24px 12px 48px;
    }

    .page-title {
        font-size: 0.82rem;
        margin-bottom: 24px;
        letter-spacing: 0.05em;
    }

    .grid-track::before {
        display: none;
    }

    .grid-row {
        justify-content: stretch !important;
    }

    .grid-card {
        width: 100%;
    }

    .card-photo {
        width: 90px;
    }

    .pos-strip {
        width: 46px;
    }

    .pos-number {
        font-size: 1.2rem;
    }

    .pos-number.p1 {
        font-size: 1.4rem;
    }

    .pos-number.p2 {
        font-size: 1.3rem;
    }

    .pos-number.p3 {
        font-size: 1.25rem;
    }

    .card-name {
        font-size: 0.85rem;
    }

    .card-number {
        font-size: 0.62rem;
    }

    .card-team {
        font-size: 0.68rem;
    }

    .elo-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    .card-photo {
        width: 72px;
    }

    .card-name {
        font-size: 0.75rem;
    }
}

/* ── 4. PÁGINA: DRIVERS ── */
/* ── GRID FLEX ── */
.dlist-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ── DRIVER CARD ── */
.dlist-card {
    flex: 1 1 200px;
    max-width: 240px;
    background: var(--panel);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, transform 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.dlist-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-3px);
}

.dlist-team-bar {
    height: 3px;
    width: 100%;
}

.dlist-photo-wrap {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--dark);
}

.dlist-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(10%) contrast(1.05);
    transition: filter 0.2s, transform 0.2s;
}

.dlist-card:hover .dlist-photo-wrap img {
    filter: grayscale(0%) contrast(1.1);
    transform: scale(1.03);
}

.dlist-photo-fallback2 {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    color: var(--border);
}

.dlist-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dlist-number {
    font-family: 'Orbitron', monospace;
    font-size: 0.56rem;
    color: var(--gray);
    letter-spacing: 0.1em;
}

.dlist-name {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.3;
}

.dlist-team {
    font-size: 0.64rem;
    color: var(--gray);
    margin-top: 1px;
}

.dlist-stats {
    margin-top: 10px;
    display: flex;
    gap: 14px;
}

.dlist-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dlist-stat-label {
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
}

.dlist-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 0.88rem;
    font-weight: 700;
}

/* ── MOBILE ── */
@media (max-width: 480px) {
    .dlist-grid {
        gap: 10px;
    }

    .dlist-card {
        flex: 1 1 140px;
        max-width: 180px;
    }

    .dlist-name {
        font-size: 0.7rem;
    }

    .dlist-info {
        padding: 10px 10px 12px;
    }
}

@media (max-width: 340px) {
    .dlist-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ── 5. PÁGINA: DRIVER (perfil individual) ── */
/* ── PAGE ── */
.page {
    width: 100%;
    max-width: 900px;
    padding: 40px 20px 60px;
    flex: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.15s;
}

.back-link:hover {
    color: var(--white);
}

/* ── TÍTULO: nome do piloto ── */
.driver-title {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    letter-spacing: 0.02em;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 6px;
}

.driver-subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.driver-team-name {
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.02em;
}

.driver-number-badge {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--red);
    letter-spacing: 0.05em;
}

/* ── BOX PRINCIPAL: foto 20% / info 80% ── */
.profile-box {
    width: 100%;
    display: flex;
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--border);
    overflow: hidden;
}

.profile-photo {
    width: 20%;
    flex-shrink: 0;
    min-width: 140px;
    background: var(--dark);
    overflow: hidden;
    position: relative;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(10%) contrast(1.05);
}

.profile-photo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--border);
}

.profile-info {
    width: 80%;
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* biografia */
.bio-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #cfcfcf;
}

/* stats grid */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
}

.profile-stat-value {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--white);
}

.profile-stat-value.elo {
    color: var(--accent, var(--red));
}

/* ── MOBILE ── */
@media (max-width: 700px) {
    .page {
        padding: 24px 14px 48px;
    }

    .driver-title {
        font-size: clamp(1.3rem, 7vw, 1.8rem);
    }

    /* box vira coluna: foto acima, info abaixo */
    .profile-box {
        flex-direction: column;
    }

    .profile-photo {
        width: 100%;
        min-width: unset;
        aspect-ratio: 16/10;
    }

    .profile-info {
        width: 100%;
        padding: 22px 18px;
        gap: 20px;
    }

    .bio-text {
        font-size: 0.85rem;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

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

    .profile-stat-value {
        font-size: 1rem;
    }
}

/* ============================================================
   ABOUT / PRIVACY
   ============================================================ */

.legal-page {
    width: 100%;
    max-width: 900px;
    padding: 40px 20px 60px;
    flex: 1;
}

.legal-page h1 {
    font-family: 'Orbitron', monospace;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--white);
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray);
    margin-bottom: 32px;
}

.legal-page section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.legal-page section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-page h2 {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.03em;
    color: var(--white);
    margin-bottom: 10px;
}

.legal-page p {
    max-width: 780px;
    margin-bottom: 10px;

    font-size: 0.82rem;
    line-height: 1.7;

    color: #bcbcbc;
}

.legal-page ul {
    max-width: 780px;
    padding-left: 18px;
    margin-top: 8px;
}

.legal-page li {
    padding-left: 4px;
    margin-bottom: 6px;

    font-size: 0.82rem;
    line-height: 1.6;

    color: #bcbcbc;
}

.legal-page strong {
    color: var(--white);
}


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

footer a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.15s;
}

footer a:hover {
    color: var(--white);
}

footer a:focus-visible {
    color: var(--white);
    outline: 1px solid var(--red);
    outline-offset: 4px;
}

.legal-email {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-email:hover {
    color: #c1121f;
    border-bottom-color: #c1121f;
}

/* ============================================================
   ERROR PAGES
   ============================================================ */

.error-page {
    width: 100%;
    max-width: 700px;
    padding: 80px 20px;
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.error-code {
    font-family: 'Orbitron', monospace;
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 900;
    line-height: 1;

    color: var(--red);

    margin-bottom: 20px;
}

.error-page h1 {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;

    color: var(--white);

    margin-bottom: 14px;
}

.error-page p {
    max-width: 480px;

    font-size: 0.82rem;
    line-height: 1.6;

    color: var(--gray);

    margin-bottom: 30px;
}

.error-button {
    display: inline-block;

    padding: 11px 18px;

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

    font-family: 'Orbitron', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;

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

    transition:
        border-color 0.15s,
        color 0.15s;
}

.error-button:hover {
    border-color: var(--red);
    color: var(--red);
}

.error-button:focus-visible {
    outline: 1px solid var(--red);
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .error-page {
        padding: 56px 20px;
    }

    .error-page h1 {
        font-size: 1rem;
    }
}

/* ============================================================
   COMING SOON
   ============================================================ */

.coming-soon-body {
    min-height: 100vh;
    background: var(--black);
}

.coming-soon {
    width: 100%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 32px 20px;
}

.coming-soon-logo {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: clamp(1.4rem, 4vw, 2rem);
    letter-spacing: 0.1em;

    text-decoration: none;

    margin-bottom: 48px;
}

.coming-soon-logo .fast,
.coming-soon-logo .elo {
    color: var(--red);
}

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


/* ── STARTING LIGHTS ── */

.starting-lights {
    display: flex;
    gap: clamp(12px, 2.5vw, 22px);

    padding: 20px 24px;

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

    margin-bottom: 38px;
}

.starting-light {
    width: clamp(34px, 7vw, 56px);
    aspect-ratio: 1;

    border-radius: 50%;

    background: #270008;
    border: 2px solid #38000b;

    box-shadow: inset 0 0 10px #000;

    animation: starting-light-cycle 5s infinite;
}

.light-1 {
    animation-delay: 0s;
}

.light-2 {
    animation-delay: 0.5s;
}

.light-3 {
    animation-delay: 1s;
}

.light-4 {
    animation-delay: 1.5s;
}

.light-5 {
    animation-delay: 2s;
}

.driver-elo-chart {
    margin-top: 1.5rem;
    height: 280px;
}

#driverEloChart {
    width: 100%;
    height: 100%;
}

@keyframes starting-light-cycle {

    0%,
    9% {
        background: #270008;
        border-color: #38000b;
        box-shadow: inset 0 0 10px #000;
    }

    10%,
    69% {
        background: var(--red);
        border-color: #ff274f;

        box-shadow:
            0 0 12px rgba(232, 0, 45, 0.75),
            0 0 28px rgba(232, 0, 45, 0.35);
    }

    70%,
    100% {
        background: #270008;
        border-color: #38000b;
        box-shadow: inset 0 0 10px #000;
    }
}


/* ── TEXT ── */

.coming-soon-tagline {
    font-family: 'Orbitron', monospace;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-weight: 700;

    letter-spacing: 0.22em;

    color: var(--white);

    margin-bottom: 12px;
}

.coming-soon-text {
    font-size: 0.58rem;

    letter-spacing: 0.2em;
    text-transform: uppercase;

    color: var(--gray);
}


/* ── MOBILE ── */

@media (max-width: 600px) {

    .coming-soon-logo {
        margin-bottom: 38px;
    }

    .starting-lights {
        padding: 16px;
        gap: 10px;

        margin-bottom: 32px;
    }

}

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

@media (max-width: 600px) {
    .legal-page {
        padding: 28px 16px 48px;
    }

    .legal-page h1 {
        font-size: 1.3rem;
    }

    .legal-page h2 {
        font-size: 0.82rem;
    }

    .legal-page p,
    .legal-page li {
        font-size: 0.78rem;
    }

    .legal-page section {
        margin-top: 24px;
        padding-top: 20px;
    }

    footer {
        flex-wrap: wrap;
        gap: 10px 16px;
    }
}

/* ── MOBILE: ADSENSE ANCHOR ── */
@media (max-width: 600px) {
  body.adsense-anchor-active {
    padding-bottom: 90px;
  }
}