/* === Modern Dark (black) UI – drop-in replacement === */
:root {
    /* Paleta oscura */
    --bg: #0B0B0F;
    --panel: #111218;
    --panel2: #151821;
    --muted: #A0A3AD;
    --text: #ECEEF3;
    /* Accentos */
    --red: #E50914; /* Primario (Netflix-like) */
    --focus: #37B6FF; /* Anillo de enfoque/teclado */
    /* UI tokens */
    --stroke: rgba(255,255,255,.08);
    --radius: 14px;
    --radius-lg: 16px;
    --shadow: 0 8px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.02);
    --shadow-sm: 0 2px 12px rgba(0,0,0,.25);
    --press: translateY(1px) scale(.995);
}

* {
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text)
}

/* Header */
header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: saturate(1.1) blur(6px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff
}

    .logo img.logo-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        box-shadow: var(--shadow-sm)
    }

    .logo img.banner {
        height: 26px;
        filter: drop-shadow(0 2px 8px rgba(0,0,0,.5))
    }

.tabs {
    display: flex;
    gap: 18px;
    margin-left: 8px
}

.tab {
    background: transparent;
    border: none;
    color: #cfd3df;
    padding: 12px 6px;
    font-weight: 800;
    cursor: pointer;
    font-size: 18px;
    transition: color .2s ease,border-color .2s ease;
}

    .tab:hover {
        color: #fff
    }

    .tab.active {
        color: #fff;
        border-bottom: 3px solid var(--focus)
    }

.actions {
    margin-left: auto
}

.btn {
    background: var(--panel2);
    color: #fff;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .05s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    box-shadow: var(--shadow-sm);
}

    .btn:hover {
        background: #1a1f2a;
        border-color: #2a2f3a
    }

    .btn:active {
        transform: var(--press)
    }

    .btn.primary {
        background: var(--red);
        border: 1px solid transparent;
        box-shadow: 0 8px 24px rgba(229,9,20,.35)
    }

        .btn.primary:hover {
            filter: brightness(1.05)
        }

/* Layout general */
main {
    height: calc(100% - 56px);
    overflow: auto;
    scrollbar-gutter: stable
}

/* Live 3 columns */
.live-wrap {
    display: grid;
    grid-template-columns: 320px 460px 1fr;
    gap: 12px;
    height: 100%;
    padding: 12px;
}

.live-panel {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    overflow: auto;
    box-shadow: var(--shadow);
}

.search {
    padding: 8px;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.2))
}

    .search input {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid var(--stroke);
        background: #0E0F14;
        color: #fff;
        transition: border-color .2s, box-shadow .2s;
    }

        .search input:focus {
            border-color: rgba(55,182,255,.6);
            box-shadow: 0 0 0 3px rgba(55,182,255,.25);
        }

.live-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
    transition: background .15s ease;
}

    .live-cat-item:hover, .live-cat-item.active {
        background: #171b24
    }

.live-ch-item {
    display: grid;
    grid-template-columns: 56px 1fr 36px 36px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
    transition: background .15s ease, transform .05s;
}

    .live-ch-item:hover, .live-ch-item.active {
        background: #171b24
    }

    .live-ch-item:active {
        transform: var(--press)
    }

    .live-ch-item img {
        width: 56px;
        height: 40px;
        object-fit: contain;
        background: #0B0B0F;
        border-radius: 10px;
        border: 1px solid var(--stroke)
    }

    .live-ch-item .title {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis
    }

.player-side {
    position: relative;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

#liveVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000
}

.player-bar {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    z-index: 10
}

.player-btn {
    background: rgba(0,0,0,.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 800;
    transition: background .2s, border-color .2s, transform .05s
}

    .player-btn:hover {
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.35)
    }

    .player-btn:active {
        transform: var(--press)
    }

/* Home */
.section {
    padding: 16px
}

.hero {
    position: relative;
    height: 320px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--stroke);
    margin-bottom: 16px;
    box-shadow: var(--shadow)
}

    .hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .55;
        filter: saturate(1.05) contrast(1.05)
    }

    .hero .txt {
        position: absolute;
        left: 20px;
        bottom: 20px;
        right: 20px;
        text-shadow: 0 2px 16px rgba(0,0,0,.6)
    }

.row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px
}

    .row::-webkit-scrollbar {
        display: none
    }

.card {
    position: relative;
    min-width: 170px;
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel2);
    border: 1px solid var(--stroke);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: var(--shadow-sm)
}

    .card:hover {
        transform: translateY(-2px);
        border-color: rgba(255,255,255,.14);
        box-shadow: 0 14px 40px rgba(0,0,0,.35)
    }

    .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block
    }

    .card .meta {
        padding: 8px 10px;
        font-size: 13px;
        background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
        position: absolute;
        inset: auto 0 0 0
    }

/* Login */
#login {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,.8)), url('assets/login_bg.jpg') center/cover no-repeat fixed;
}

.login-card {
    width: min(620px,92vw);
    padding: 36px;
    background: rgba(12,12,14,.8);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: saturate(1.1) blur(8px)
}

.form-group {
    margin-bottom: 14px
}

label {
    font-size: 14px;
    color: #c9cfdd
}

input {
    width: 100%;
    padding: 12px 14px;
    background: #0E0F14;
    color: #fff;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}

    input:focus {
        border-color: rgba(55,182,255,.6);
        box-shadow: 0 0 0 3px rgba(55,182,255,.25)
    }

.msg {
    margin-top: 8px;
    color: #ff9f9f;
    display: none
}

/* Movies/Series shared layout */
.movies {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 12px
}

.side {
    background: var(--panel);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-sm)
}

    .side h3 {
        margin: 0;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(255,255,255,.06);
        font-size: 14px;
        color: #cbd6ff
    }

.catlist {
    flex: 1;
    overflow: auto
}

.cat {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background .15s ease
}

    .cat:hover, .cat.active {
        background: #171b24
    }

.panel {
    background: var(--panel);
    border-radius: var(--radius);
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-sm)
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 14px
}

/* Detail page */
.detail {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px
}

.poster {
    width: 100%;
    border-radius: var(--radius)
}

.section.detail-box {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 12px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-sm)
}

.titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px
}

.player {
    position: relative;
    height: 56vh;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow)
}

    .player video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover
    }

.controls {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 8px;
    z-index: 2
}

.ctrl {
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,.45);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease, transform .05s ease
}

    .ctrl:hover {
        background: rgba(255,255,255,.16)
    }

    .ctrl:active {
        transform: var(--press)
    }

.backbtn {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    margin-bottom: 8px
}

.badge {
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 12px
}

.episodes {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
    gap: 10px;
    margin-top: 10px
}

.ep {
    background: #10131A;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .05s
}

    .ep:hover {
        background: #171b24;
        border-color: rgba(255,255,255,.14)
    }

    .ep:active {
        transform: var(--press)
    }

/* Favorites overlay */
.heart {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.25);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 3;
    transition: box-shadow .2s ease, transform .05s
}

    .heart:hover {
        box-shadow: 0 0 0 3px rgba(229,9,20,.35)
    }

    .heart:active {
        transform: var(--press)
    }

    .heart.active {
        box-shadow: 0 0 0 1px rgba(229,9,20,.6) inset
    }

/* === TV Remote Focus Ring (mejorado) === */
.kbd-focus {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
    box-shadow: 0 0 0 6px rgba(55,182,255,.22);
    border-radius: 12px;
}

    .kbd-focus img {
        filter: brightness(1.08)
    }

/* Scrollbars (webkit) */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px
}

*::-webkit-scrollbar-track {
    background: transparent
}

*::-webkit-scrollbar-thumb {
    background: #23252b;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box
}

* {
    scrollbar-color: #23252b transparent
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}
/* === Patch Dorado Premium – agrega al final de styles.css === */
:root {
    --red: #F5C451; /* primario dorado */
    --focus: #E9B949; /* anillo de foco / acento */
}

/* Botón primario y botón de acciones (Cerrar sesión) en dorado */
.btn.primary,
.actions .btn {
    background: var(--red);
    border: 1px solid transparent;
    color: #0F1115; /* contraste */
    box-shadow: 0 8px 24px rgba(245,196,81,.35);
}

    .btn.primary:hover,
    .actions .btn:hover {
        filter: brightness(1.03)
    }

/* Tabs activas con subrayado dorado */
.tab.active {
    border-bottom: 3px solid var(--focus)
}

/* Focus ring general en dorado (teclado/TV) */
.kbd-focus {
    outline: 2px solid var(--focus);
    box-shadow: 0 0 0 6px rgba(233,185,73,.22);
}

/* Inputs (login/buscador) con foco dorado */
input:focus,
.search input:focus {
    border-color: rgba(233,185,73,.6);
    box-shadow: 0 0 0 3px rgba(233,185,73,.25);
}

/* Reproductor: botones/controles con hover y foco dorado */
.player-btn,
.ctrl {
    border-color: rgba(245,196,81,.35)
}

    .player-btn:hover,
    .ctrl:hover {
        background: rgba(245,196,81,.15);
        border-color: rgba(245,196,81,.55)
    }

    .player-btn:focus-visible,
    .ctrl:focus-visible {
        outline: 2px solid var(--focus);
        box-shadow: 0 0 0 6px rgba(233,185,73,.22);
    }

/* Badges y favoritos */
.badge {
    background: rgba(245,196,81,.15)
}

.heart:hover {
    box-shadow: 0 0 0 3px rgba(245,196,81,.35)
}

.heart.active {
    box-shadow: 0 0 0 1px rgba(245,196,81,.6) inset
}
/* === FIX: un solo logo y más grande (copiar/pegar) === */
:root {
    /* Altura total aproximada del header con logo grande */
    --header-h: 72px;
}

/* Oculta el banner duplicado y cualquier .logo repetido */
header .logo .banner {
    display: none !important;
}

header .logo + .logo {
    display: none !important;
}

/* Agranda el icono (antes 28px) */
header .logo .logo-icon {
    width: 48px;
    height: 48px; /* ajusta a tu gusto: 40/44/48 */
    border-radius: 10px;
}

/* Ajusta el alto del contenido si usas height:calc(...) en <main> */
main {
    height: calc(100% - var(--header-h));
}
/* Selectores de pistas (audio/subs) */
.ctrl.select {
    appearance: none;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 600;
    cursor: pointer;
}

    .ctrl.select:focus {
        outline: 2px solid var(--focus);
        box-shadow: 0 0 0 6px rgba(233,185,73,.22); /* usa tu dorado */
    }


/* === Temporadas como pestaÃ±as (T1, T2, ...) === */
.season-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 6px;
}
.season-tab{
  border:none;
  outline:none;
  cursor:pointer;
  border-radius:999px;
  padding:4px 14px;
  font-weight:600;
  font-size:14px;
  background:#1f2535;
  color:#f5f7ff;
}
.season-tab.active{
  background:#f7c948;
  color:#111318;
}
.episodes-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.episodes-list .ep{
  flex:0 0 230px;
}


/* Barra de controles unificada bajo el reproductor */
.controls.bottom-controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.controls.bottom-controls .ctrl{
  background:#111827;
  border:1px solid #293548;
  color:#f9fafb;
  border-radius:999px;
  padding:6px 14px;
  cursor:pointer;
  font-size:14px;
}
.controls.bottom-controls .ctrl:hover{
  background:#1f2937;
}
#favBtn.active svg path{
  fill:#f97316;
  stroke:#f97316;
}


/* Overrides for unified control bar below player (option C - right aligned) */
.controls.bottom-controls{
    position: static;
    right: auto;
    top: auto;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background: transparent;
    z-index: 1;
}
.controls.bottom-controls .ctrl{
    background:#111827;
    border:1px solid #293548;
    color:#f9fafb;
    border-radius:999px;
    padding:6px 14px;
}
.controls.bottom-controls .ctrl:hover{
    background:#1f2937;
}
#favBtn.active svg path{
    fill:#f97316;
    stroke:#f97316;
}


/* Estilos para selectores de audio/subtítulos */
.ctrl.select{
    background:#111827;
    border:1px solid #293548;
    color:#f9fafb;
    border-radius:999px;
    padding:6px 10px;
    font-size:13px;
}
.ctrl.select:focus{
    outline:none;
    border-color:#f97316;
}
