/* ========================================
   HYPERDRIVE LEAGUE
   Página Resultados
======================================== */


/* ========================================
   PÁGINA
======================================== */

.results-page {
    min-height: 100vh;
    background: #08090b;
}


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

.results-page-hero {
    position: relative;

    min-height: 380px;

    display: flex;
    align-items: flex-end;

    padding: 90px 6% 70px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 82% 30%,
            rgba(255, 213, 0, 0.10),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #0d0f12 0%,
            #08090b 70%
        );

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}


.results-page-hero::before {
    content: "";

    position: absolute;

    left: 0;
    top: 18%;

    width: 5px;
    height: 64%;

    background: var(--yellow);
}


.results-page-hero::after {
    content: "R";

    position: absolute;

    right: 5%;
    bottom: -70px;

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

    font-size: clamp(13rem, 27vw, 25rem);
    font-weight: 900;

    line-height: 1;

    pointer-events: none;
}


.results-page-hero-content {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
}


.results-page-label {
    display: block;

    margin-bottom: 15px;

    color: var(--yellow);

    font-size: 0.76rem;
    font-weight: 900;

    letter-spacing: 0.20em;
}


.results-page-hero h1 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 900;

    line-height: 0.85;
    letter-spacing: -0.065em;
}


.results-page-hero p {
    max-width: 620px;

    margin: 28px 0 0;

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

    font-size: 1rem;
    line-height: 1.75;
}


/* ========================================
   CONTENIDO
======================================== */

.results-page-content {
    padding: 70px 6% 110px;

    background:
        radial-gradient(
            circle at 15% 12%,
            rgba(255, 213, 0, 0.035),
            transparent 25%
        ),
        #08090b;
}


/* ========================================
   TABS
======================================== */

.results-page-tabs {
    max-width: 1200px;

    margin: 0 auto 30px;

    display: flex;

    gap: 8px;

    padding: 5px;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 11px;
}


.results-page-tab {
    flex: 1;

    min-height: 50px;

    padding: 0 20px;

    border: 0;
    border-radius: 8px;

    background: transparent;

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

    font-family: inherit;

    font-size: 0.74rem;
    font-weight: 900;

    letter-spacing: 0.10em;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}


.results-page-tab:hover {
    color: #ffffff;

    background: rgba(255, 255, 255, 0.04);
}


.results-page-tab.active {
    background: var(--yellow);

    color: #08090b;
}


/* ========================================
   LISTA
======================================== */

.results-page-list {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    display: grid;

    gap: 22px;
}


/* ========================================
   TARJETA DE RONDA
======================================== */

.results-round-card {
    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0.012)
        );

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

    border-radius: 15px;

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


.results-round-card:hover {
    border-color: rgba(255, 213, 0, 0.18);
}


.results-round-card.round-open {
    border-color: rgba(255, 213, 0, 0.22);
}


/* ========================================
   CABECERA DE RONDA
======================================== */

.results-round-header {
    min-height: 92px;

    display: grid;

    grid-template-columns:
        120px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 24px;

    padding: 0 30px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}


.results-round-number {
    color: var(--yellow);

    font-size: 0.72rem;
    font-weight: 900;

    letter-spacing: 0.13em;
}


.results-round-info h2 {
    margin: 0;

    color: #ffffff;

    font-size: 1.5rem;
    font-weight: 900;

    letter-spacing: -0.025em;
}


.results-round-info span {
    display: block;

    margin-top: 7px;

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

    font-size: 0.7rem;
    font-weight: 800;

    letter-spacing: 0.09em;
}


.results-round-tag {
    padding: 8px 12px;

    border: 1px solid rgba(255, 213, 0, 0.25);
    border-radius: 999px;

    background: rgba(255, 213, 0, 0.06);

    color: var(--yellow);

    font-size: 0.62rem;
    font-weight: 900;

    letter-spacing: 0.10em;
}


/* ========================================
   BLOQUES DE SESIÓN
======================================== */

.results-session-block {
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}


.results-session-block:first-of-type {
    border-top: 0;
}


.results-session-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 42px;

    padding: 0 24px;

    background: rgba(255, 255, 255, 0.018);

    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}


.results-session-label {
    display: inline-flex;
    align-items: center;

    min-height: 24px;

    padding: 0 9px;

    border-radius: 4px;

    background: rgba(255, 213, 0, 0.08);

    border: 1px solid rgba(255, 213, 0, 0.18);

    color: var(--yellow);

    font-size: 0.58rem;
    font-weight: 900;

    letter-spacing: 0.11em;
}


.results-session-block[data-session-type="sprint"] .results-session-label {
    background: rgba(255, 255, 255, 0.045);

    border-color: rgba(255, 255, 255, 0.12);

    color: rgba(255, 255, 255, 0.78);
}


.results-session-details {
    padding-top: 24px;

    border-top: 1px solid rgba(255, 255, 255, 0.06);
}


.results-session-details:first-child {
    border-top: 0;
}


.results-session-details > .results-full-title {
    padding: 0 24px;
}


.results-session-details[data-session-type="sprint"] {
    background: rgba(255, 255, 255, 0.01);
}


/* ========================================
   VUELTA RÁPIDA
======================================== */

.results-fastest-driver-name {
    color: #b56cff !important;
}


/* ========================================
   PODIO
======================================== */

.results-podium-grid {
    display: grid;

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

    gap: 1px;

    background: rgba(255, 255, 255, 0.055);
}


.results-podium-card {
    position: relative;

    min-height: 230px;

    overflow: hidden;

    display: flex;
    align-items: flex-end;

    padding: 22px;

    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(255, 255, 255, 0.05),
            transparent 45%
        ),
        #0b0c0f;
}


.results-podium-card.is-winner {
    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(255, 213, 0, 0.10),
            transparent 48%
        ),
        linear-gradient(
            180deg,
            #11110d,
            #0b0c0f
        );
}


.results-podium-position {
    position: absolute;

    left: 18px;
    top: 16px;

    z-index: 4;

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

    font-size: 2.2rem;
    font-weight: 900;

    letter-spacing: -0.07em;
}


.results-podium-card.is-winner .results-podium-position {
    color: var(--yellow);
}


.results-podium-photo {
    position: absolute;

    left: 50%;
    top: 4px;

    width: 160px;
    height: 175px;

    overflow: hidden;

    transform: translateX(-50%);
}


.results-podium-photo img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    transform: scale(1.45);
    transform-origin: 50% 12%;
}


.results-podium-photo.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}


.results-podium-photo.no-photo::after {
    content: attr(data-initial);

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

    font-size: 4rem;
    font-weight: 900;
}


.results-podium-content {
    position: relative;

    z-index: 5;

    width: 100%;

    padding-top: 110px;
}


.results-podium-content strong {
    display: block;

    overflow: hidden;

    color: #ffffff;

    font-size: 1.05rem;
    font-weight: 900;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.results-podium-content span {
    display: block;

    margin-top: 5px;

    overflow: hidden;

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

    font-size: 0.74rem;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.results-podium-bottom {
    margin-top: 13px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;
}


.results-podium-points {
    color: rgba(255, 255, 255, 0.78);

    font-size: 0.78rem;
    font-weight: 900;
}


.results-podium-card.is-winner .results-podium-points {
    color: var(--yellow);
}


.results-podium-fastest {
    color: var(--yellow);

    font-size: 0.58rem;
    font-weight: 900;

    letter-spacing: 0.07em;
}


/* ========================================
   BOTÓN DESPLEGAR
======================================== */

.results-round-footer {
    padding: 18px 24px;

    display: flex;

    justify-content: center;

    border-top: 1px solid rgba(255, 255, 255, 0.055);
}


.results-round-expand {
    min-width: 260px;
    min-height: 44px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 0 20px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;

    background: rgba(255, 255, 255, 0.025);

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

    font-family: inherit;

    font-size: 0.68rem;
    font-weight: 900;

    letter-spacing: 0.09em;

    cursor: pointer;

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


.results-round-expand:hover,
.results-round-expand[aria-expanded="true"] {
    border-color: var(--yellow);

    background: var(--yellow);

    color: #08090b;
}


.results-expand-arrow {
    font-size: 0.9rem;
}


/* ========================================
   ZONA DESPLEGADA
======================================== */

.results-round-details {
    border-top: 1px solid rgba(255, 255, 255, 0.07);

    background: #090a0c;
}


.results-round-details[hidden] {
    display: none;
}


/* ========================================
   RESUMEN DE SESIÓN
======================================== */

.results-session-summary {
    display: grid;

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

    gap: 10px;

    padding: 24px;
}


.results-summary-item {
    min-height: 90px;

    padding: 16px;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 9px;
}


.results-summary-item span {
    display: block;

    margin-bottom: 10px;

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

    font-size: 0.58rem;
    font-weight: 900;

    letter-spacing: 0.11em;
}


.results-summary-item strong {
    display: block;

    color: #ffffff;

    font-size: 0.85rem;
    font-weight: 900;

    line-height: 1.35;
}


.results-summary-item.highlight strong {
    color: var(--yellow);
}


/* ========================================
   TABLA COMPLETA
======================================== */

.results-full-section {
    padding: 0 24px 26px;
}


.results-full-title {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 13px;
}


.results-full-title h3 {
    margin: 0;

    color: #ffffff;

    font-size: 0.8rem;
    font-weight: 900;

    letter-spacing: 0.09em;
}


.results-full-title span {
    color: rgba(255, 255, 255, 0.30);

    font-size: 0.62rem;
    font-weight: 800;

    letter-spacing: 0.07em;
}


.results-full-table-scroll {
    width: 100%;

    overflow-x: auto;

    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 10px;

    background: #0b0c0f;
}


.results-full-table {
    min-width: 1050px;
}


/* ========================================
   CABECERA TABLA
======================================== */

.results-full-header,
.results-full-row {
    display: grid;

    grid-template-columns:
        65px
        minmax(220px, 1.45fr)
        minmax(135px, 0.85fr)
        70px
        60px
        120px
        105px
        65px
        80px;

    align-items: center;
}


.results-full-header {
    min-height: 43px;

    padding: 0 14px;

    background: rgba(255, 255, 255, 0.035);

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

    font-size: 0.58rem;
    font-weight: 900;

    letter-spacing: 0.09em;

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}


.results-full-header span:nth-last-child(-n+6) {
    text-align: center;
}


/* ========================================
   BLOQUE PILOTO
======================================== */

.results-full-driver-block {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.results-full-driver-block:last-child {
    border-bottom: 0;
}


.results-full-driver-block.has-details .results-full-row {
    cursor: pointer;
}


.results-full-driver-block.has-details:hover .results-full-row,
.results-full-driver-block.has-details:focus .results-full-row,
.results-full-driver-block.has-details:focus-visible .results-full-row {
    background: rgba(255, 255, 255, 0.04);
}


.results-full-driver-block.has-details[aria-expanded="true"] .results-full-row {
    background:
        linear-gradient(
            90deg,
            rgba(255, 213, 0, 0.055),
            rgba(255, 255, 255, 0.018)
        );
}


.results-full-driver-block.has-details:focus,
.results-full-driver-block.has-details:focus-visible {
    outline: none;
}


.results-full-row {
    min-height: 66px;

    padding: 0 14px;

    transition: background 0.18s ease;
}


.results-full-row:hover {
    background: rgba(255, 255, 255, 0.025);
}


.results-full-driver-block:first-child .results-full-row {
    background:
        linear-gradient(
            90deg,
            rgba(255, 213, 0, 0.065),
            transparent 45%
        );
}


/* ========================================
   POSICIÓN
======================================== */

.results-full-position {
    color: rgba(255, 255, 255, 0.40);

    font-size: 0.92rem;
    font-weight: 900;
}


.results-full-driver-block:first-child .results-full-position {
    color: var(--yellow);
}


/* ========================================
   PILOTO
======================================== */

.results-full-driver {
    min-width: 0;
    height: 66px;

    display: flex;

    align-items: center;

    gap: 11px;
}


.results-full-photo {
    position: relative;

    width: 51px;
    height: 66px;

    flex-shrink: 0;

    overflow: hidden;
}


.results-full-photo img {
    width: 51px;
    height: 58px;

    object-fit: contain;

    margin-top: 3px;

    transform: scale(1.65);
    transform-origin: 50% 10%;
}


.results-full-photo.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}


.results-full-photo.no-photo::after {
    content: attr(data-initial);

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

    font-size: 1rem;
    font-weight: 900;
}


.results-full-driver-text {
    min-width: 0;
}


.results-full-driver-text strong {
    display: block;

    overflow: hidden;

    color: #ffffff;

    font-size: 0.82rem;
    font-weight: 900;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.results-full-driver-text small {
    display: block;

    margin-top: 4px;

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

    font-size: 0.6rem;
    font-weight: 800;

    letter-spacing: 0.04em;
}


.results-full-team {
    overflow: hidden;

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

    font-size: 0.72rem;
    font-weight: 800;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.results-full-center {
    color: rgba(255, 255, 255, 0.62);

    text-align: center;

    font-size: 0.72rem;
    font-weight: 800;
}


.results-change-positive {
    color: #6fdc92;
}


.results-change-negative {
    color: #ff7777;
}


.results-change-neutral {
    color: rgba(255, 255, 255, 0.35);
}


.results-fastest-lap {
    color: var(--yellow);
}


.results-points {
    color: #ffffff;

    font-weight: 900;
}


/* ========================================
   BOTÓN DETALLES PILOTO
======================================== */

.results-driver-toggle {
    width: 64px;
    height: 30px;

    margin: 0 auto;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 5px;

    background: transparent;

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

    font-family: inherit;

    font-size: 0.55rem;
    font-weight: 900;

    letter-spacing: 0.06em;

    cursor: pointer;

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


.results-driver-toggle:hover,
.results-driver-toggle[aria-expanded="true"] {
    color: #08090b;

    background: var(--yellow);

    border-color: var(--yellow);
}


.results-driver-no-details {
    display: block;

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

    text-align: center;
}


/* ========================================
   DETALLES DE PILOTO
======================================== */

.results-driver-extra {
    padding: 18px 22px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 213, 0, 0.025),
            rgba(255, 255, 255, 0.012)
        );

    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


.results-driver-extra[hidden] {
    display: none;
}


.results-driver-extra-grid {
    display: grid;

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

    gap: 9px;
}


.results-driver-stat {
    min-height: 70px;

    padding: 12px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 7px;

    background: rgba(255, 255, 255, 0.018);
}


.results-driver-stat span {
    display: block;

    margin-bottom: 7px;

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

    font-size: 0.52rem;
    font-weight: 900;

    letter-spacing: 0.08em;
}


.results-driver-stat strong {
    color: rgba(255, 255, 255, 0.82);

    font-size: 0.72rem;
    font-weight: 900;

    line-height: 1.35;
}


.results-driver-stat.strategy {
    grid-column: span 2;
}


/* ========================================
   ESTADO
======================================== */

.results-status-dnf {
    color: #ff8c72;
}


.results-status-dsq {
    color: #ff6262;
}


.results-status-dns {
    color: rgba(255, 255, 255, 0.40);
}


/* ========================================
   CARGANDO
======================================== */

.results-page-loading {
    padding: 70px 20px;

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

    text-align: center;

    font-size: 0.74rem;
    font-weight: 900;

    letter-spacing: 0.11em;

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

    background: rgba(255, 255, 255, 0.02);
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1100px) {

    .results-session-summary {
        grid-template-columns: repeat(3, 1fr);
    }


    .results-driver-extra-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}


@media (max-width: 1024px) {

    .results-page-hero {
        min-height: 340px;

        padding:
            80px
            5%
            60px;
    }


    .results-page-content {
        padding:
            60px
            5%
            90px;
    }


    .results-podium-photo {
        width: 140px;
        height: 160px;
    }

}


/* ========================================
   MÓVIL
======================================== */

@media (max-width: 768px) {

    .results-page-hero {
        min-height: 300px;

        padding:
            70px
            22px
            50px;
    }


    .results-page-hero::after {
        right: -20px;

        bottom: -30px;

        font-size: 10rem;
    }


    .results-page-hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }


    .results-page-hero p {
        margin-top: 20px;

        font-size: 0.9rem;
    }


    .results-page-content {
        padding:
            45px
            18px
            75px;
    }


    .results-page-tabs {
        gap: 6px;
    }


    .results-page-tab {
        min-height: 46px;

        padding: 0 10px;

        font-size: 0.66rem;
    }


    .results-round-header {
        min-height: 0;

        grid-template-columns: 1fr;

        gap: 10px;

        padding: 22px;
    }


    .results-round-tag {
        width: fit-content;
    }


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


    .results-podium-card {
        min-height: 185px;
    }


    .results-podium-photo {
        left: auto;
        right: 10px;
        top: 0;

        width: 145px;
        height: 170px;

        transform: none;
    }


    .results-podium-content {
        width: calc(100% - 115px);

        padding-top: 70px;
    }


    .results-round-footer {
        padding: 16px;
    }


    .results-round-expand {
        width: 100%;
        min-width: 0;
    }


    .results-session-summary {
        grid-template-columns: repeat(2, 1fr);

        padding: 18px;
    }


    .results-full-section {
        padding: 0 18px 22px;
    }


    .results-full-title {
        align-items: flex-start;
        flex-direction: column;

        gap: 7px;
    }


    .results-driver-extra-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .results-driver-stat.strategy {
        grid-column: 1 / -1;
    }


    .results-session-heading {
        min-height: 40px;

        padding: 0 18px;
    }


    .results-session-details {
        padding-top: 18px;
    }


    .results-session-details > .results-full-title {
        padding: 0 18px;
    }

}


/* ========================================
   MÓVIL PEQUEÑO
======================================== */

@media (max-width: 480px) {

    .results-page-label {
        font-size: 0.67rem;

        letter-spacing: 0.16em;
    }


    .results-page-hero h1 {
        font-size: 3.1rem;
    }


    .results-page-tabs {
        display: grid;

        grid-template-columns: 1fr;
    }


    .results-round-info h2 {
        font-size: 1.2rem;
    }


    .results-podium-card {
        min-height: 175px;

        padding: 18px;
    }


    .results-podium-photo {
        width: 125px;
        height: 150px;
    }


    .results-podium-position {
        left: 14px;
        top: 12px;

        font-size: 1.7rem;
    }


    .results-podium-content {
        width: calc(100% - 90px);

        padding-top: 60px;
    }


    .results-podium-content strong {
        font-size: 0.9rem;
    }


    .results-session-summary {
        grid-template-columns: 1fr 1fr;

        gap: 7px;

        padding: 14px;
    }


    .results-summary-item {
        min-height: 80px;

        padding: 12px;
    }


    .results-full-section {
        padding: 0 14px 18px;
    }


    .results-driver-extra {
        padding: 14px;
    }


    .results-driver-extra-grid {
        grid-template-columns: 1fr 1fr;

        gap: 7px;
    }


    .results-session-heading {
        padding: 0 14px;
    }


    .results-session-label {
        font-size: 0.54rem;
    }


    .results-session-details > .results-full-title {
        padding: 0 14px;
    }

}
