/* DKEY PARA LG (webOS) · pantalla 1920x1080, se maneja con el control remoto */
:root {
    --bg: #091430;
    --accent: #2D7BFF;
    --text: #EEF1F7;
    --muted: rgba(238, 241, 247, .6);
    --card: rgba(255, 255, 255, .06);
    --line: rgba(255, 255, 255, .1);
    --glow: rgba(45, 123, 255, .22);   /* (webOS 23 no tiene color-mix: lo pone app.js según el acento) */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--bg); color: var(--text);
    font-family: "LG Smart UI", "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
#app { position: relative; width: 100%; height: 100%;
    background: radial-gradient(1400px 700px at 80% -10%, var(--glow), transparent 60%), var(--bg); }

.screen { position: absolute; inset: 0; display: none; }
.screen.on { display: flex; }

/* Botones (el foco del control remoto se ve claro) */
.btn { font: inherit; font-size: 30px; font-weight: 600; color: #0B0B0C; background: var(--accent); border: 0; border-radius: 16px;
    padding: 20px 44px; outline: none; transition: transform .12s, box-shadow .12s; }
.btn.ghost { background: var(--card); color: var(--text); border: 2px solid var(--line); }
.btn:focus, .btn.focus { transform: scale(1.06); box-shadow: 0 0 0 5px #fff, 0 18px 40px rgba(0, 0, 0, .45); }

/* Cargando */
#s-loading { align-items: center; justify-content: center; flex-direction: column; gap: 60px; }
.loading-logo { width: 520px; }
.spinner { width: 64px; height: 64px; border: 6px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Activación */
#s-activate { padding: 110px 140px; gap: 120px; align-items: center; }
.act-left { flex: 1; }
.act-logo { width: 330px; margin-bottom: 50px; }
.act-left h1 { font-size: 72px; font-weight: 800; margin-bottom: 30px; }
.act-steps { font-size: 30px; line-height: 1.5; color: var(--muted); padding-left: 40px; margin-bottom: 46px; }
.act-steps b { color: var(--text); }
.mac-box { display: inline-flex; flex-direction: column; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 26px 44px; }
.mac-label { font-size: 24px; color: var(--muted); text-transform: uppercase; letter-spacing: 3px; }
.mac { font-size: 66px; font-weight: 800; letter-spacing: 4px; font-family: "Consolas", "Courier New", monospace; color: #fff; }
.act-status { display: flex; align-items: center; gap: 16px; font-size: 28px; color: var(--muted); margin-top: 40px; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.act-msg { font-size: 28px; color: #FFB4A8; margin-top: 18px; min-height: 40px; max-width: 900px; }
.act-actions { margin-top: 26px; }
[hidden] { display: none !important; }
.up-form { display: flex; flex-direction: column; gap: 22px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 28px; padding: 40px 44px; }
.up-form h2 { font-size: 40px; font-weight: 800; margin-bottom: 6px; }
.up-form label { display: flex; flex-direction: column; gap: 10px; font-size: 22px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; }
.up-form input { font: inherit; font-size: 32px; text-transform: none; letter-spacing: 0; color: #fff; background: rgba(0,0,0,.25); border: 3px solid var(--line); border-radius: 16px; padding: 16px 22px; outline: none; width: 100%; box-sizing: border-box; }
.up-form input:focus { border-color: #fff; }
.up-msg { font-size: 24px; color: #FFB4A8; min-height: 30px; }
.up-btns { display: flex; gap: 20px; }
.up-btns .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
#s-activate.up-open .qr, #s-activate.up-open .qr-txt, #s-activate.up-open .qr-sub, #s-activate.up-open #act-actions { display: none; }
.act-right { width: 520px; text-align: center; }
.qr { width: 460px; height: 460px; margin: 0 auto; background: #fff; border-radius: 28px; padding: 18px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-txt { font-size: 24px; color: var(--muted); margin-top: 28px; line-height: 1.45; }
.dev-info { font-size: 20px; color: rgba(238, 241, 247, .35); margin-top: 22px; }

/* Cuenta activa */
#s-home { flex-direction: column; }
.clock { font-size: 40px; font-weight: 600; color: var(--muted); }
.home-body h1 { font-size: 64px; font-weight: 800; margin-bottom: 40px; }
.card { background: var(--card); border: 2px solid var(--line); border-radius: 24px; }
.acc { width: 900px; padding: 16px 40px; }
.acc .row { display: flex; justify-content: space-between; font-size: 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.acc .row:last-child { border-bottom: 0; }
.acc .row span { color: var(--muted); }
.soon { font-size: 28px; color: var(--muted); margin: 40px 0; }

/* Bloqueado */
#s-blocked { align-items: center; justify-content: center; }
.center-box { text-align: center; }
.big-ic { font-size: 120px; margin-bottom: 30px; }
.center-box h1 { font-size: 70px; margin-bottom: 26px; }
.center-box p { font-size: 32px; color: var(--muted); line-height: 1.5; }

/* Aviso y diálogo */
.toast { position: absolute; left: 50%; bottom: 80px; transform: translate(-50%, 40px); opacity: 0; background: rgba(20, 22, 30, .95); border: 2px solid var(--line);
    padding: 22px 40px; border-radius: 18px; font-size: 30px; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.dialog { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; }
.dialog[hidden] { display: none; }
.dialog-box { background: #141a2e; border: 2px solid var(--line); border-radius: 28px; padding: 50px 60px; text-align: center; }
.dialog-box h2 { font-size: 44px; margin-bottom: 40px; }
.dialog-actions { display: flex; gap: 30px; justify-content: center; }

/* ===================================================================== ETAPA 2 · principal y TV en vivo */
:root { --live: #FF7A00; }
#s-home { flex-direction: column; }
.top { display: flex; align-items: center; gap: 50px; padding: 34px 70px 0; height: 120px; }
.top-logo { height: 58px; }
.tabs { display: flex; gap: 12px; flex: 1; }
.tab { font: inherit; font-size: 30px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 40px; padding: 12px 32px; outline: none; }
.tab.sel { color: #fff; background: var(--card); }
.tab.focus { color: #0B0B0C; background: #fff; transform: scale(1.06); }
.pane { display: none; position: relative; flex: 1; min-height: 0; }
.pane.on { display: flex; }
.soon-box { margin: 120px auto; text-align: center; color: var(--muted); }
.soon-box h2 { font-size: 56px; color: var(--text); margin-bottom: 18px; }
.soon-box p { font-size: 30px; }
#p-account .home-body { padding: 40px 70px; }
.home-actions { display: flex; gap: 24px; margin-top: 40px; }

/* Columnas */
#p-live { padding: 26px 70px 40px; gap: 24px; }
.col { position: relative; min-height: 0; }
.cats { width: 400px; }
.chans { width: 620px; display: flex; flex-direction: column; }
.info { flex: 1; display: flex; flex-direction: column; gap: 22px; }
.col-title { font-size: 24px; color: var(--muted); padding: 6px 18px 12px; text-transform: uppercase; letter-spacing: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vlist { position: relative; overflow: hidden; height: 100%; flex: 1; border-radius: 18px; }
.vlist-in { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.row-i { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 0 20px; border-radius: 14px; font-size: 28px; white-space: nowrap; }
.row-i .t { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.row-i .n { font-size: 22px; color: var(--muted); }
.row-i.sel { background: var(--card); }
.row-i.sel .t { color: var(--live); }
.zone-on .row-i.focus { background: #fff; color: #0B0B0C; transform: scale(1.02); }
.zone-on .row-i.focus .t, .zone-on .row-i.focus .n { color: #0B0B0C; }
.row-i.playing::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 3px; background: var(--live); }
.ch-logo { width: 64px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; }
.ch-logo img { max-width: 64px; max-height: 44px; }
.ch-logo .ph { width: 40px; height: 40px; border-radius: 10px; background: var(--card); }
.eq { display: flex; align-items: flex-end; gap: 4px; height: 26px; }
.eq i { width: 5px; background: var(--live); border-radius: 2px; }
.eq i:nth-child(1) { height: 55%; } .eq i:nth-child(2) { height: 100%; } .eq i:nth-child(3) { height: 75%; }
.lock { font-size: 22px; }

/* Vista previa y guía */
.preview { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 20px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.preview-hint { color: var(--muted); font-size: 26px; text-align: center; line-height: 1.5; }
.info-head { display: flex; align-items: center; gap: 22px; }
.info-head img { width: 110px; height: 70px; object-fit: contain; }
.info-head img[src=""] { display: none; }
.info-name { font-size: 36px; font-weight: 700; }
.info-cat { font-size: 24px; color: var(--muted); }
.epg { font-size: 26px; line-height: 1.4; }
.epg .now { color: #fff; } .epg .next { color: var(--muted); margin-top: 10px; }
.epg .bar { height: 6px; background: var(--line); border-radius: 3px; margin: 12px 0 4px; overflow: hidden; }
.epg .bar i { display: block; height: 100%; background: var(--live); }
.epg .hm { color: var(--muted); font-size: 22px; }
.keys-hint { margin-top: auto; font-size: 22px; color: var(--muted); }
.key { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: -2px; }
.key.red { background: #E5383B; }
.live-loading { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 26px; flex-direction: column; font-size: 30px; color: var(--muted); background: var(--bg); }
.live-loading.on { display: flex; }

/* Video: en la vista previa o a pantalla completa */
#video { position: absolute; z-index: 5; background: #000; display: none; object-fit: fill; border-radius: 20px; }
#video.on { display: block; }
#video.full { left: 0 !important; top: 0 !important; width: 1920px !important; height: 1080px !important; border-radius: 0; z-index: 20; }
.osd { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: 60px 80px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.osd[hidden] { display: none; }
.osd-box { display: flex; align-items: center; gap: 34px; }
.osd-box img { width: 150px; height: 96px; object-fit: contain; }
.osd-main { flex: 1; min-width: 0; }
.osd-name { font-size: 44px; font-weight: 700; }
.osd-epg { font-size: 28px; color: rgba(255, 255, 255, .8); margin-top: 8px; }
.osd-clock { font-size: 40px; color: rgba(255, 255, 255, .8); }
.numjump { position: absolute; top: 60px; right: 80px; z-index: 40; font-size: 90px; font-weight: 800; background: rgba(0, 0, 0, .7); padding: 10px 40px; border-radius: 20px; }
.numjump[hidden], .play-msg[hidden] { display: none; }
.play-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 35; font-size: 32px; background: rgba(0, 0, 0, .8); padding: 26px 44px; border-radius: 20px; text-align: center; }

/* PIN */
.dlg-sub { font-size: 26px; color: var(--muted); margin: -20px 0 30px; }
.pin { display: flex; gap: 18px; justify-content: center; }
.pin i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); }
.pin i.f { background: #fff; border-color: #fff; }
.dlg-err { color: #FFB4A8; font-size: 24px; margin-top: 20px; min-height: 30px; }
.osd-box img[src=""], .osd-box img.broken, .info-head img.broken { visibility: hidden; }

/* Cargando canal */
.ch-loading { position: absolute; z-index: 25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; font-size: 28px; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 20px; pointer-events: none; }
.ch-loading[hidden] { display: none; }
.ch-loading.full { left: 0; top: 0; width: 1920px; height: 1080px; border-radius: 0; background: rgba(0, 0, 0, .35); font-size: 36px; }

/* ===================================================================== ETAPA 3 · películas y series */
.vod-pane { padding: 26px 70px 0; gap: 24px; }
.grid-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.grid { position: relative; flex: 1; overflow: hidden; }
.grid-in { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.cell { position: absolute; width: 200px; }
.cell .pos { width: 200px; height: 300px; border-radius: 14px; background: var(--card); overflow: hidden; position: relative; }
.cell .pos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell .pos .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; text-align: center; font-size: 22px; color: var(--muted); }
.cell .pr { position: absolute; left: 0; bottom: 0; height: 6px; background: var(--live); }
.cell .nm { font-size: 22px; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.grid.zone-on .cell.focus .pos { box-shadow: 0 0 0 5px #fff; transform: scale(1.06); }
.grid.zone-on .cell.focus .nm { color: #fff; }
.cell .pos { transition: transform .12s; }

.ep { display: flex; gap: 22px; align-items: center; width: 100%; }
.ep .en { font-size: 24px; color: var(--muted); width: 70px; flex: none; }
.ep .et { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ep .ed { font-size: 22px; color: var(--muted); }
.ep .ebar { position: absolute; left: 20px; right: 20px; bottom: 6px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ep .ebar i { display: block; height: 100%; background: var(--live); }

/* Reproductor de películas y series */
.vosd { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: 70px 90px 60px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); }
.vosd[hidden], .vmenu[hidden], .vpause[hidden] { display: none; }
.vosd-title { font-size: 40px; font-weight: 700; margin-bottom: 24px; }
.vosd-bar { position: relative; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .25); }
.vosd-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--live); }
.vosd-bar b { position: absolute; top: -9px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; background: #fff; display: none; }
.vosd-bar.seeking b { display: block; }
.vosd-row { display: flex; justify-content: space-between; font-size: 28px; margin-top: 16px; color: rgba(255, 255, 255, .85); }
.vosd-hint { font-size: 22px; color: rgba(255, 255, 255, .55); }
.vmenu { position: absolute; right: 70px; bottom: 220px; z-index: 32; width: 560px; max-height: 640px; overflow: hidden; background: rgba(16, 20, 34, .96); border: 2px solid var(--line); border-radius: 22px; padding: 26px; }
.vmenu h3 { font-size: 30px; margin-bottom: 14px; }
.vm-sec { font-size: 22px; color: var(--muted); margin: 14px 8px 6px; text-transform: uppercase; letter-spacing: 2px; }
.vm-it { font-size: 28px; padding: 12px 18px; border-radius: 12px; }
.vm-it.on::after { content: "  ✓"; color: var(--live); }
.vm-it.focus { background: #fff; color: #0B0B0C; }
.vpause { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 31; font-size: 90px; background: rgba(0, 0, 0, .5); width: 180px; height: 180px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Etapa 3 · ajustes: margen para que la portada con foco no se corte, y fila de episodio con foco legible */
.grid-in { left: 14px; top: 14px; right: 14px; }
.zone-on .row-i.focus .ep .en, .zone-on .row-i.focus .ep .ed { color: #3A3F4B; }
.zone-on .row-i.focus .ep .et { color: #0B0B0C; }

/* ============ Etapa 4 ============ */
/* Info en la portada */
.cell .bd { position: absolute; top: 10px; font-size: 18px; font-weight: 800; padding: 4px 10px; border-radius: 8px; letter-spacing: .5px; }
.cell .bd.rt { left: 10px; background: rgba(0, 0, 0, .72); color: #FFD54A; }
.cell .bd.nw { right: 10px; background: var(--accent); color: #fff; }
.cell .mt { font-size: 19px; color: rgba(238, 241, 247, .45); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 24px; }
.grid.zone-on .cell.focus .mt { color: var(--muted); }

/* Pestañas con ícono y campanita */
.tab .ic { width: 30px; height: 30px; vertical-align: -5px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tab.bell { position: relative; padding: 12px 22px; margin-left: auto; }
.tab.bell .ic { width: 34px; height: 34px; vertical-align: -7px; }
.bell-n { position: absolute; top: 2px; right: 6px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 15px; background: #FF3B4E; color: #fff; font-size: 19px; line-height: 30px; text-align: center; }
.bell-n[hidden] { display: none; }

/* Buscar */
#p-search { padding: 30px 70px 0; }
.s-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.s-input-box { display: flex; align-items: center; gap: 20px; height: 96px; padding: 0 34px; border-radius: 48px; background: var(--card); border: 3px solid var(--line); transition: transform .12s; }
.s-input-box.focus { border-color: #fff; transform: scale(1.01); }
.s-input-box .ic { width: 40px; height: 40px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; flex: none; }
#s-input { flex: 1; min-width: 0; font: inherit; font-size: 36px; color: var(--text); background: transparent; border: 0; outline: none; }
#s-input::placeholder { color: rgba(238, 241, 247, .4); }
.s-tip { font-size: 22px; color: var(--muted); }
.s-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }
.s-recent[hidden] { display: none; }
.s-lbl { font-size: 22px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; margin-right: 10px; }
.chip { font-size: 26px; padding: 10px 26px; border-radius: 30px; background: var(--card); }
.chip.focus { background: #fff; color: #0B0B0C; transform: scale(1.06); }
.s-empty { font-size: 28px; color: var(--muted); margin: 34px 6px 0; }
.s-empty:empty { display: none; }
.s-view { flex: 1; min-height: 0; overflow: hidden; margin-top: 22px; position: relative; }
.s-rows { will-change: transform; }
.s-row { margin-bottom: 26px; }
.s-h { font-size: 30px; font-weight: 700; margin: 0 6px 14px; }
.s-h span { font-size: 22px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.s-track { overflow: hidden; padding: 12px 14px; margin: -12px -14px; }
.s-in { display: flex; gap: 24px; will-change: transform; }
.s-card { flex: none; position: relative; }
.s-card.ch { width: 260px; }
.s-logo { height: 146px; border-radius: 16px; background: var(--card); display: flex; align-items: center; justify-content: center; padding: 18px; transition: transform .12s; }
.s-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.s-nm { font-size: 22px; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.s-card.ch.focus .s-logo { box-shadow: 0 0 0 5px #fff; transform: scale(1.06); }
.s-card.ch.focus .s-nm { color: #fff; }
.s-card.cell { width: 200px; }
.s-card.cell.focus .pos { box-shadow: 0 0 0 5px #fff; transform: scale(1.06); }
.s-card.cell.focus .nm { color: #fff; }

/* Avisos */
#p-notices { padding: 26px 70px 40px; gap: 50px; }
.n-col { width: 760px; display: flex; flex-direction: column; }
.ndot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); flex: none; }
.ndot.read { background: transparent; }
.n-empty { font-size: 30px; color: var(--muted); padding: 30px 20px; }
.n-empty[hidden] { display: none; }
.n-view { flex: 1; min-width: 0; overflow: hidden; }
.n-img { display: block; max-width: 100%; max-height: 460px; border-radius: 20px; margin-bottom: 26px; object-fit: contain; }
.n-date { font-size: 22px; color: var(--muted); margin-bottom: 8px; }
.n-view h2 { font-size: 46px; font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.n-view p { font-size: 29px; line-height: 1.5; color: rgba(238, 241, 247, .85); }

/* Mensaje del panel */
#dlg-msg { z-index: 60; }
.msg-box { width: 1000px; max-width: 86vw; }
.msg-box #msg-img img { display: block; max-width: 100%; max-height: 420px; margin: 0 auto 26px; border-radius: 18px; object-fit: contain; }
.msg-box h2 { font-size: 44px; margin-bottom: 18px; }
.msg-box p { font-size: 30px; line-height: 1.5; color: rgba(238, 241, 247, .85); margin-bottom: 34px; max-height: 360px; overflow: hidden; }

/* ============ Control Magic (puntero) ============ */
.pin-pad { display: grid; grid-template-columns: repeat(3, 110px); gap: 16px; justify-content: center; margin: 30px 0 6px; }
.pin-pad b { height: 84px; border-radius: 18px; background: rgba(255, 255, 255, .08); font-size: 38px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pin-pad b:hover { background: #fff; color: #0B0B0C; }
.tab:hover:not(.focus) { color: var(--text); }
.ss, .chip, .vm-it, .s-card, .cell, .row-i, .tab, .btn, .pin-pad b { cursor: pointer; }
.vosd-bar { cursor: pointer; }
.vosd-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; bottom: -18px; }

/* ============ Ficha a pantalla completa (películas y series) ============ */
#s-home .top { position: relative; z-index: 6; transition: opacity .25s; }
#s-home.d-deep .top { opacity: 0; }
.detail { position: absolute; inset: 0; z-index: 4; background: #05070F; overflow: hidden; }
.detail[hidden] { display: none; }
.d-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.d-shade { position: absolute; inset: 0; background:
    linear-gradient(180deg, rgba(5, 7, 15, .75) 0, rgba(5, 7, 15, 0) 220px),
    linear-gradient(90deg, rgba(5, 7, 15, .95) 0, rgba(5, 7, 15, .78) 38%, rgba(5, 7, 15, .15) 75%, rgba(5, 7, 15, 0) 100%),
    linear-gradient(0deg, rgba(5, 7, 15, .95) 0, rgba(5, 7, 15, 0) 45%); transition: background-color .3s; }
.detail.deep .d-shade { background-color: rgba(5, 7, 15, .78); }
.d-scroll { position: absolute; inset: 0; transition: transform .35s ease; }
.detail.deep .d-scroll { transform: translateY(-800px); }
.d-hero { position: absolute; left: 110px; top: 240px; width: 1180px; }
.d-hero h1 { font-size: 82px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; text-shadow: 0 4px 30px rgba(0, 0, 0, .5);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-badges { display: flex; align-items: center; gap: 22px; margin-top: 26px; font-size: 26px; }
.d-badges:empty { display: none; }
.d-badges .pill { padding: 6px 18px; border-radius: 22px; font-weight: 700; }
.d-badges .pill.rt { background: var(--accent); color: #fff; }
.d-badges .pill.dt { background: rgba(45, 123, 255, .28); color: #9DBEFF; font-weight: 600; }
.d-badges .bt { font-weight: 800; }
.d-genre { font-size: 25px; margin-top: 22px; color: rgba(238, 241, 247, .9); }
.d-genre b { font-weight: 800; }
.d-plot { font-size: 27px; line-height: 1.5; margin-top: 16px; color: rgba(238, 241, 247, .88); max-width: 1150px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.d-crew { font-size: 22px; margin-top: 10px; color: rgba(238, 241, 247, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1150px; }
.d-crew:empty { display: none; }
.d-btns-wrap { position: relative; margin-top: 40px; }
.d-btns { display: flex; gap: 22px; }
.dbtn { display: inline-flex; align-items: center; gap: 14px; height: 72px; padding: 0 32px; font: inherit; font-size: 27px; font-weight: 700; color: #fff;
    background: rgba(8, 12, 28, .6); border: 3px solid rgba(45, 123, 255, .9); border-radius: 8px; transition: transform .12s, background .12s; }
.dbtn svg { width: 30px; height: 30px; flex: none; }
.dbtn.focus { background: var(--accent); border-color: #fff; transform: scale(1.06); box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
.detail.nofocus .dbtn.focus { background: rgba(8, 12, 28, .6); border-color: rgba(45, 123, 255, .9); transform: none; box-shadow: none; }
.d-drop { position: absolute; top: 84px; z-index: 3; max-height: 360px; overflow: hidden; background: rgba(14, 20, 44, .97); border: 3px solid rgba(45, 123, 255, .9); border-radius: 8px; }
.d-drop[hidden] { display: none; }
.dd-it { font-size: 26px; padding: 16px 28px; white-space: nowrap; color: rgba(238, 241, 247, .85); }
.dd-it.sel { font-weight: 800; color: #fff; }
.dd-it.focus { background: var(--accent); color: #fff; }
/* Episodios (debajo; al bajar, la ficha sube) */
.d-eps-wrap { display: none; position: absolute; left: 0; right: 0; top: 955px; height: 900px; }
.detail.is-series .d-eps-wrap { display: block; }
.d-eps-h { display: flex; align-items: baseline; gap: 24px; padding: 0 110px; height: 70px; }
.d-eps-h b { font-size: 36px; font-weight: 800; }
.d-eps-h span { font-size: 30px; color: rgba(238, 241, 247, .6); }
.d-eps { position: absolute; left: 90px; right: 90px; top: 80px; bottom: 0; opacity: .55; transition: opacity .3s; }
.detail.deep .d-eps { opacity: 1; }
.d-eps .vlist { height: 100%; }
.d-eps .row-i { padding: 0 !important; border-radius: 10px; background: transparent !important; color: #fff !important; }
.d-eps.zone-on .row-i.focus { background: var(--accent) !important; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.ep2 { display: flex; align-items: center; gap: 34px; height: 100%; padding: 12px 16px; width: 100%; }
.ep-th { position: relative; width: 340px; height: 191px; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .06); flex: none; }
.ep-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-pl { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0, 0, 0, .55); border: 2px solid #fff; display: none; align-items: center; justify-content: center; }
.ep-pl svg { width: 30px; height: 30px; margin-left: 4px; color: #fff; }
.d-eps.zone-on .row-i.focus .ep-pl { display: flex; }
.ep-pr { position: absolute; left: 0; bottom: 0; height: 6px; background: var(--live); }
.ep-tx { flex: 1; min-width: 0; }
.ep-t { font-size: 30px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-d { font-size: 24px; margin-top: 8px; color: rgba(238, 241, 247, .75); }
.ep-p { font-size: 22px; margin-top: 8px; color: rgba(238, 241, 247, .6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-eps.zone-on .row-i.focus .ep-d, .d-eps.zone-on .row-i.focus .ep-p { color: rgba(255, 255, 255, .9); }
.detail:not(.is-series) .d-hero { top: 300px; }

/* Pestañas escondidas (episodios) o video en pantalla completa: el puntero no las toca */
#s-home.d-deep .top { pointer-events: none; }
/* «¿Salir?» siempre por encima del video */
#dlg-exit { z-index: 70; }

/* ============ Reproductor: controles y panel de episodios ============ */
.vosd-btns { display: flex; gap: 16px; margin: 4px 0 30px; }
.vbtn { display: inline-flex; align-items: center; gap: 12px; height: 64px; padding: 0 26px; font: inherit; font-size: 24px; font-weight: 600; color: #fff;
    background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .18); border-radius: 32px; transition: transform .12s; }
.vbtn svg { width: 28px; height: 28px; flex: none; }
.vbtn.focus { background: #fff; color: #0B0B0C; border-color: #fff; transform: scale(1.06); }
.vbtn.off { opacity: .35; }
.vside { position: absolute; top: 0; right: 0; bottom: 0; width: 700px; z-index: 33; background: rgba(8, 11, 24, .96); border-left: 2px solid var(--line); display: flex; flex-direction: column; padding: 50px 0 30px; }
.vside[hidden] { display: none; }
.vs-h { font-size: 34px; font-weight: 800; padding: 0 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-seasons { display: flex; gap: 12px; padding: 24px 40px 20px; overflow: hidden; flex: none; }
.vs-s { font-size: 24px; padding: 10px 24px; border-radius: 26px; background: rgba(255, 255, 255, .08); color: rgba(238, 241, 247, .7); white-space: nowrap; cursor: pointer; }
.vs-s.sel { background: rgba(45, 123, 255, .35); color: #fff; font-weight: 700; }
.vs-s.focus { background: #fff; color: #0B0B0C; transform: scale(1.06); }
.vs-list { position: relative; flex: 1; min-height: 0; padding: 0 24px; }
.vs-list .vlist { height: 100%; }
.vs-list .row-i { padding: 0 !important; background: transparent !important; color: #fff !important; transform: none !important; }
.vs-list.zone-on .row-i.focus { background: var(--accent) !important; }
.vs-ep { display: flex; align-items: center; gap: 22px; width: 100%; height: 100%; padding: 10px 16px; }
.vs-th { position: relative; width: 190px; height: 107px; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .07); flex: none; }
.vs-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-th i { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--live); }
.vs-tx { flex: 1; min-width: 0; }
.vs-t { font-size: 26px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-d { font-size: 22px; margin-top: 6px; color: rgba(238, 241, 247, .65); }
.vs-ep.cur .vs-d { color: var(--live); font-weight: 700; }
.vs-list.zone-on .row-i.focus .vs-d { color: #fff; }

#video.full.zoom { left: -240px !important; top: -135px !important; width: 2400px !important; height: 1350px !important; }
.lib-empty { font-size: 30px; line-height: 1.6; color: var(--muted); text-align: center; margin-top: 160px; }
.lib-empty[hidden] { display: none; }
.lib-empty b { color: var(--text); }

/* ============ Inicio: QR al formulario + demostración ============ */
.qr-sub { font-size: 22px; color: var(--muted); margin-top: 8px; text-align: center; }
.act-actions { display: flex; gap: 24px; flex-wrap: wrap; }
.demo-tag { position: absolute; left: 70px; top: 104px; z-index: 7; font-size: 15px; font-weight: 800; letter-spacing: 2px; color: #FFD54A; border: 2px solid rgba(255, 213, 74, .55); border-radius: 8px; padding: 3px 10px; white-space: nowrap; pointer-events: none; }
.demo-tag[hidden] { display: none; }

.key.green { background: #2ECC71; } .key.yellow { background: #F5C518; } .key.blue { background: #2D7BFF; }

/* Número del canal en pantalla completa: al centro de la barra; se va junto con ella */
.osd { position: absolute; }
.osd-main { max-width: 560px; }
.osd-name, .osd-epg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osd-num { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); min-width: 150px; height: 112px; padding: 0 30px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center; font-size: 76px; font-weight: 800; letter-spacing: 2px; color: #fff;
    background: rgba(255, 255, 255, .12); border: 3px solid rgba(255, 255, 255, .35); }
.osd-num:empty { display: none; }
.osd-clock { margin-left: auto; }

/* Vista previa con foco (▶ desde la lista): OK la agranda */
#preview-box.focus { box-shadow: 0 0 0 5px #fff; }
#preview-box { transition: box-shadow .12s; }

/* ============ Lista encima del canal en pantalla completa ============ */
.ovl { position: absolute; left: 0; top: 0; bottom: 0; width: 1180px; z-index: 34; display: flex; gap: 20px; padding: 60px 40px 90px 60px;
    background: linear-gradient(90deg, rgba(5, 8, 20, .97) 0, rgba(5, 8, 20, .94) 72%, rgba(5, 8, 20, 0) 100%); }
.ovl[hidden] { display: none; }
.ovl-col { display: flex; flex-direction: column; min-height: 0; }
.ovl-cats { width: 380px; }
.ovl-chans { width: 600px; }
.ovl-h { font-size: 24px; color: var(--muted); padding: 6px 18px 14px; text-transform: uppercase; letter-spacing: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovl .vlist { flex: 1; }
.ovl-hint { position: absolute; left: 60px; bottom: 36px; font-size: 22px; color: rgba(238, 241, 247, .55); }

.net-banner { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); z-index: 80; font-size: 26px; padding: 16px 32px; border-radius: 16px; background: #B3261E; color: #fff; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
.net-banner[hidden] { display: none; }
/* La portada tapa el nombre de respaldo (que solo se ve si no hay imagen); las etiquetas van encima */
.cell .pos img { position: relative; z-index: 1; }
.cell .bd, .cell .pr { z-index: 2; }

/* ============ Medidas mínimas de LG (letra ≥ 20 px, botones ≥ 75 px) ============ */
.cell .bd { font-size: 20px; }
.cell .mt { font-size: 20px; height: 26px; }
.bell-n { font-size: 20px; min-width: 32px; height: 32px; line-height: 32px; }
.demo-tag { font-size: 20px; padding: 2px 10px; top: 110px; }
.tab { padding: 21px 30px; }
.tab.bell { padding: 21px 22px; }
.dbtn, .vbtn { height: 78px; }
.chip { padding: 22px 30px; }
