/* ===========================
        VARIABLES
=========================== */

:root {
    --background: #f5f5f5;
    --surface: #FFFFFF;
    --accent: #F97316;
    --accent-hover: #EA580C;
    --purple: #7C3AED;
    --text: #102A43;
    --secondary: #000000;
    --border: #E5E7EB;
}

/* ===========================
        RESET & BASE
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Fondo de pantalla completa */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-image:
        linear-gradient(to bottom,
            rgba(255, 255, 255, 0.65) 0%,
            rgba(255, 255, 255, 0.65) 60%,
            #FAFAFA 100%),
        radial-gradient(circle at top, rgba(249, 115, 22, .08), transparent 45%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, .04), transparent 40%),
        url('../assets/images/newFondo.jpeg');

    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: top center;
    opacity: 0.6;
    z-index: -2;
}

.background-logo {
    display: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===========================
        HEADER & NAVBAR
=========================== */

header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.navbar {
    width: min(1200px, 95%);
    height: 72px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 22px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
}

.navbar ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 45px;
}

.champion {
    border-radius: 25px;
}

.logo-img {
    height: 58px;
    width: auto;
    display: block;
}

.navbar a {
    font-weight: 500;
    transition: .3s;
}

.navbar a:hover {
    color: var(--accent);
}

.menu-toggle,
.navbar-logo-mobile {
    display: none;
}

/* ===========================
        CONTENEDOR GENERAL
=========================== */

main,
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 110px 24px 40px;
    /* Padding top para despejar el header en Desktop */
}

.container {
    width: min(1200px, 90%);
    margin: auto;
}

/* ===========================
            HERO
=========================== */

.hero {
    padding-top: 120px;
    padding-bottom: 40px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    gap: 15px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.hero-bg img {
    width: 700px;
    opacity: .035;
    transform: rotate(-8deg);
}

.badge {
    background: rgba(249, 115, 22, .12);
    color: var(--accent);
    border: 1px solid rgba(249, 115, 22, .18);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
}

.hero p {
    margin-top: 25px;
    color: var(--secondary);
    font-size: 1.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 34px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .4px;
    cursor: pointer;
    transition: transform .25s, background .25s, box-shadow .25s;
    box-shadow: 0 10px 25px rgba(249, 115, 22, .25);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(249, 115, 22, .35);
}

.hero .btn {
    margin-top: 35px;
}

.hero>* {
    animation: fadeUp .8s ease forwards;
}

.scroll-down {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 40px;
    font-size: 2rem;
    color: var(--secondary);
    animation: bounce 2s infinite;
}

/* ===========================
    FEATURED TOURNAMENT
=========================== */

.featured-tournament {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title span {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    font-size: .9rem;
}

.section-title h2 {
    margin-top: 12px;
    font-size: 2.8rem;
}

.featured-content {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 70px;
    align-items: center;
}

.poster {
    perspective: 1200px;
}

.poster img {
    display: block;
    width: 100%;
    border-radius: 24px;
    border: 2px solid transparent;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.poster img:hover {
    transform: translateY(-6px);
    border-color: #F97316;
    box-shadow: 0 30px 55px rgba(249, 115, 22, 0.18);
}

.release {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 18px;
}

.featured-info h3 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 30px;
}

.synopsis {
    color: var(--secondary);
    line-height: 1.9;
    max-width: 600px;
    margin-bottom: 40px;
}

.chapter-data {
    display: flex;
    gap: 50px;
    margin: 40px 0;
}

.chapter-data div {
    display: flex;
    flex-direction: column;
}

.chapter-data small {
    color: var(--secondary);
    font-size: .85rem;
    margin-bottom: 6px;
}

.chapter-data strong {
    font-size: 1.3rem;
    font-weight: 600;
}

/* ===========================
        PAGE HEADER
=========================== */

.page-header {
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    margin: 20px 0;
    line-height: 1.1;
}

.page-header p {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* ===========================
        PLAYERS
=========================== */

.players {
    padding: 20px 0 80px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.player-card {
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 28px;
    padding: 40px;
    text-align: center;
    transition: .35s;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.player-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 25px 50px rgba(249, 115, 22, .18);
}

.player-banner {
    height: 90px;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    position: relative;
    border-radius: 28px 28px 0 0;
    transition: .35s;
}

.player-card:hover .player-banner {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

.player-content {
    padding: 95px 35px 35px;
}

.player-image {
    width: 140px;
    height: 140px;
    position: absolute;
    left: 50%;
    bottom: -70px;
    transform: translateX(-50%);
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

.player-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(15%) contrast(1.05);
    transition: .4s;
}

.player-card:hover .player-image img {
    transform: scale(1.08);
    filter: none;
}

.player-card h3 {
    font-size: 1.8rem;
}

.nickname {
    display: block;
    margin-top: 8px;
    color: var(--accent);
    font-weight: 600;
}

.player-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 35px 0;
}

.player-stats div {
    display: flex;
    flex-direction: column;
}

.player-stats strong {
    font-size: 2rem;
}

.player-stats small {
    color: var(--secondary);
}

.player-card .btn {
    width: 100%;
}

.player-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 28px auto;
    border-radius: 30px;
}

blockquote {
    margin: 35px 0;
    color: var(--secondary);
    font-style: italic;
    line-height: 1.7;
}

.season {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--accent);
    letter-spacing: 2px;
    font-size: .8rem;
    font-weight: 600;
}

/* =========================================
   ÚLTIMO TORNEO - HERO & ESTRUCTURA
   ========================================= */

.torneo-hero {
    min-height: 380px;
    display: flex;
    align-items: center;
    padding: 40px 8%;
    background-color: #111827;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    margin-bottom: 30px;
    padding-right: 34%;
}

.torneo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.35));
}

.torneo-hero-contenido {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.torneo-edicion {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #F97316;
}

.torneo-hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
    font-weight: 800;
    color: white;
}

.torneo-estado {
    margin-top: 15px;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.torneo-hero-poster {
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%);
    height: 85%;
    z-index: 2;
    display: flex;
    align-items: center;
}

.torneo-hero-poster img {
    height: 100%;
    max-height: 320px;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.torneo-campeon {
    margin: 30px 0;
    padding: 30px;
    text-align: center;
    background: #111827;
    border-radius: 24px;
}

.torneo-campeon h2::after {
    content: "";
    display: block;
    width: 52px;
    height: 3px;
    margin: 14px auto 0;
    background: #F97316;
    border-radius: 10px;
}

.torneo-campeon .etiqueta-seccion,
.torneo-participantes .etiqueta-seccion,
.torneo-tabla .etiqueta-seccion,
.torneo-partidos .etiqueta-seccion {
    display: inline-block;
    margin-bottom: 10px;
    color: #F97316;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.torneo-campeon h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    color: white;
}

.torneo-participantes,
.torneo-tabla,
.torneo-partidos {
    margin: 40px 0;
}

.torneo-participantes h2,
.torneo-tabla h2,
.torneo-partidos h2 {
    margin: 0 0 20px;
    font-size: clamp(22px, 3.5vw, 32px);
    color: #111827;
}

#listaParticipantes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#listaParticipantes li {
    padding: 20px 15px;
    background: white;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#listaParticipantes li:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.10);
}

.participante-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.participante-foto {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #111827;
}

.participante-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participante-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.participante-nick {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}

.participante-nombre {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

/* =========================================
   ÚLTIMO TORNEO - TABLA Y PARTIDOS
   ========================================= */

.torneo-tabla table {
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.torneo-tabla thead {
    background: #111827;
}

.torneo-tabla th {
    padding: 14px 10px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.torneo-tabla th:nth-child(2) {
    text-align: left;
}

.torneo-tabla td {
    padding: 14px 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.torneo-tabla td:nth-child(2) {
    text-align: left;
    font-weight: 700;
    color: #111827;
}

.torneo-tabla tbody tr {
    transition: background-color 0.2s ease;
}

.torneo-tabla tbody tr:hover {
    background-color: #fff7ed;
}

.torneo-tabla tbody tr:last-child td {
    border-bottom: none;
}

#listaPartidos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.partido-card {
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.partido-info {
    margin-bottom: 15px;
    text-align: center;
}

.partido-info span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #F97316;
}

.partido-enfrentamiento {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.partido-jugador {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.partido-jugador img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 6px;
    background: #111827;
}

.partido-jugador:first-child {
    text-align: right;
    align-items: flex-end;
}

.partido-jugador:last-child {
    text-align: left;
    align-items: flex-start;
}

.partido-jugador strong {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}

.partido-jugador small {
    font-size: 12px;
    color: #6b7280;
}

.partido-resultado strong {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

/* =========================================
   ANIMACIONES
   ========================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* =========================================
   RESPONSIVE UNIFICADO - MÓVILES (< 768px)
   ========================================= */

@media (max-width: 768px) {

    /* Prevenir scroll horizontal */
    html,
    body {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    main,
    .main-content {
        padding: 85px 15px 30px !important;
    }

    /* Navbar & Header Mobile */
    header {
        top: 10px;
        padding: 0 12px;
    }

    .navbar {
        width: 100%;
        height: 60px;
        padding: 0 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .navbar-logo-mobile {
        display: block;
    }

    .logo-desktop {
        display: none;
    }

    /* Botón Hamburguesa */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 28px;
        height: 22px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 0;
    }

    .menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--text);
        border-radius: 5px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Desplegable Menú */
    .navbar ul {
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(229, 231, 235, 0.8);
        border-radius: 18px;
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .navbar ul.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Hero Index Mobile */
    .hero {
        padding-top: 85px !important;
        padding-bottom: 20px !important;
        min-height: auto !important;
        gap: 10px;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 8vw, 3rem);
        line-height: 1.1;
    }

    .hero p {
        margin-top: 10px;
        font-size: 1rem;
    }

    .hero .btn {
        margin-top: 20px;
        padding: 12px 24px;
    }

    .champion {
        max-width: 100%;
        height: auto;
    }

    .featured-tournament {
        padding: 40px 0;
    }

    .featured-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .poster {
        max-width: 240px;
        margin: 0 auto;
    }

    /* Torneo Hero Mobile - Ajuste Compacto */
    .torneo-hero {
        min-height: auto;
        padding: 25px 20px 180px !important;
        /* Espacio abajo para la foto */
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
    }

    .torneo-hero-contenido {
        max-width: 100%;
        z-index: 3;
    }

    .torneo-hero h1 {
        font-size: clamp(30px, 9vw, 42px);
    }

    .torneo-hero-poster {
        position: absolute;
        right: 50%;
        left: auto;
        transform: translateX(50%);
        height: 160px;
        bottom: 10px;
        top: auto;
    }

    .torneo-hero-poster img {
        height: 100%;
        max-height: 160px;
        border-radius: 12px;
    }

    /* Partidos Mobile */
    .partido-enfrentamiento {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
        text-align: center;
    }

    .partido-enfrentamiento>.partido-jugador:first-child,
    .partido-enfrentamiento>.partido-jugador:last-child {
        align-items: center;
        text-align: center;
    }
}

/* Contenedor con scroll horizontal para la tabla en móviles */
.tabla-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    margin-bottom: 20px;
}

/* =========================================
   TABLA ANUAL
   ========================================= */

.tabla-anual {
    margin: 40px 0 70px;
}

.tabla-anual .etiqueta-seccion {
    display: inline-block;
    margin-bottom: 10px;
    color: #F97316;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.tabla-anual h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1;
    font-weight: 800;
    color: #111827;
}

.tabla-anual-descripcion {
    margin: 20px 0 35px;
    max-width: 650px;
    font-size: 16px;
    line-height: 1.7;
    color: #6b7280;
}

/* CONTENEDOR */

.tabla-anual-contenedor {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

/* TABLA */

.tabla-anual-tabla {
    width: 100%;
    min-width: 950px;
    border-collapse: separate;
    border-spacing: 0;
}

/* ENCABEZADOS */

.tabla-anual-tabla thead {
    background: #111827;
}

.tabla-anual-tabla th {
    padding: 17px 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    text-align: center;
    white-space: nowrap;
}

.tabla-anual-tabla th:nth-child(2) {
    text-align: left;
}

/* CELDAS */

.tabla-anual-tabla td {
    padding: 16px 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.tabla-anual-tabla td:nth-child(2) {
    text-align: left;
    font-weight: 700;
    color: #111827;
}

.tabla-anual-tabla tbody tr {
    transition: background-color 0.2s ease;
}

.tabla-anual-tabla tbody tr:hover {
    background-color: #fff7ed;
}

.tabla-anual-tabla tbody tr:last-child td {
    border-bottom: none;
}

/* POSICIÓN */

.tabla-anual-tabla .tabla-posicion {
    font-weight: 700;
    color: #111827;
}

/* ZONA SUPERCOPA: PUESTOS 1 AL 8 */

.tabla-anual-tabla tbody tr.zona-supercopa {
    background-color: rgba(212, 175, 55, 0.065);
}

.tabla-anual-tabla tbody tr.zona-supercopa td:first-child {
    border-left: 4px solid #D4AF37;
}

.tabla-anual-tabla tbody tr.zona-supercopa:hover {
    background-color: rgba(212, 175, 55, 0.15);
}

/* ZONA MINICOPA: PUESTOS 9 AL 12 */

.tabla-anual-tabla tbody tr.zona-minicopa {
    background-color: rgba(148, 163, 184, 0.09);
}

.tabla-anual-tabla tbody tr.zona-minicopa td:first-child {
    border-left: 4px solid #94A3B8;
}

.tabla-anual-tabla tbody tr.zona-minicopa:hover {
    background-color: rgba(148, 163, 184, 0.18);
}

/* BONIFICACIÓN */

.tabla-anual-tabla .tabla-bonificacion {
    color: #7C3AED;
    font-weight: 700;
}

/* PUNTOS TOTALES */

.tabla-anual-tabla .tabla-puntos {
    color: #EA580C;
    font-size: 15px;
    font-weight: 800;
}

/* LEYENDA */

.tabla-anual-leyenda {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    margin-top: 22px;
}

.tabla-anual-leyenda>span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
}

.leyenda-color {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
}

.leyenda-supercopa .leyenda-color {
    background: #D4AF37;
}

.leyenda-minicopa .leyenda-color {
    background: #94A3B8;
}

/* EXPLICACIÓN DE PUNTOS */

.tabla-anual-nota {
    margin-top: 14px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
}

/* RESPONSIVE */

@media (max-width: 768px) {

    .tabla-anual {
        margin: 30px 0 55px;
    }

    .tabla-anual-descripcion {
        font-size: 14px;
    }

    .tabla-anual-contenedor {
        border-radius: 14px;
    }

    .tabla-anual-tabla th,
    .tabla-anual-tabla td {
        padding: 14px 10px;
    }

    .tabla-anual-leyenda {
        gap: 12px;
    }

    .tabla-anual-leyenda>span {
        font-size: 11px;
    }
}


/* =========================================
   JUGADORES - RESPONSIVE
   ========================================= */

@media (max-width: 768px) {

    .players {
        padding: 10px 0 60px;
    }

    .players-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .player-card {
        padding: 0;
    }

    .player-content {
        padding: 85px 25px 30px;
    }

    .player-stats {
        gap: 35px;
    }

}

/* ===========================
        JUGADOR
=========================== */

.jugador-detalle {
    margin: 60px 0 80px;
    text-align: center;
}

.jugador-detalle>p {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.jugador-detalle h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1;
    font-weight: 800;
    color: #111827;
}

.jugador-detalle>span {
    display: block;
    margin-top: 15px;
    color: var(--accent);
    font-size: 20px;
    font-weight: 600;
}

#jugadorFoto {
    display: block;
    width: 220px;
    height: 220px;
    margin: 35px auto 0;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
}

.jugador-estadisticas {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 45px auto 0;
    max-width: 500px;
}

.jugador-estadistica {
    flex: 1;
    padding: 25px 20px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .06);
}

.jugador-estadistica strong {
    display: block;
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
    color: #111827;
}

.jugador-estadistica small {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jugador-trayectoria {
    max-width: 900px;
    margin: 70px auto 0;
    text-align: left;
}

.jugador-trayectoria h2 {
    margin-bottom: 30px;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
}

.trayectoria-item {
    padding: 25px 30px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .06);
}

.trayectoria-item h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.trayectoria-item p {
    margin: 6px 0 12px;
    color: #6b7280;
    font-size: 14px;
}

.trayectoria-item span {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(249, 115, 22, .1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 768px) {

    .jugador-estadisticas {
        gap: 12px;
    }

    .jugador-estadistica {
        padding: 20px 15px;
    }

    .jugador-estadistica strong {
        font-size: 30px;
    }

}

/* ===========================
        ADMIN LOGIN
=========================== */

.admin-login {
    width: min(450px, 90%);
    margin: 100px auto;
    padding: 45px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(17, 24, 39, .08);
    text-align: center;
}

.admin-login-logo {
    width: 90px;
    margin-bottom: 25px;
}

.admin-login-label {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.admin-login h1 {
    margin: 8px 0 10px;
    font-size: 38px;
    font-weight: 800;
    color: #111827;
}

.admin-login-text {
    margin: 0 0 35px;
    color: #6b7280;
    font-size: 14px;
}

.admin-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.admin-form-group label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.admin-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: rgba(255, 255, 255, .8);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.admin-form-group input:focus {
    border-color: var(--accent);
}

.admin-login .btn {
    width: 100%;
    margin-top: 10px;
    border: none;
    cursor: pointer;
}


/* ========================================
   LPV - PARTIDOS AGRUPADOS POR FASE
======================================== */

.partidos-fase {
    margin-top: 38px;
}

.partidos-fase-titulo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    font-family: "Poppins", sans-serif;
    font-size: 23px;
    font-weight: 800;
    color: #111827;
}

.partidos-fase-titulo::before {
    content: "";
    display: block;
    width: 5px;
    height: 28px;
    background: #F97316;
    border-radius: 8px;
}

.partidos-fase-lista {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* La Gran Final: el evento principal */

.fase-final {
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #111827, #241735);
    border: 1px solid rgba(249, 115, 22, 0.35);
    box-shadow: 0 15px 35px rgba(17, 24, 39, 0.12);
}

.fase-final .partidos-fase-titulo {
    color: #fff;
    font-size: 27px;
}

.fase-final .partidos-fase-titulo::before {
    background: #F97316;
}

.fase-final .partidos-fase-titulo::after {
    content: "🏆";
    font-size: 25px;
}

.fase-final .partidos-fase-lista {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
}

.fase-final .partido-card {
    border: 2px solid rgba(249, 115, 22, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Eliminatorias */

.fase-cuartos .partidos-fase-titulo::before,
.fase-semifinal .partidos-fase-titulo::before {
    background: #7C3AED;
}

/* Descenso */

.fase-descenso {
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.fase-descenso .partidos-fase-titulo::before {
    background: #64748b;
}

/* Adaptación a celulares */

@media (max-width: 768px) {
    .partidos-fase {
        margin-top: 30px;
    }

    .partidos-fase-titulo {
        font-size: 20px;
    }

    .partidos-fase-lista {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fase-final {
        padding: 20px 14px;
        border-radius: 20px;
    }

    .fase-final .partidos-fase-titulo {
        font-size: 22px;
    }
}

/* =====================================
   LPV - TABLAS DE POSICIONES POR ZONAS
===================================== */

.tablas-zonas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 25px;
}

.tablas-zonas[hidden] {
    display: none;
}

.tabla-zona {
    min-width: 0;
}

.tabla-zona h3 {
    color: #f97316;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

/* Adaptación a celulares */
@media (max-width: 900px) {
    .tablas-zonas {
        grid-template-columns: 1fr;
    }
}

.partido-resultado {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.partido-resultado .partido-penales {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

.partido-resultado .partido-penales:empty {
    display: none;
}

/* =========================
   TARJETA DEL CAMPEÓN
========================= */

.champion-card {
    width: 370px;
    max-width: 90%;
    margin: 25px auto 0;
    overflow: hidden;
    border-radius: 18px;

    position: relative;
    isolation: isolate;
    padding: 3px;
    background: #10283D;
}

.champion-header {
    background: #10283D;
    color: #F97316;
    font-family: 'Poppins', sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-align: center;
    padding: 16px 10px;
    border-bottom: 3px solid #F97316;
}

.champion-card .champion {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

.champion-footer {
    background: #10283D;
    color: #F97316;
    font-family: 'Poppins', sans-serif;
    font-size: 27px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    padding: 14px 10px;
    border-top: 3px solid #F97316;
}

/* =========================
   BORDE ANIMADO DEL CAMPEÓN
========================= */

.champion-card::before {
    content: "";
    position: absolute;
    inset: -100%;
    z-index: -1;

    background: conic-gradient(from 0deg,
            #10283D 0deg,
            #10283D 230deg,
            #F97316 300deg,
            #FFB067 325deg,
            #F97316 345deg,
            #10283D 360deg);

    animation: bordeCampeon 4s linear infinite;
}

@keyframes bordeCampeon {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .champion-card::before {
        animation: none;
    }
}

/* Información del último torneo */

.torneo-detalles {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 22px 0 28px;
}

.torneo-detalles p {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.torneo-detalles svg {
    flex-shrink: 0;
}

.torneo-detalles p:empty {
    display: none;
}

/* ========================================
   LPV - HISTORIAL DE TORNEOS
======================================== */

.torneo-historial {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 24px;
}

.torneo-historial>h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 12px 0;
}

.torneo-historial>p {
    color: #a1a1aa;
    margin-bottom: 32px;
}

/* Grilla de tarjetas */

.historial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
}

/* Tarjetas */

.historial-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.historial-card:hover {
    transform: translateY(-5px);
    border-color: #f97316;
}

.historial-card-enlace {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.historial-card img {
    display: block;
    width: 100%;
    height: 270px;
    object-fit: cover;
    object-position: center;
}

.historial-card h3 {
    padding: 14px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: #f8fafc;
    line-height: 1.5;
}

.historial-card-enlace:hover h3 {
    color: #f97316;
}

/* Adaptación móvil */

@media (max-width: 600px) {
    .torneo-historial {
        margin: 48px auto;
        padding: 0 16px;
    }

    .historial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .historial-card img {
        height: 220px;
    }

    .historial-card h3 {
        font-size: 0.85rem;
        padding: 12px 8px;
    }
}

/* ACCESO RÁPIDO AL HISTORIAL */

.torneo-acceso-historial {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 16px;
}

.btn-historial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 22px;
    border: 1px solid rgba(249, 115, 22, 0.45);
    border-radius: 10px;
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-historial:hover {
    background: rgba(249, 115, 22, 0.18);
    transform: translateY(-2px);
}

html {
    scroll-behavior: smooth;
}

#historialTorneos {
    scroll-margin-top: 100px;
}

.btn-historial[hidden] {
    display: none;
}

/* Enlaces a perfiles desde las tablas */

.enlace-jugador {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.enlace-jugador:hover {
    color: #f97316;
}

/* Tarjetas de participantes clickeables */

.participante-card-enlace {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.participante-card-enlace:hover {
    transform: translateY(-3px);
    border-color: #f97316;
}

.participante-card-enlace:hover .participante-nick {
    color: #f97316;
}

/* Enlaces a perfiles desde los partidos */

.partido-jugador-enlace {
    display: flex;
    flex-direction: column;
    align-items: inherit;
    text-align: inherit;
    gap: 4px;

    color: inherit;
    text-decoration: none;
    cursor: pointer;

    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;

    transition: transform 0.2s ease;
}

.partido-jugador-enlace:hover {
    transform: translateY(-3px);
}

.partido-jugador-enlace:hover strong {
    color: #f97316;
}

.partido-enfrentamiento>.partido-jugador {
    min-width: 0;
    width: 100%;
}

.partido-enfrentamiento>.partido-jugador:first-child {
    align-items: flex-end;
    text-align: right;
}

.partido-enfrentamiento>.partido-jugador:last-child {
    align-items: flex-start;
    text-align: left;
}


/* Centrar el contenido de cada jugador en los enfrentamientos */

.partido-enfrentamiento .partido-jugador-enlace {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.partido-enfrentamiento .partido-jugador-enlace img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.partido-enfrentamiento .partido-jugador-enlace strong,
.partido-enfrentamiento .partido-jugador-enlace small {
    text-align: center;
}

/* Indicador violeta del ganador */

.partido-nick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.partido-check-ganador {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 17px;
    height: 17px;
    border-radius: 50%;

    background: #8B5CF6;
    color: #fff;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;

    flex-shrink: 0;
}

/* ==================================
   CAMPEÓN DEL TORNEO
================================== */

.torneo-campeon-contenido {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.torneo-campeon-enlace {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    text-decoration: none;
    color: inherit;

    transition: transform 0.2s ease;
}

.torneo-campeon-enlace[href]:hover {
    transform: translateY(-4px);
}

.torneo-campeon-foto {
    width: 115px;
    height: 115px;
    border-radius: 50%;
    object-fit: cover;

    border: 4px solid #F97316;
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.2);
}

.torneo-campeon-enlace h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    color: #F97316;
}

@media (max-width: 600px) {
    .torneo-campeon-foto {
        width: 95px;
        height: 95px;
    }

    .torneo-campeon-enlace h2 {
        font-size: 23px;
    }
}

.torneo-campeon-nombre {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.torneo-campeon-nombre span {
    font-size: 26px;
}

/* Enfrentamientos en dispositivos móviles */

@media (max-width: 600px) {

    .partido-enfrentamiento>.partido-jugador {
        align-items: center;
        text-align: center;
    }

    .partido-enfrentamiento .partido-jugador-enlace {
        width: 100%;
        min-width: 0;
    }

    .partido-enfrentamiento .partido-jugador img {
        width: 58px;
        height: 58px;
    }

    .partido-enfrentamiento .partido-resultado {
        min-width: 65px;
        text-align: center;
    }

}

/* Clasificados a la siguiente fase */

.tabla-zona tr.zona-clasificado {
    background-color: rgba(139, 92, 246, 0.06);
}

.tabla-zona tr.zona-clasificado td:first-child {
    border-left: none;
    box-shadow: inset 3px 0 0 #8B5CF6;
}

.tabla-zona tr.zona-clasificado .tabla-posicion {
    font-weight: 700;
    color: #8B5CF6;
}

/* ==========================================
   LPV - COLUMNAS FIJAS EN TABLAS DE TORNEOS
========================================== */

/* Contenedor con desplazamiento horizontal */
.torneo-tabla .tabla-responsive {
    position: relative;
}

/* Preparar las tablas para columnas fijas */
.torneo-tabla .tabla-responsive table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: visible;
    min-width: 850px;
}

/* Columna POS */
.torneo-tabla .tabla-responsive th:first-child,
.torneo-tabla .tabla-responsive td:first-child {
    position: sticky;
    left: 0;
    width: 65px;
    min-width: 65px;
    max-width: 65px;
    z-index: 2;
    background: #fff;
}

/* Columna JUGADOR */
.torneo-tabla .tabla-responsive th:nth-child(2),
.torneo-tabla .tabla-responsive td:nth-child(2) {
    position: sticky;
    left: 65px;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    white-space: nowrap;
    z-index: 2;
    background: #fff;
    box-shadow: 4px 0 8px rgba(17, 24, 39, 0.08);
}

/* Encabezados */
.torneo-tabla .tabla-responsive thead th:first-child,
.torneo-tabla .tabla-responsive thead th:nth-child(2) {
    background: #111827;
    color: #fff;
    z-index: 3;
}

/* Clasificados */
.torneo-tabla .tabla-responsive tr.zona-clasificado td:first-child,
.torneo-tabla .tabla-responsive tr.zona-clasificado td:nth-child(2) {
    background: #F5F1FC;
}

/* Línea violeta */
.torneo-tabla .tabla-responsive tr.zona-clasificado td:first-child {
    box-shadow: inset 3px 0 0 #8B5CF6;
}

/* Adaptación móvil */
@media (max-width: 600px) {

    .torneo-tabla .tabla-responsive th:first-child,
    .torneo-tabla .tabla-responsive td:first-child {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
    }

    .torneo-tabla .tabla-responsive th:nth-child(2),
    .torneo-tabla .tabla-responsive td:nth-child(2) {
        left: 50px;
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

}

/* ==========================================
   LPV - COLUMNAS FIJAS EN TABLA ANUAL
========================================== */

/* Columna POS */
.tabla-anual-tabla th:first-child,
.tabla-anual-tabla td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;

    width: 65px;
    min-width: 65px;
    max-width: 65px;

    background: #fff;
}

/* Columna JUGADOR */
.tabla-anual-tabla th:nth-child(2),
.tabla-anual-tabla td:nth-child(2) {
    position: sticky;
    left: 65px;
    z-index: 2;

    width: 140px;
    min-width: 140px;
    max-width: 140px;

    background: #fff;
    white-space: nowrap;
    box-shadow: 3px 0 6px rgba(17, 24, 39, 0.06);
}

/* Encabezado oscuro */
.tabla-anual-tabla thead th:first-child,
.tabla-anual-tabla thead th:nth-child(2) {
    background: #111827;
    color: #fff;
    z-index: 3;
}

/* Conservar el dorado de Supercopa */
.tabla-anual-tabla tbody tr.zona-supercopa td:first-child,
.tabla-anual-tabla tbody tr.zona-supercopa td:nth-child(2) {
    background: #FAF9F3;
}

/* Conservar el gris de Minicopa */
.tabla-anual-tabla tbody tr.zona-minicopa td:first-child,
.tabla-anual-tabla tbody tr.zona-minicopa td:nth-child(2) {
    background: #F2F4F6;
}

/* Adaptación a celulares */
@media (max-width: 600px) {

    .tabla-anual-tabla th:first-child,
    .tabla-anual-tabla td:first-child {
        width: 55px;
        min-width: 55px;
        max-width: 55px;
    }

    .tabla-anual-tabla th:nth-child(2),
    .tabla-anual-tabla td:nth-child(2) {
        left: 55px;

        width: 115px;
        min-width: 115px;
        max-width: 115px;
    }
}

/* Evitar que los títulos largos desborden en móviles */
@media (max-width: 600px) {

    .page-header h1 {
        font-size: clamp(26px, 7vw, 36px);
        line-height: 1.15;
        overflow-wrap: break-word;
        text-align: center;
    }

}