:root {
    --primary: #ffd400;
    --primary-hover: #ffe75a;
    --secondary: #ff9f1c;
    --special: #ffd400;
    --bg-dark: #07090c;
    --bg-med: #101318;
    --bg-light: #171b21;
    --border-color: rgba(255, 212, 0, 0.22);
    --text-light: #f7f8fa;
    --text-dark: #090a0c;
    --shadow-color: rgba(255, 212, 0, 0.25);
    --radius: 14px;
}

html {
    background: #07090c;
}

body {
    color: #f7f8fa;
    background:
        radial-gradient(circle at 50% -20%, rgba(255,212,0,.17), transparent 34%),
        radial-gradient(circle at 100% 35%, rgba(255,159,28,.07), transparent 28%),
        linear-gradient(145deg, #050608 0%, #0b0e12 50%, #07090c 100%);
    background-attachment: fixed;
}

/* CABECERA */

.header-wrapper {
    background:
        linear-gradient(135deg, rgba(24,28,34,.98), rgba(8,10,13,.98));
    border: 1px solid rgba(255,212,0,.18);
    border-top: none;
    box-shadow:
        0 14px 40px rgba(0,0,0,.48),
        inset 0 -1px 0 rgba(255,212,0,.08);
    border-radius: 0 0 28px 28px;
}

.top-bar {
    align-items: center;
}

#logo-container {
    gap: 14px;
}

#logo-container::after {
    content: "ZEPPPLAY";
    color: #ffd400;
    font-size: 25px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 0 22px rgba(255,212,0,.35);
}

#app-logo {
    max-height: 70px;
    filter: drop-shadow(0 5px 13px rgba(255,212,0,.2));
}

#current-time {
    color: #ffd400;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,212,0,.35);
    box-shadow: inset 0 0 16px rgba(255,212,0,.04);
    font-variant-numeric: tabular-nums;
}

.settings-icon {
    color: #ffd400;
    background: rgba(0,0,0,.35);
    border-color: rgba(255,212,0,.35);
}

.settings-icon svg {
    stroke: #ffd400;
}

.settings-icon:hover {
    background: #ffd400;
    border-color: #ffd400;
    box-shadow: 0 0 22px rgba(255,212,0,.3);
}

.settings-icon:hover svg {
    stroke: #080a0d;
}

/* BOTONES PRINCIPALES */

#channel-select-btn,
#online-search-btn,
#global-search-btn {
    color: #090a0c;
    background: linear-gradient(135deg, #ffe548, #ffc400);
    border: 1px solid #ffe66a;
    box-shadow:
        0 8px 20px rgba(255,196,0,.16),
        inset 0 1px 0 rgba(255,255,255,.4);
    transition: transform .18s ease, box-shadow .18s ease;
}

#channel-select-btn:hover,
#online-search-btn:hover,
#global-search-btn:hover {
    color: #090a0c;
    background: linear-gradient(135deg, #fff076, #ffd400);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255,212,0,.3);
}

.filter-btn,
.reload-btn {
    color: #ffd400;
    background: rgba(5,7,9,.62);
    border-color: rgba(255,212,0,.48);
}

.filter-btn:hover,
.reload-btn:hover {
    color: #090a0c;
    background: #ffd400;
    border-color: #ffd400;
    box-shadow: 0 0 20px rgba(255,212,0,.25);
}

.reload-btn svg {
    stroke: currentColor;
}

/* FILTROS Y MENÚS */

.filter-dropdown,
.settings-menu {
    color: #f7f8fa;
    background: #15191f;
    border: 1px solid rgba(255,212,0,.25);
    box-shadow: 0 18px 38px rgba(0,0,0,.65);
}

.filter-dropdown .filter-option-item,
.settings-menu-item {
    color: #f1f3f5;
}

.filter-dropdown .filter-option-item:hover,
.settings-menu-item:hover {
    color: #090a0c;
    background: #ffd400;
}

.filter-dropdown .filter-option-item.selected {
    color: #090a0c;
    background: linear-gradient(135deg, #ffe75a, #ffc400);
}

/* PARRILLA */

.epg-day-grid {
    gap: 11px;
}

.channel-row {
    background:
        linear-gradient(105deg, rgba(18,21,26,.98), rgba(11,13,17,.98));
    border: 1px solid rgba(255,255,255,.07);
    border-left: 3px solid rgba(255,212,0,.75);
    border-radius: 13px;
    box-shadow: 0 7px 22px rgba(0,0,0,.28);
}

.channel-row:hover {
    border-color: rgba(255,212,0,.28);
    border-left-color: #ffd400;
    box-shadow: 0 10px 28px rgba(0,0,0,.42);
}

.channel-info {
    border-right-color: rgba(255,212,0,.17);
}

.channel-info span {
    color: #f7f8fa;
    text-shadow: 0 1px 2px #000;
}

.channel-info img {
    filter: drop-shadow(0 4px 7px rgba(0,0,0,.65));
}

.program {
    color: #f7f8fa;
    background:
        linear-gradient(145deg, rgba(33,37,44,.98), rgba(21,24,29,.98));
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.program:hover {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(56,53,31,.98), rgba(29,28,20,.98));
    border-color: rgba(255,212,0,.58);
    transform: translateY(-1px);
}

.program.is-live {
    background:
        linear-gradient(145deg, rgba(61,56,23,.98), rgba(27,27,21,.98));
    border: 1px solid #ffd400;
    box-shadow:
        0 0 0 1px rgba(255,212,0,.1),
        0 0 18px rgba(255,212,0,.09);
}

.program-time {
    color: #ffd95a;
    font-variant-numeric: tabular-nums;
}

.program-title {
    color: #fff;
}

.program-past {
    opacity: .43;
}

.live-progress-container {
    height: 4px;
    background: rgba(255,255,255,.08);
}

.live-progress-bar {
    background: linear-gradient(90deg, #ff9f1c, #ffd400);
    box-shadow: 0 0 8px rgba(255,212,0,.65);
}

/* MODALES */

.modal {
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(7px);
}

.modal-content {
    color: #f5f6f7;
    background: linear-gradient(145deg, #171b21, #0d1014);
    border: 1px solid rgba(255,212,0,.25);
    box-shadow: 0 25px 70px rgba(0,0,0,.7);
}

.modal-header,
.modal-footer {
    border-color: rgba(255,212,0,.18);
}

.modal-header h2,
.modal-body,
.modal-section-title {
    color: #f7f8fa;
}

.modal-header .close-btn,
.modal-footer .action-btn,
.modal-body .action-btn,
#global-search-run-btn {
    color: #090a0c;
    background: #ffd400;
}

.channel-action-btn {
    color: #ffd400;
    background: #12161b;
    border-color: rgba(255,212,0,.35);
}

/* CARGA */

.loader-overlay {
    color: #f7f8fa;
    background:
        radial-gradient(circle, rgba(255,212,0,.14), transparent 35%),
        #080a0d;
}

.loader-overlay p {
    color: #ffd400;
}

.loader-spinner {
    border-color: rgba(255,255,255,.1);
    border-top-color: #ffd400;
    box-shadow: 0 0 20px rgba(255,212,0,.28);
}

/* BALÓN Y GUÍA DE FÚTBOL */

#football-guide-btn img {
    border: 2px solid #ffd400;
    box-shadow: 0 0 16px rgba(255,212,0,.25);
    filter: grayscale(1) sepia(1) saturate(6) hue-rotate(355deg);
}

/* BARRAS DE DESPLAZAMIENTO */

* {
    scrollbar-width: thin;
    scrollbar-color: #756715 #15181d;
}

*::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

*::-webkit-scrollbar-track {
    background: #15181d;
    border-radius: 20px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #9c8511, #ffd400);
    border-radius: 20px;
    border: 2px solid #15181d;
}

/* MÓVIL */

@media (max-width: 768px) {
    body {
        padding-left: 7px;
        padding-right: 7px;
    }

    .header-wrapper {
        padding-top: 48px;
        background: rgba(10,12,15,.97);
        backdrop-filter: blur(15px);
        border-radius: 0 0 20px 20px;
    }

    #logo-container {
        margin-bottom: 10px;
        gap: 9px;
    }

    #logo-container::after {
        font-size: 19px;
        letter-spacing: 1.3px;
    }

    #app-logo {
        max-height: 48px;
    }

    #current-time {
        font-size: 14px;
        padding: 7px 11px;
    }

    #channel-select-btn,
    #online-search-btn,
    #global-search-btn {
        min-height: 42px;
        border-radius: 13px;
    }

    .channel-row {
        min-height: 94px;
        padding: 7px;
        border-radius: 11px;
    }

    .channel-info {
        width: 71px;
    }

    .program {
        width: 150px;
        height: 78px;
        border-radius: 8px;
    }
}

/* CORRECCIÓN DEFINITIVA DEL LOGO */

@media (min-width: 769px) {
    #logo-container {
        position: absolute !important;
        top: 12px !important;
        bottom: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        height: 92px;
        white-space: nowrap;
    }

    #app-logo {
        order: 1;
        display: block;
        width: 88px !important;
        height: 88px !important;
        max-width: 88px !important;
        max-height: 88px !important;
        object-fit: contain;
        flex-shrink: 0;
    }

    #logo-container::after {
        order: 2;
        font-size: 29px;
    }

    #logo-container .fullscreen-toggle {
        order: 3;
        margin-left: 5px;
        color: #ffd400;
        background: rgba(0,0,0,.35);
        border-color: rgba(255,212,0,.45);
    }

    #logo-container .fullscreen-toggle svg {
        stroke: #ffd400;
    }
}

@media (max-width: 768px) {
    #app-logo {
        display: block;
        width: 62px !important;
        height: 62px !important;
        max-width: 62px !important;
        max-height: 62px !important;
        object-fit: contain;
    }
}

/* Botones del selector de canales */
#uncheck-all-channels-btn,
#open-channel-order-btn {
    color: #090a0c !important;
    background: linear-gradient(135deg, #ffe75a, #ffc400) !important;
    border: 1px solid #ffe66a !important;
    font-weight: 800 !important;
}

#uncheck-all-channels-btn:hover,
#open-channel-order-btn:hover {
    background: #fff078 !important;
}

/* =====================================================
   ZEPPPLAY — DISEÑO MÓVIL AVANZADO
   ===================================================== */

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        min-height: 100%;
        overflow-x: hidden;
        background: #07090c;
    }

    body {
        margin: 0 !important;
        padding:
            env(safe-area-inset-top)
            5px
            env(safe-area-inset-bottom) !important;
    }

    /* Cabecera compacta */

    .header-wrapper {
        position: sticky !important;
        top: 0;
        z-index: 100;
        width: 100%;
        margin: 0 0 7px !important;
        padding: 8px !important;
        border-radius: 0 0 18px 18px !important;
        background: rgba(8,10,13,.96) !important;
        border: 1px solid rgba(255,212,0,.18);
        border-top: none;
        box-shadow: 0 10px 30px rgba(0,0,0,.52);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .top-bar {
        display: grid !important;
        grid-template-columns: auto minmax(0,1fr) auto;
        align-items: center !important;
        gap: 7px;
        width: 100%;
        padding: 0 !important;
        margin: 0 !important;
    }

    #current-time {
        grid-column: 1;
        min-width: 72px;
        padding: 7px 8px !important;
        font-size: 13px !important;
        text-align: center;
        border-radius: 12px;
    }

    #logo-container {
        grid-column: 2;
        position: static !important;
        width: auto !important;
        min-width: 0;
        height: 52px;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        overflow: visible;
    }

    #app-logo {
        display: block !important;
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
        object-fit: contain !important;
        flex: 0 0 50px;
    }

    #logo-container::after {
        content: "ZEPPPLAY";
        display: block;
        font-size: clamp(15px, 5vw, 21px) !important;
        font-weight: 900;
        line-height: 1;
        letter-spacing: .8px !important;
        white-space: nowrap;
    }

    .settings-container {
        grid-column: 3;
        position: relative;
    }

    .settings-icon {
        width: 40px !important;
        height: 40px !important;
    }

    .settings-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Zona de navegación */

    .header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
        gap: 7px !important;
        padding-top: 8px !important;
    }

    .header-buttons-container {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0,1fr)) 44px;
        width: 100% !important;
        gap: 5px !important;
        overflow: visible !important;
    }

    #channel-select-btn,
    #online-search-btn,
    #global-search-btn {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 7px 4px !important;
        gap: 4px;
        border-radius: 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
        text-overflow: clip;
    }

    #channel-select-btn svg,
    #online-search-btn svg,
    #global-search-btn svg {
        width: 15px !important;
        height: 15px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }

    #football-guide-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 42px !important;
        min-width: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(255,212,0,.4) !important;
        border-radius: 12px !important;
        background: rgba(0,0,0,.4) !important;
        line-height: normal !important;
    }

    #football-guide-btn img {
        width: 32px !important;
        height: 32px !important;
        margin: 0 !important;
        border-width: 1px;
    }

    /* Filtros de fecha y hora */

    .controls-container {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px;
        gap: 6px !important;
        width: 100%;
        margin: 0 !important;
    }

    .filter-container {
        width: 100%;
    }

    .filter-btn {
        width: 100%;
        min-width: 0 !important;
        min-height: 40px;
        padding: 7px 5px !important;
        border-radius: 11px !important;
        font-size: 12px !important;
    }

    .reload-btn {
        width: 42px !important;
        height: 40px !important;
        border-radius: 11px !important;
    }

    .filter-dropdown {
        position: fixed !important;
        top: auto !important;
        right: 8px !important;
        bottom: 10px !important;
        left: 8px !important;
        width: auto !important;
        max-height: 62vh;
        margin: 0 !important;
        padding: 7px;
        transform: none !important;
        border-radius: 17px;
        z-index: 1500;
    }

    .filter-dropdown .filter-option-item {
        min-height: 44px;
        padding: 12px 14px;
        border-radius: 10px;
        display: flex;
        align-items: center;
    }

    /* Parrilla móvil */

    .epg-container {
        width: 100%;
        min-width: 0;
    }

    .epg-day-grid,
    .epg-day-grid.active {
        width: 100%;
        max-height: calc(100dvh - 166px) !important;
        gap: 7px !important;
        padding: 0 1px 70px !important;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .channel-row {
        width: 100%;
        min-height: 86px !important;
        padding: 6px !important;
        border-left-width: 2px;
        border-radius: 10px !important;
        overflow: hidden;
    }

    .channel-info {
        width: 65px !important;
        min-width: 65px;
        padding: 3px 6px 3px 1px !important;
        border-right: 1px solid rgba(255,212,0,.15);
    }

    .channel-info img {
        max-width: 52px !important;
        max-height: 38px !important;
        margin-bottom: 4px;
    }

    .channel-info span {
        width: 100%;
        font-size: 11px !important;
        line-height: 1.15;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .programs-container {
        min-width: 0;
        padding-left: 6px !important;
        gap: 0;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .programs-container::-webkit-scrollbar {
        display: none;
    }

    .program {
        width: 145px !important;
        height: 72px !important;
        margin-right: 6px !important;
        padding: 6px 7px !important;
        border-radius: 8px !important;
        scroll-snap-align: start;
    }

    .program-time {
        font-size: 11px !important;
        line-height: 1.15;
        margin-bottom: 3px;
    }

    .program-title {
        font-size: 13px !important;
        line-height: 1.18 !important;
        -webkit-line-clamp: 2;
    }

    .live-progress-container {
        height: 4px;
    }

    /* Ventanas y menús a pantalla completa */

    .modal {
        align-items: stretch !important;
        padding: 0 !important;
    }

    .modal-content {
        width: 100% !important;
        max-width: none !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .modal-header {
        min-height: 62px;
        padding:
            max(12px, env(safe-area-inset-top))
            14px
            10px !important;
        background: rgba(12,15,19,.98);
        position: sticky;
        top: 0;
        z-index: 4;
    }

    .modal-header h2 {
        padding-right: 8px;
        font-size: 18px !important;
    }

    .modal-header .close-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
        padding: 0 !important;
        border-radius: 13px !important;
        font-size: 22px;
    }

    .modal-body {
        flex: 1 1 auto;
        padding: 14px 12px 90px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        position: sticky;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 5;
        min-height: 70px;
        padding:
            10px
            12px
            max(10px, env(safe-area-inset-bottom)) !important;
        background: rgba(10,12,15,.98);
        box-shadow: 0 -10px 24px rgba(0,0,0,.42);
    }

    .modal-footer .action-btn {
        width: 100%;
        min-height: 48px;
        border-radius: 13px !important;
        font-size: 15px;
        font-weight: 900;
    }

    /* Selector de canales */

    #category-highlight-container {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 8px !important;
    }

    .category-item {
        min-height: 43px;
        padding: 8px;
        border: 1px solid rgba(255,212,0,.16);
        border-radius: 10px;
        background: rgba(255,255,255,.035);
        font-size: 13px;
    }

    .channel-actions-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 7px !important;
    }

    .channel-action-btn {
        width: 100%;
        min-height: 43px;
        padding: 7px 5px !important;
        border-radius: 11px !important;
        font-size: 12px;
    }

    #channel-filter-input,
    #global-search-input,
    #tmdb-search-input {
        min-height: 46px;
        font-size: 16px !important;
        border-radius: 13px !important;
    }

    .channel-list-item {
        min-height: 44px;
        padding: 7px 4px;
        border-bottom: 1px solid rgba(255,255,255,.055);
    }

    .channel-list-item label {
        width: 100%;
        font-size: 14px;
    }

    .channel-list-item input {
        width: 21px !important;
        height: 21px !important;
    }

    /* Buscadores */

    #search-form-container {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
    }

    #global-search-run-btn,
    #tmdb-search-btn {
        width: 100%;
        min-height: 46px;
        border-radius: 12px !important;
    }

    .search-controls-wrapper {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .global-search-result-item {
        padding: 10px !important;
        border-radius: 11px !important;
    }

    .gs-channel-logo {
        width: 55px !important;
    }

    .gs-program-info h5 {
        font-size: 15px !important;
    }

    /* Detalles de programas */

    .modal-poster,
    #tmdb-detailed-view .poster {
        float: none !important;
        width: 100% !important;
        max-width: 230px !important;
        margin: 0 auto 15px !important;
    }

    .details-summary {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    /* Menú de ajustes */

    .settings-menu {
        position: fixed !important;
        top: 70px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto;
        min-width: 0;
        border-radius: 15px;
    }

    .settings-menu-item {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 12px 15px;
    }

    /* Indicadores laterales */

    .scroll-nav-btn {
        width: 38px !important;
        height: 54px !important;
    }
}

/* Móviles muy estrechos */

@media (max-width: 390px) {
    #current-time {
        min-width: 65px;
        padding: 6px 5px !important;
        font-size: 12px !important;
    }

    #app-logo {
        width: 43px !important;
        height: 43px !important;
        max-width: 43px !important;
        max-height: 43px !important;
        flex-basis: 43px;
    }

    #logo-container::after {
        font-size: 15px !important;
    }

    #channel-select-btn,
    #online-search-btn,
    #global-search-btn {
        font-size: 11px !important;
    }

    .channel-info {
        width: 59px !important;
        min-width: 59px;
    }

    .program {
        width: 136px !important;
    }
}

/* Móvil horizontal: máxima superficie para la parrilla */

@media (orientation: landscape) and (max-height: 500px) {
    body {
        padding: 3px !important;
    }

    .header-wrapper {
        display: none !important;
    }

    .epg-day-grid,
    .epg-day-grid.active {
        max-height: calc(100dvh - 6px) !important;
        padding-bottom: 10px !important;
    }
}

/* BOTÓN EVENTOS DEL DÍA */

#football-guide-btn {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 20px !important;
    color: #090a0c !important;
    background: linear-gradient(135deg, #ffe548, #ffc400) !important;
    border: 1px solid #ffe66a !important;
    border-radius: 25px !important;
    box-shadow:
        0 8px 20px rgba(255,196,0,.16),
        inset 0 1px 0 rgba(255,255,255,.4) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: normal !important;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

#football-guide-btn:hover {
    color: #090a0c !important;
    background: linear-gradient(135deg, #fff076, #ffd400) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255,212,0,.3) !important;
}

#football-guide-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

#football-guide-btn img {
    display: none !important;
}

/* Distribución móvil de cuatro botones */

@media (max-width: 768px) {
    .header-buttons-container {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    }

    #football-guide-btn {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        height: 42px !important;
        padding: 7px 4px !important;
        border-radius: 12px !important;
        gap: 5px !important;
        font-size: 12px !important;
    }

    #football-guide-btn svg {
        width: 15px;
        height: 15px;
    }
}

/* CORRECCIÓN DEL BOTÓN EVENTOS DEL DÍA */

.header-buttons-container {
    align-items: center !important;
    overflow: visible !important;
}

#football-guide-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    height: auto !important;
    min-height: 42px !important;
    padding: 12px 24px !important;
    border-radius: 25px !important;
    overflow: hidden !important;
}

#football-guide-btn span {
    display: inline-block !important;
    position: static !important;
    width: auto !important;
    white-space: nowrap !important;
    color: #090a0c !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    #football-guide-btn {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 7px 5px !important;
        border-radius: 12px !important;
    }

    #football-guide-btn span {
        font-size: 12px !important;
        white-space: normal !important;
        text-align: center;
    }
}

/* =====================================================
   EVENTOS DEL DÍA — TEMA OSCURO ZEPPPLAY
   ===================================================== */

#footballModal {
    background: rgba(0,0,0,.86) !important;
}

#footballModal .modal-content {
    color: #f7f8fa !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,212,0,.09), transparent 28%),
        linear-gradient(145deg, #14181e, #080a0d) !important;
    border: 1px solid rgba(255,212,0,.25) !important;
}

#footballModal .modal-header {
    background: #0c0f13 !important;
    border-bottom: 1px solid rgba(255,212,0,.28) !important;
}

#footballModal .modal-header h2 {
    color: #fff !important;
}

#football-modal-body {
    color: #f7f8fa !important;
    background:
        radial-gradient(circle at 50% -10%, rgba(255,212,0,.1), transparent 25%),
        #090b0f !important;
}

/* Pestañas de competiciones */

.quick-guide-nav {
    gap: 8px !important;
    padding: 10px 4px !important;
}

.quick-guide-tab {
    color: #e8eaed !important;
    background: #181c22 !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.quick-guide-tab:hover {
    color: #ffd400 !important;
    border-color: rgba(255,212,0,.5) !important;
}

.quick-guide-tab.active {
    color: #090a0c !important;
    background: linear-gradient(135deg, #ffe65c, #ffc400) !important;
    border-color: #ffd400 !important;
    box-shadow: 0 6px 18px rgba(255,212,0,.2);
}

/* Selector de equipos */

.guide-team-filter-container {
    width: 100% !important;
    margin: 4px 0 8px !important;
}

#quick-guide-filter-btn {
    width: 100% !important;
    min-height: 46px;
    color: #ffd400 !important;
    background: linear-gradient(145deg, #20242b, #15181d) !important;
    border: 1px solid rgba(255,212,0,.45) !important;
    border-radius: 13px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.3);
}

#quick-guide-filter-btn:hover {
    color: #090a0c !important;
    background: #ffd400 !important;
}

.guide-team-filter-container .filter-dropdown {
    color: #f7f8fa !important;
    background: #15191f !important;
    border-color: rgba(255,212,0,.3) !important;
}

/* Fechas */

.quick-guide-date-header {
    color: #090a0c !important;
    background: linear-gradient(135deg, #ffe75a, #ffc400) !important;
    border: 1px solid #ffeb74;
    box-shadow: 0 7px 20px rgba(255,212,0,.18) !important;
}

/* Tarjetas de partidos */

.scraped-match-card {
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(29,33,40,.98), rgba(16,19,24,.98)) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-left: 3px solid #ffd400 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.35) !important;
}

.scraped-match-card:hover {
    border-color: rgba(255,212,0,.55) !important;
    border-left-color: #ffd400 !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.48) !important;
}

.scraped-match-card span,
.scraped-match-card div {
    color: #f7f8fa !important;
}

.scraped-match-card span[style*="color: #888"] {
    color: #81868f !important;
}

/* Hora del partido */

.scraped-time {
    color: #090a0c !important;
    background: linear-gradient(135deg, #ffe75a, #ffc400) !important;
    border: 1px solid #ffeb7a !important;
    box-shadow: 0 4px 12px rgba(255,212,0,.18) !important;
}

/* Escudos */

.team-shield-large {
    filter: drop-shadow(0 5px 8px rgba(0,0,0,.55));
}

/* Canales disponibles */

.scraped-channels-box {
    background: rgba(0,0,0,.28) !important;
    border: 1px solid rgba(255,212,0,.12) !important;
    border-top-color: rgba(255,212,0,.22) !important;
}

.scraped-channels-box .channel-pill {
    color: #ffd94a !important;
    background: rgba(255,212,0,.08) !important;
    border: 1px solid rgba(255,212,0,.4) !important;
    box-shadow: inset 0 0 12px rgba(255,212,0,.025);
}

/* Mensajes sin partidos */

.empty-matches-container,
.empty-matches-container p,
.empty-matches-container strong {
    color: #aeb4bd !important;
}

/* Ajustes específicos para móvil */

@media (max-width: 768px) {
    #footballModal .modal-content {
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    #football-modal-body {
        padding: 8px 10px 30px !important;
    }

    .quick-guide-nav {
        margin: 0 -2px 5px;
        padding: 9px 2px !important;
    }

    .quick-guide-tab {
        min-height: 42px;
        padding: 9px 15px !important;
        font-size: 13px !important;
    }

    .quick-guide-date-header {
        margin-top: 11px !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    .scraped-match-card {
        padding: 12px 10px !important;
        margin-bottom: 9px !important;
        border-radius: 12px !important;
    }

    .scraped-match-header {
        gap: 7px !important;
    }

    .scraped-time {
        min-width: 63px !important;
        padding: 7px 9px !important;
        font-size: 13px !important;
    }

    .team-shield-large {
        width: 36px !important;
        height: 36px !important;
    }

    .scraped-channels-box {
        padding: 8px !important;
    }

    .channel-pill {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
}

/* ANUNCIO SUPERIOR EN LA GUÍA DE USO */

.zeppplay-help-ad {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0 0 22px;
    padding: 17px 19px;
    color: #f7f8fa;
    background:
        radial-gradient(circle at 0 50%, rgba(255,212,0,.17), transparent 34%),
        linear-gradient(135deg, #20242b, #101318);
    border: 1px solid rgba(255,212,0,.45);
    border-left: 4px solid #ffd400;
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(0,0,0,.32);
    overflow: hidden;
}

.zeppplay-help-ad::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -35px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,212,0,.07);
}

.zeppplay-help-ad-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: #090a0c;
    background: linear-gradient(135deg, #ffe75a, #ffc400);
    border-radius: 13px;
    font-size: 23px;
    box-shadow: 0 6px 18px rgba(255,212,0,.2);
}

.zeppplay-help-ad-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.zeppplay-help-ad-content strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.25;
}

.zeppplay-help-ad-content span {
    color: #aeb4bd;
    font-size: 13px;
}

.zeppplay-help-ad-content a {
    width: fit-content;
    color: #ffd400;
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: .3px;
}

.zeppplay-help-ad-content a:hover {
    color: #fff078;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .zeppplay-help-ad {
        gap: 11px;
        margin-bottom: 17px;
        padding: 14px 12px;
        border-radius: 12px;
    }

    .zeppplay-help-ad-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .zeppplay-help-ad-content strong {
        font-size: 14px;
    }

    .zeppplay-help-ad-content span {
        font-size: 12px;
    }

    .zeppplay-help-ad-content a {
        font-size: 17px;
    }
}

/* BOTÓN FLOTANTE INSTALAR APP */

#install-app-btn {
    display: none;
}

@media (max-width: 768px) {
    #install-app-btn.visible {
        position: fixed;
        right: 16px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        z-index: 900;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 48px;
        padding: 10px 17px;
        color: #090a0c;
        background: linear-gradient(135deg, #ffe75a, #ffc400);
        border: 1px solid #fff078;
        border-radius: 25px;
        box-shadow:
            0 12px 32px rgba(0,0,0,.55),
            0 0 22px rgba(255,212,0,.23);
        font-family: inherit;
        font-size: 14px;
        font-weight: 900;
        cursor: pointer;
        animation: installButtonIn .35s ease-out;
    }

    #install-app-btn svg {
        width: 19px;
        height: 19px;
    }

    body.no-scroll #install-app-btn {
        display: none !important;
    }
}

@keyframes installButtonIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* VENTANA DE INSTRUCCIONES */

#install-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.84);
    backdrop-filter: blur(8px);
}

#install-help-overlay.visible {
    display: flex;
}

.install-help-card {
    position: relative;
    width: min(100%, 390px);
    padding: 25px 20px 22px;
    color: #f7f8fa;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,212,0,.13), transparent 33%),
        linear-gradient(145deg, #1b1f25, #0c0f13);
    border: 1px solid rgba(255,212,0,.42);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0,0,0,.75);
}

.install-help-card img {
    width: 85px;
    height: 85px;
    object-fit: contain;
}

.install-help-card h2 {
    margin: 8px 0 18px;
    color: #ffd400;
}

#install-instructions {
    color: #e8eaed;
    text-align: left;
    line-height: 1.5;
}

#install-instructions strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 17px;
    text-align: center;
}

#install-instructions ol {
    margin: 0;
    padding-left: 23px;
}

#install-instructions li {
    margin: 9px 0;
}

#install-help-close {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #090a0c;
    background: #ffd400;
    border: none;
    border-radius: 12px;
    font-size: 25px;
    font-weight: 900;
    cursor: pointer;
}

/* =====================================================
   SELECTOR DE CANALES — ESTILO ZEPPPLAY
   ===================================================== */

#channelSelectModal .modal-content {
    width: min(94vw, 850px);
    max-width: 850px;
    max-height: 92vh;
    color: #f7f8fa;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,212,0,.08), transparent 25%),
        linear-gradient(145deg, #171b21, #090b0f);
    border: 1px solid rgba(255,212,0,.28);
    border-radius: 20px;
    overflow: hidden;
}

#channelSelectModal .modal-header {
    min-height: 70px;
    padding: 15px 20px;
    background: rgba(10,12,15,.97);
    border-bottom: 1px solid rgba(255,212,0,.22);
}

#channelSelectModal .modal-header h2 {
    color: #fff;
    font-size: 21px;
}

#channelSelectModal .modal-body {
    padding: 18px 20px 95px;
    background: transparent;
}

#channelSelectModal .modal-section-title {
    margin: 20px 0 12px;
    padding: 0 0 9px;
    color: #ffd400;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,212,0,.25);
}

#channelSelectModal .modal-section-title:first-child {
    margin-top: 0;
}

/* Categorías */

#category-highlight-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 9px;
    margin-bottom: 22px;
}

#channelSelectModal .category-item {
    min-height: 48px;
    margin: 0;
    padding: 10px 11px;
    color: #dfe2e7;
    background: linear-gradient(145deg, #20242b, #15181d);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

#channelSelectModal .category-item:hover {
    border-color: rgba(255,212,0,.45);
    transform: translateY(-1px);
}

#channelSelectModal .category-item:has(input:checked) {
    color: #ffd400;
    background:
        linear-gradient(145deg, rgba(255,212,0,.12), rgba(30,30,22,.95));
    border-color: rgba(255,212,0,.62);
    box-shadow: inset 0 0 18px rgba(255,212,0,.035);
}

#channelSelectModal .category-item .custom-checkbox {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    background: #0c0f13 !important;
    border: 1px solid rgba(255,212,0,.4);
    border-radius: 6px;
}

#channelSelectModal .category-item input:checked + .custom-checkbox {
    background: #ffd400 !important;
    border-color: #ffeb77;
}

#channelSelectModal
.category-item
input:checked
+ .custom-checkbox::after {
    color: #090a0c !important;
    font-weight: 900;
}

/* Buscador */

#channel-filter-wrapper {
    margin-bottom: 12px;
}

#channel-filter-input {
    width: 100%;
    min-height: 48px;
    padding: 11px 44px 11px 15px !important;
    color: #fff !important;
    background: #101318 !important;
    border: 1px solid rgba(255,212,0,.3) !important;
    border-radius: 13px !important;
    outline: none;
}

#channel-filter-input::placeholder {
    color: #858b94;
}

#channel-filter-input:focus {
    border-color: #ffd400 !important;
    box-shadow: 0 0 0 3px rgba(255,212,0,.1);
}

/* Botones de acciones */

#channelSelectModal .channel-actions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 12px 0 17px;
}

#channelSelectModal .channel-action-btn {
    min-height: 44px;
    margin: 0;
    color: #090a0c !important;
    background: linear-gradient(135deg, #ffe75a, #ffc400) !important;
    border: 1px solid #ffeb75 !important;
    border-radius: 12px !important;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255,212,0,.1);
}

#channelSelectModal .channel-action-btn:hover {
    background: #fff078 !important;
    transform: translateY(-1px);
}

/* Lista de canales */

#channel-list-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px !important;
}

#channel-list-container .channel-list-item {
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 9px 11px;
    color: #e8eaed;
    background: linear-gradient(145deg, #1b1f25, #12151a);
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 11px;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

#channel-list-container .channel-list-item:hover {
    border-color: rgba(255,212,0,.4);
    transform: translateY(-1px);
}

#channel-list-container .channel-list-item:has(input:checked) {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255,212,0,.09), #17191b);
    border-color: rgba(255,212,0,.48);
}

#channel-list-container .channel-list-item label {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
}

#channel-list-container input[type="checkbox"] {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    margin: 0 10px 0 0;
    accent-color: #ffd400;
    cursor: pointer;
}

/* Pie y botón guardar */

#channelSelectModal .modal-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 12px 20px;
    background: rgba(9,11,15,.97);
    border-top: 1px solid rgba(255,212,0,.2);
    box-shadow: 0 -12px 28px rgba(0,0,0,.42);
    backdrop-filter: blur(14px);
}

#channelSelectModal #save-settings-btn {
    min-width: 210px;
    min-height: 47px;
    color: #090a0c;
    background: linear-gradient(135deg, #ffe75a, #ffc400);
    border: 1px solid #ffec83;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 900;
}

/* Ordenar canales */

#channelOrderModal .modal-content {
    color: #f7f8fa;
    background: linear-gradient(145deg, #171b21, #090b0f);
    border: 1px solid rgba(255,212,0,.25);
}

#channelOrderModal .channel-order-item {
    color: #f1f3f5;
    background: linear-gradient(145deg, #1d2128, #12151a);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 11px;
}

#channelOrderModal .channel-order-item:hover {
    background: rgba(255,212,0,.08);
    border-color: rgba(255,212,0,.4);
}

#channelOrderModal .channel-order-controls button {
    color: #090a0c;
    background: #ffd400;
}

/* Móvil */

@media (max-width: 768px) {
    #channelSelectModal .modal-content {
        width: 100% !important;
        max-width: none !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border: none !important;
        border-radius: 0 !important;
    }

    #channelSelectModal .modal-header {
        min-height: 62px;
        padding: 11px 12px;
    }

    #channelSelectModal .modal-header h2 {
        font-size: 17px !important;
    }

    #channelSelectModal .modal-body {
        padding: 13px 10px 90px !important;
    }

    #category-highlight-container {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        gap: 7px !important;
    }

    #channelSelectModal .category-item {
        min-height: 45px;
        padding: 8px;
        font-size: 12px;
    }

    #channel-list-container {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }

    #channel-list-container .channel-list-item {
        min-height: 47px;
        padding: 8px 10px;
    }

    #channelSelectModal .channel-actions-container {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    #channelSelectModal .channel-action-btn {
        min-height: 42px;
        padding: 6px;
        font-size: 12px;
    }

    #channelSelectModal .modal-footer {
        padding:
            10px
            10px
            max(10px, env(safe-area-inset-bottom)) !important;
    }

    #channelSelectModal #save-settings-btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
    }
}
