:root {
    --bg: #0f0f10;
    --panel: #1b1b1d;
    --card: #242426;
    --muted: #a9a9ad;
    --text: #f2f2f3;
    --red: #e10b1a;
    /* ajustamos al rojo del logo luego */
    --radius: 16px;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial
}

a {
    color: inherit
}

.es-main {
    min-height: 100vh;
    padding-bottom: 70px;
}

.es-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 15, 16, .92);
    backdrop-filter: blur(8px);
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.es-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}



.es-pill {
    background: var(--red);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.es-pill.is-live {
    box-shadow: 0 0 0 2px rgba(225, 11, 26, .25);
}

.es-tabs {
    display: flex;
    gap: 10px;
    margin-top: 10px
}

.es-tab {
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.es-tab.is-active {
    background: rgba(225, 11, 26, .18);
    color: var(--text);
}

.es-app {
    padding: 14px
}

.es-top-banner {
    margin-bottom: 12px
}

.es-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.es-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    overflow: hidden;
}

.es-card-head {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 12px;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.es-time {
    min-width: 52px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .25);
    font-weight: 900;
}

.es-match {
    flex: 1
}

.es-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.es-team {
    font-weight: 900
}

.es-vs {
    opacity: .6;
    font-weight: 700
}

.es-teamlogo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    background: #111
}

.es-score {
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(225, 11, 26, .16);
    border: 1px solid rgba(225, 11, 26, .25);
    font-weight: 900;
}

.es-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px
}

.es-league {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700
}

.es-badge {
    font-size: 11px;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.es-badge.is-live {
    background: rgba(225, 11, 26, .22);
    border-color: rgba(225, 11, 26, .35);
}

.es-star {
    margin-left: auto;
    font-size: 20px;
    line-height: 1;
    opacity: .35;
    user-select: none;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
}

.es-star.is-on {
    opacity: 1;
    color: #ffd54a
}

.es-card-body {
    padding: 12px 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.es-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--red);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: .3px;
}



.es-player {
    margin-bottom: 8px
}

.es-yt {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: #000;
}

.es-infeed-banner {
    margin: 6px 0 2px
}

.es-banner {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
}

.es-banner img {

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}

.es-banner--empty {
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, .55);
    font-weight: 800;
}

.es-note2 {
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    margin: 6px 0 10px
}

.es-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    justify-content: space-around;
    gap: 8px;
    padding: 10px 10px;
    background: rgba(15, 15, 16, .92);
    border-top: 1px solid rgba(255, 255, 255, .06);
    backdrop-filter: blur(10px);
}

.es-bottom-nav a {
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 800;
    color: rgba(255, 255, 255, .70);
    background: rgba(255, 255, 255, .04);
}

.es-bottom-nav a.is-active {
    background: rgba(225, 11, 26, .18);
    color: var(--text);
}

.es-favs-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: var(--panel);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    transform: translateY(110%);
    transition: transform .22s ease;
    padding: 12px;
    max-height: 65vh;
    overflow: auto;
}

.es-favs-drawer.is-open {
    transform: translateY(0)
}

.es-favs-head {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.es-x {
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 26px;
    cursor: pointer
}

.es-favs-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85)
}




.es-ligas-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width:900px) {
    .es-ligas-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}



.es-liga-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    background: #111
}

.es-liga-logo--empty {
    background: rgba(255, 255, 255, .06)
}



/* Espacio entre botón VER y banner interior */
.es-card-body .es-btn {
    margin-bottom: 14px;
    /* separa el botón del contenido siguiente */
}

/* Espacio superior del banner interior */
.es-inner-banner {
    margin-top: 10px;
}

/* Link "Abrir en YouTube" */
.es-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 6px 0 14px;
    /* espacio arriba y abajo */
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    color: rgba(255, 255, 255, .85);
}

.es-link:hover {
    background: rgba(255, 255, 255, .10);
}

/* iconito play opcional */
.es-link::before {
    content: "▶";
    font-size: 11px;
    opacity: .85;
}

/* Botón VER — base */
.es-btn {
    position: relative;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

/* Hover */
.es-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 24px rgba(225, 11, 26, .35),
        0 0 0 2px rgba(225, 11, 26, .25);
    filter: brightness(1.05);
}

.es-btn:active {
    transform: scale(.97);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35) inset;
}

/* EN VIVO pulsante (CSS liviano) */
.es-badge.is-live {
    position: relative;
    animation: esLiveGlow 1.4s ease-in-out infinite;
}

@keyframes esLiveGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(225, 11, 26, .0);
        filter: brightness(1);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(225, 11, 26, .14);
        filter: brightness(1.08);
    }
}

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .es-badge.is-live {
        animation: none;
    }
}

/* Secciones (Chile / Internacional) */
.es-section-head {
    margin: 6px 2px 10px;
}

.es-section-title {
    font-weight: 1000;
    font-size: 16px;
    letter-spacing: .2px;
}

.es-section-sub {
    margin-top: 4px;
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    font-weight: 700;
}

/* Card de liga más pro (consolidado) */

.es-liga-card {
    text-decoration: none;

    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;

    padding: 12px;

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

    position: relative;
    overflow: hidden;

    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}



.es-liga-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    background: rgba(255, 255, 255, .05);
}

.es-liga-pill {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(225, 11, 26, .16);
    border: 1px solid rgba(225, 11, 26, .22);
    color: rgba(255, 255, 255, .9);
    font-weight: 900;
    font-size: 11px;
    white-space: nowrap;
}

.es-liga-name {
    font-weight: 950;
    line-height: 1.1;
}

/* BANNERS — limitar ancho en pantallas grandes */
.es-banner {
    max-width: 1100px;
    /* puedes probar 1000 / 1200 */
    margin-left: auto;
    margin-right: auto;
}

/* ===============================
   ESFERA SPORT — YOUTUBE EMBED
   Control tamaño desktop
================================ */

.es-video-wrap {
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
}

.es-video-inner {
    width: 100%;
    max-width: 920px;
    /* controla tamaño en PC */
}

.es-video-inner .es-yt {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .38);
}

/* pantallas grandes */
@media (min-width: 1400px) {
    .es-video-inner {
        max-width: 860px;
    }
}

/* ===============================
   MOBILE TUNING (<=480px)
================================ */
@media (max-width: 480px) {

    /* App: un poquito menos de padding lateral */
    .es-app {
        padding: 12px;
    }

    /* Header: más compacto */
    .es-header {
        padding: 12px 12px 8px;
    }

    .es-tabs {
        gap: 8px;
    }

    .es-tab {
        padding: 9px 10px;
        font-size: 12px;
    }

    /* Cards: menos “aire” */
    .es-card-head {
        padding: 10px;
        gap: 10px;
    }

    .es-time {
        min-width: 48px;
        padding: 7px 8px;
        border-radius: 10px;
    }

    .es-row {
        gap: 6px;
    }

    .es-teamlogo {
        width: 20px;
        height: 20px;
    }

    .es-score {
        padding: 3px 7px;
        border-radius: 9px;
    }

    /* BANNERS: limitar altura visual en mobile */
    .es-banner {
        border-radius: 12px;
    }

    .es-banner img {
        width: 100%;
        height: 120px;
        /* 👈 clave: evita banner “gigante” */
        object-fit: cover;
        /* recorta bonito sin deformar */
        display: block;
    }

    /* Bottom nav: más usable (tamaño dedo) */
    .es-bottom-nav {
        padding: 10px 8px;
    }

    .es-bottom-nav a {
        padding: 10px 10px;
        font-size: 14px;
    }

    /* Asegura que el contenido no choque con la nav fija */
    .es-main {
        padding-bottom: 86px;
    }
}

/* ===============================
   BANNERS — MOBILE PROPORTIONAL
================================ */
@media (max-width: 600px) {

    /* contenedor */
    .es-banner {
        border-radius: 12px;
    }


}

/* ===============================
   FIX: BADGES (EN VIVO / PRÓXIMO)
================================ */
.es-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    /* 👈 evita EN / VIVO en 2 líneas */
    line-height: 1;
    /* 👈 evita cortes verticales */
    min-height: 22px;
    /* 👈 asegura alto suficiente */
}

/* ===============================
   FIX: GRID LIGAS EN MOBILE CHICO
================================ */
@media (max-width: 480px) {
    .es-ligas-grid {
        grid-template-columns: 1fr;
        /* 👈 1 columna en 320px */
    }
}

/* ===============================
   LOGO HEADER — ESFERA SPORT
================================ */

.es-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
}

.es-logo img {
    height: 45px;
    width: auto;
    display: block;
}

/* Mobile */
@media (max-width:480px) {

    .es-logo {
        margin-bottom: 12px;
    }

    .es-logo img {
        height: 42px;
    }

}




/* ===============================
   AGENDA — separador de día compacto
================================ */

.es-day-sep {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px 2px;
    /* ⬅️ alineado a la izquierda */

    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .10);
    width: fit-content;
}

.es-day-title {
    font-weight: 900;
    letter-spacing: .3px;
    font-size: 11px;
}

.es-day-sub {
    font-weight: 800;
    font-size: 10px;
    opacity: .7;
}

/* separa listas entre días*/
.es-agenda .es-list {
    margin-bottom: 14px;
}


/* =================================
   DEPORTES — IDENTIDAD VISUAL
================================= */

.es-card {
    position: relative;
}

/* línea lateral deportiva */
.es-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
    opacity: .95;
}

/* ⚽ FÚTBOL */
.es-sport-futbol::before {
    background: #e10b1a;
    box-shadow: 0 0 18px rgba(225, 11, 26, .35);
}

/* 🏀 BASKET */
.es-sport-basket::before {
    background: #ff8a00;
    box-shadow: 0 0 18px rgba(255, 138, 0, .35);
}

/* 🏐 VÓLEY */
.es-sport-voley::before {
    background: #00b7ff;
    box-shadow: 0 0 18px rgba(0, 183, 255, .35);
}

/* 🎾 TENIS */
.es-sport-tenis::before {
    background: #78d64b;
    box-shadow: 0 0 18px rgba(120, 214, 75, .35);
}

/* =================================
   DEPORTES — INDICADOR COMPETENCIA
================================= */

.es-league {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* circulito base */
.es-league::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* ⚽ fútbol */
.es-league-futbol::before {
    background: #e10b1a;
    box-shadow: 0 0 10px rgba(225, 11, 26, .45);
}

/* 🏀 basket */
.es-league-basket::before {
    background: #ff8a00;
    box-shadow: 0 0 10px rgba(255, 138, 0, .45);
}

/* 🏐 vóley */
.es-league-voley::before {
    background: #00b7ff;
    box-shadow: 0 0 10px rgba(0, 183, 255, .45);
}

/* 🎾 tenis */
.es-league-tenis::before {
    background: #78d64b;
    box-shadow: 0 0 10px rgba(120, 214, 75, .45);
}

/* =================================
   TABS — SCROLL HORIZONTAL
================================= */

.es-tabs,
.es-sports-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.es-tabs::-webkit-scrollbar,
.es-sports-tabs::-webkit-scrollbar {
    display: none;
}

/* evita saltos */
.es-tab {
    flex-shrink: 0;
    white-space: nowrap;
}


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

.es-sports-tabs {

    display: flex;

    gap: 6px;

    margin-top: 7px;

    overflow-x: auto;

    scrollbar-width: none;
    -ms-overflow-style: none;

    padding-bottom: 2px;
}

.es-sports-tabs::-webkit-scrollbar {
    display: none;
}

/* filtros deportivos estilo app */
.es-tab-sport {

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

    letter-spacing: .15px;

    padding: 5px 8px;

    border-radius: 999px;

    background: rgba(255, 255, 255, .025);
    border: 1px solid rgba(255, 255, 255, .045);

    color: rgba(255, 255, 255, .62);

    opacity: .92;

    text-transform: uppercase;

    line-height: 1;

    backdrop-filter: blur(3px);

    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

/* hover muy sutil */
.es-tab-sport:hover {

    background: rgba(255, 255, 255, .055);

    border-color: rgba(255, 255, 255, .08);

    color: rgba(255, 255, 255, .88);
}

/* mobile feeling */
@media (max-width: 768px) {

    .es-tabs {
        gap: 8px;
    }

    .es-tab {
        padding: 9px 11px;
        font-size: 12px;
    }

    /* filtros deportivos */
    .es-sports-tabs {
        gap: 5px;
    }

    .es-tab-sport {

        font-size: 9px;

        padding: 5px 7px;

        border-radius: 999px;
    }
}


/* =================================
   SPORTS TABS BOXEOOOOOO NUEVO
================================= */

/* 🥊 BOXEO */
.es-sport-boxeo::before {
    background: #ffcc00;
    box-shadow: 0 0 18px rgba(255, 204, 0, .35);
}

/* 🥊 boxeo */
.es-league-boxeo::before {
    background: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, .45);
}

/* =================================
   BANNERS PROPORCIONES FIJAS
================================= */

/* TOP */
.es-banner--top {

    height: 100px;

    overflow: hidden;
}

/* INFEED */
.es-banner--infeed {

    height: 100px;

    overflow: hidden;
}

/* INTERIOR */
.es-banner--inner {

    height: 90px;

    overflow: hidden;
}