:root {
    --bg: #05050a;
    --neon: #ff007f;
    --purple: #8b5cf6;
    --cyan: #00f0ff;
    --amber: #ffb800;
    --glass: rgba(18, 18, 32, 0.55);
    --glass-card: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #8b5cf6;
    --primary-soft: rgba(139, 92, 246, 0.18);
    --primary-light: #c4b5fd;
    --grad: linear-gradient(90deg, #ff007f, #8b5cf6);
    --grad-3: linear-gradient(90deg, #ff007f, #8b5cf6, #00f0ff);
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --radius: 24px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--neon); color: #fff; }
button { font-family: inherit; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(5, 5, 10, 0.8); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 0, 127, 0.5); }

/* ===== Ambilight ===== */
body::before {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(50vw 40vw at 70% 10%, rgba(255, 0, 127, 0.16), transparent 60%),
        radial-gradient(45vw 40vw at 20% 30%, rgba(139, 92, 246, 0.2), transparent 60%),
        radial-gradient(40vw 30vw at 50% 100%, rgba(0, 240, 255, 0.08), transparent 60%),
        var(--bg);
}
.ambient-glow {
    position: fixed; top: 5%; left: 50%; transform: translateX(-50%);
    width: 85vw; height: 60vh; border-radius: 50%; z-index: -1; pointer-events: none;
    background-size: cover; background-position: center;
    filter: blur(120px) saturate(1.8); opacity: 0.45;
    transition: background-image 1.2s var(--ease), opacity 1.2s ease;
}

/* ===== Barra superior ===== */
.topnav {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.8rem 3rem;
    background: rgba(5, 5, 10, 0.7); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 1.75rem; }
.nav-right { gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 14px; padding: 2px;
    background: linear-gradient(45deg, var(--neon), var(--purple), var(--cyan));
    transition: transform 0.3s var(--ease);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: var(--bg); border-radius: 12px; padding: 3px; }
.brand:hover .brand-mark { transform: scale(1.06); }
.brand-name {
    font-size: 1.35rem; font-weight: 900; letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, #cbd5e1, #94a3b8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name span { color: var(--neon); -webkit-text-fill-color: var(--neon); }
.nav-links { display: flex; gap: 0.25rem; }
.nav-btn {
    padding: 0.55rem 1rem; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer;
    color: var(--text-muted); font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem;
    transition: all 0.2s;
}
.nav-btn i { color: #64748b; }
.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-btn.active { color: #fff; font-weight: 800; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.1); }
.nav-btn.active i { color: var(--neon); }

.search-box {
    position: relative; display: flex; align-items: center; width: 290px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px;
    padding: 0 1rem; height: 40px; gap: 0.6rem; color: var(--text-muted); font-size: 0.8rem;
    transition: all 0.2s;
}
.search-box:focus-within { border-color: rgba(255, 0, 127, 0.6); background: rgba(255, 255, 255, 0.1); }
.search-box input[type="text"] {
    flex: 1; min-width: 0; background: none; border: none; outline: none; box-shadow: none; padding: 0;
    color: #fff; font: inherit; font-size: 0.8rem; font-weight: 500;
}
.clock-box { display: flex; flex-direction: column; align-items: flex-end; padding-left: 1rem; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.clock-box span { font-family: ui-monospace, "Cascadia Mono", monospace; font-weight: 900; letter-spacing: 2px; font-size: 0.8rem; }
.clock-box small { font-size: 0.55rem; font-weight: 800; letter-spacing: 1.5px; color: var(--cyan); }
.user-menu { display: flex; align-items: center; gap: 0.6rem; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; flex: none;
    background: var(--bg); box-shadow: 0 0 0 2px var(--neon), 0 0 0 4px rgba(0, 240, 255, 0.35);
}
.user-meta strong { display: block; font-size: 0.78rem; }
.user-meta small { font-size: 0.66rem; color: var(--text-muted); }

.icon-btn {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
    background: var(--glass); border: 1px solid var(--glass-border); color: #cbd5e1; text-decoration: none; font-size: 0.8rem;
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); transition: all 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.lg { width: 48px; height: 48px; border-radius: 16px; font-size: 0.95rem; }
.icon-btn.danger:hover { background: var(--danger); }

.app { padding: 1.5rem 3rem 3rem; max-width: 1800px; margin: 0 auto; }

/* ===== Piezas comunes ===== */
.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.live-badge {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem; border-radius: 999px;
    font-size: 0.66rem; font-weight: 800; letter-spacing: 1px;
    color: #fff; background: rgba(255, 0, 127, 0.35); border: 1px solid rgba(255, 0, 127, 0.55);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
}
.cat-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.66rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--cyan); background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.25);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-badge i { color: var(--amber); }
.live-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--neon); box-shadow: 0 0 10px var(--neon), 0 0 18px var(--neon);
    animation: blink 1.2s infinite;
}
@keyframes blink { 50% { opacity: 0.35; transform: scale(0.85); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-neon, .btn-glass {
    padding: 0.9rem 1.5rem; border-radius: 16px; cursor: pointer; border: none;
    display: inline-flex; align-items: center; gap: 0.7rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 1px;
    transition: transform 0.2s var(--ease), background 0.2s; max-width: 100%; color: #fff;
}
.btn-neon span, .btn-glass span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-neon { background: var(--grad); text-transform: uppercase; box-shadow: 0 0 25px rgba(255, 0, 127, 0.5); }
.btn-neon:hover { transform: scale(1.04); }
.btn-neon:active, .btn-glass:active { transform: scale(0.96); }
.btn-glass { background: rgba(18, 18, 32, 0.6); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.14); }
.btn-glass i { color: #cbd5e1; }
.icon-btn.on i { color: var(--amber); }
.hints { display: flex; gap: 1.1rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.72rem; padding: 0.8rem 0.25rem 0; }
.hints i { color: var(--amber); }
kbd {
    display: inline-block; min-width: 22px; padding: 0.1rem 0.4rem; margin-right: 3px; text-align: center;
    border-radius: 6px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-border);
    font-family: inherit; font-size: 0.72rem; color: var(--text-main);
}
.empty-state { grid-column: 1 / -1; padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--glass-border); }
.empty-state i { font-size: 2rem; margin-bottom: 0.8rem; opacity: 0.5; display: block; }

/* Pantalla de inicio / carga */
.idle-state, .player-overlay {
    position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem; text-align: center; padding: 1.5rem;
    background: radial-gradient(circle at 55% 40%, rgba(139, 92, 246, 0.35) 0%, rgba(255, 0, 127, 0.12) 30%, #05050a 70%);
}
.idle-state h3 { font-size: 1.5rem; font-weight: 900; }
.idle-state h3 span { color: var(--neon); }
.idle-logo-wrap { position: relative; animation: float 5s ease-in-out infinite; }
.idle-logo-wrap::before {
    content: ""; position: absolute; inset: -30%; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.45), rgba(139, 92, 246, 0.25) 45%, transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
}
.idle-logo { width: 130px; display: block; }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes glowPulse { 50% { opacity: 0.6; transform: scale(1.08); } }
.steps { list-style: none; display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.steps li {
    display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--text-muted);
    padding: 0.55rem 0.95rem; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.steps li strong { color: #fff; }
.steps .step-n {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--grad); color: #fff; font-weight: 800; font-size: 0.75rem;
}
.player-overlay { color: #f9a8d4; font-weight: 700; transition: opacity 0.35s; }
.player-overlay.hidden { opacity: 0; pointer-events: none; }
.player-overlay.error { color: #f87171; }
.player-overlay.error .spinner { display: none; }
.overlay-logo { width: 110px; display: block; }
.spinner {
    width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--neon); border-right-color: var(--cyan);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Tarjeta de "sintonizando": logo + nombre del canal mientras carga (se siente mas rapido) */
.zap-card {
    display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.2rem 0.8rem 0.8rem; border-radius: 20px; text-align: left;
    background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    animation: zapIn 0.35s var(--ease);
}
.zap-card small { display: block; font-size: 0.62rem; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); }
.zap-card strong { font-size: 1.25rem; font-weight: 900; color: #fff; }
.zap-logo .ch-logo { width: 88px; }
.player-overlay.error .zap-card { display: none; }
@keyframes zapIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* ===== Categorias (carrusel horizontal) ===== */
.cat-carousel { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.cat-arrow {
    flex: none; width: 38px; height: 38px; border-radius: 12px; cursor: pointer; display: grid; place-items: center;
    background: var(--glass); border: 1px solid var(--glass-border); color: #cbd5e1; transition: background 0.2s;
}
.cat-arrow:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.cat-pills { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; scroll-behavior: smooth; }
.cat-pills::-webkit-scrollbar { display: none; }
.pill {
    flex: none; display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; cursor: pointer;
    padding: 0.6rem 1rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700;
    color: var(--text-muted); background: var(--glass); border: 1px solid var(--glass-border);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); transition: all 0.2s;
}
.pill small { font-size: 0.65rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.pill:hover { color: #fff; }
.pill.special i { color: var(--amber); }
.pill.special[data-cat="recent"] i, .pill.special[data-cat="continue"] i { color: var(--cyan); }
.pill.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 8px 20px -6px rgba(255, 0, 127, 0.5); }
.pill.active i { color: #fff !important; }
.pill.active small { background: rgba(255, 255, 255, 0.2); }
.pill-sep { flex: none; width: 1px; height: 24px; background: rgba(255, 255, 255, 0.12); margin: 0 0.25rem; }
.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.grid-head h2 { font-size: 1.25rem; font-weight: 900; }
.count-badge { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* ===== En vivo: carrusel de canales + pantalla ===== */
.live-stage { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.channel-rail {
    position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
    border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-border);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.rail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.75rem; padding: 1.1rem 1.25rem 0.5rem; }
.eyebrow { font-size: 0.62rem; letter-spacing: 2px; text-transform: uppercase; color: var(--neon); font-weight: 800; }
.rail-head h2 { font-size: 1.05rem; font-weight: 900; line-height: 1.2; }
.rail-arrow {
    flex: none; height: 30px; margin: 0 1rem; border: none; border-radius: 10px; cursor: pointer; z-index: 2;
    background: rgba(255, 255, 255, 0.05); color: var(--text-muted); transition: background 0.2s;
}
.rail-arrow:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
/* Carrusel: el canal del centro se ve grande y los de las orillas se inclinan y desvanecen (--k = -1..1) */
.channel-wheel {
    position: relative; flex: 1 1 0; min-height: 0; overflow-y: auto; scrollbar-width: none;
    display: flex; flex-direction: column; gap: 0.4rem; padding: 28% 0.75rem;
    scroll-snap-type: y proximity; perspective: 900px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.channel-wheel::-webkit-scrollbar { display: none; }
.channel-wheel .empty-state { margin: auto 0; }
.wheel-item {
    --k: 0; --ak: max(var(--k), calc(var(--k) * -1));
    flex: none; display: grid; grid-template-columns: 26px 64px minmax(0, 1fr) 30px; align-items: center; gap: 0.7rem;
    padding: 0.55rem 0.7rem; border-radius: 18px; cursor: pointer; scroll-snap-align: center;
    border: 1px solid transparent;
    transform: rotateX(calc(var(--k) * -32deg)) scale(calc(1 - var(--ak) * 0.16));
    opacity: calc(1 - var(--ak) * 0.6);
    transition: background 0.2s, border-color 0.2s;
    will-change: transform;
}
.wheel-item:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.1); }
.wheel-item.playing {
    background: linear-gradient(90deg, rgba(255, 0, 127, 0.35), rgba(139, 92, 246, 0.2));
    border-color: rgba(255, 0, 127, 0.55); box-shadow: 0 10px 30px -12px rgba(255, 0, 127, 0.6);
}
.wi-num { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.wi-text { min-width: 0; }
.wi-text strong { display: block; font-size: 0.85rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi-text small { display: flex; align-items: center; gap: 0.35rem; font-size: 0.66rem; font-weight: 600; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.wheel-item.playing .wi-text small { color: #fff; }
.wheel-item.playing .live-dot { width: 6px; height: 6px; background: #fff; box-shadow: 0 0 8px #fff; }

/* Logos: recuadro glass que funciona con logos blancos y oscuros.
   Doble sombra en la imagen: contorno claro (logos oscuros) + sombra oscura (logos blancos). */
.ch-logo, .hero-logo {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 10px 25px -10px rgba(0, 0, 0, 0.7);
}
.ch-logo {
    position: relative; width: 100%; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
    color: #94a3b8; border-radius: 12px; font-size: 1.1rem;
}
.ch-logo img, .hero-logo { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55)); }
.ch-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.hero-logo { width: 96px; height: 62px; object-fit: contain; border-radius: 16px; padding: 7px; flex: none; }

.fav-btn {
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 0.75rem; color: #94a3b8;
    background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; transition: background 0.2s, transform 0.2s;
}
.fav-btn:hover { background: var(--neon); color: #fff; transform: scale(1.1); }
.fav-btn.on { color: var(--amber); }

/* Pantalla */
.screen { min-width: 0; scroll-margin-top: 90px; }
.hero-media {
    position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: 28px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 80px -30px rgba(255, 0, 127, 0.3), 0 20px 60px -30px rgba(0, 0, 0, 0.8);
}
.hero-media video { width: 100%; height: 100%; display: block; object-fit: contain; }
.hero-media:fullscreen { border-radius: 0; border: none; }
.screen-info {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    /* Sin degradado oscuro encima del video: la legibilidad la dan la sombra del texto y los botones glass */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 4px 18px rgba(0, 0, 0, 0.6);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.si-main { display: flex; align-items: center; gap: 1rem; min-width: 0; flex: 1 1 280px; }
.si-text { min-width: 0; }
.si-text h1 {
    font-size: clamp(1.3rem, 2.4vw, 2.4rem); font-weight: 900; line-height: 1.1; margin-top: 0.35rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}
.si-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.hero.is-playing.ui-hidden .screen-info { opacity: 0; transform: translateY(12px); pointer-events: none; }
.hero.is-playing.ui-hidden .hero-media { cursor: none; }

/* ===== Peliculas y series ===== */
.media-hero {
    position: relative; min-height: 340px; border-radius: 28px; overflow: hidden; margin-bottom: 1.5rem;
    display: flex; align-items: flex-end; border: 1px solid var(--glass-border);
}
.media-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transform: scale(1.05); transition: background-image 0.6s; }
.media-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 10, 0.95) 0%, rgba(5, 5, 10, 0.7) 45%, rgba(5, 5, 10, 0.1)), linear-gradient(to top, rgba(5, 5, 10, 0.9), transparent 50%); }
.media-hero-text { position: relative; z-index: 1; padding: 2.5rem; max-width: 640px; display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.media-hero-text h1 { font-size: clamp(1.8rem, 3.5vw, 3.2rem); font-weight: 900; line-height: 1.05; text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.media-hero-text p { color: #cbd5e1; font-size: 0.9rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.25rem; }
.poster-card { cursor: pointer; min-width: 0; }
.poster {
    position: relative; aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(255, 0, 127, 0.1)); border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.25); font-size: 2rem;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.poster-card:hover .poster { transform: translateY(-8px) scale(1.03); border-color: rgba(255, 0, 127, 0.45); box-shadow: 0 20px 40px -15px rgba(255, 0, 127, 0.35), 0 0 25px rgba(0, 240, 255, 0.15); }
.poster-card:hover .poster img { transform: scale(1.08); }
.poster .rating {
    position: absolute; top: 8px; left: 8px; z-index: 2; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.66rem; font-weight: 800;
    background: rgba(5, 5, 10, 0.7); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.poster .rating i { color: var(--amber); }
.ch-hover {
    position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.3s;
}
.poster-card:hover .ch-hover { opacity: 1; }
.play-circle {
    width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem;
    background: var(--grad); color: #fff; box-shadow: 0 0 25px rgba(255, 0, 127, 0.6);
}
.progress { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad-3); }
.pc-info { padding: 0.6rem 0.2rem 0; }
.pc-info h3 { font-size: 0.8rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-card:hover .pc-info h3 { color: var(--neon); }
.pc-info p { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Esqueleto mientras carga */
.poster-card.skeleton .poster { background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.poster-card.skeleton .pc-info span { display: block; height: 10px; border-radius: 6px; margin-top: 6px; background: rgba(255, 255, 255, 0.06); }
.poster-card.skeleton .pc-info span + span { width: 50%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Ficha */
.detail-card {
    position: relative; width: 100%; max-width: 980px; max-height: 92vh; overflow-y: auto; border-radius: 28px;
    background: #0b0a14; border: 1px solid var(--glass-border); box-shadow: 0 0 80px rgba(255, 0, 127, 0.2);
}
.detail-backdrop { position: absolute; inset: 0 0 auto 0; height: 380px; background-size: cover; background-position: center 20%; }
.detail-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #0b0a14 5%, rgba(11, 10, 20, 0.6) 60%, rgba(11, 10, 20, 0.3)); }
.detail-close { position: absolute; top: 16px; right: 16px; z-index: 3; }
.detail-body { position: relative; z-index: 1; display: flex; gap: 2rem; padding: 9rem 2rem 1.5rem; align-items: flex-end; }
.detail-poster { width: 190px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 18px; flex: none; box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.9); border: 1px solid var(--glass-border); }
.detail-text { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.detail-text h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 900; line-height: 1.1; }
.detail-plot { color: #cbd5e1; font-size: 0.9rem; line-height: 1.6; }
.detail-meta { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; color: var(--text-muted); }
.detail-meta b { color: #e2e8f0; }
.seasons { position: relative; z-index: 1; padding: 0 2rem 2rem; }
.season-pills { margin-bottom: 1rem; }
.episode-list { display: flex; flex-direction: column; gap: 0.6rem; }
.episode {
    display: flex; gap: 1rem; align-items: center; padding: 0.6rem; border-radius: 16px; cursor: pointer;
    background: rgba(255, 255, 255, 0.03); border: 1px solid transparent; transition: background 0.2s, border-color 0.2s;
}
.episode:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 0, 127, 0.35); }
.ep-thumb {
    position: relative; width: 150px; aspect-ratio: 16 / 9; flex: none; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(255, 0, 127, 0.15)); color: #fff;
}
.ep-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ep-thumb .progress { left: 6px; right: 6px; bottom: 6px; height: 3px; }
.ep-text { min-width: 0; }
.ep-text strong { display: block; font-size: 0.88rem; }
.ep-text small { display: block; font-size: 0.7rem; color: var(--cyan); margin-top: 2px; }
.ep-text p { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Reproductor de peliculas */
.vod-modal { padding: 0; background: #000; place-items: stretch; z-index: 70; }
.vod-shell { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
.vod-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
    transition: opacity 0.4s;
}
.vod-top h3 { font-size: 1.1rem; font-weight: 900; }
.vod-top small { color: var(--cyan); font-size: 0.75rem; font-weight: 600; }
.vod-top-actions { display: flex; gap: 0.6rem; align-items: center; }
.vod-shell:not(:hover) .vod-top { opacity: 0; }
.vod-screen { position: relative; flex: 1; min-height: 0; }
.vod-screen video { width: 100%; height: 100%; display: block; background: #000; }
.vod-screen .player-overlay { pointer-events: none; }
.vod-warning {
    position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 4; max-width: min(640px, 92%);
    display: flex; gap: 0.75rem; align-items: center; padding: 0.9rem 1.2rem; border-radius: 16px;
    background: rgba(18, 18, 32, 0.9); border: 1px solid rgba(255, 184, 0, 0.45); color: #fde68a; font-size: 0.82rem; font-weight: 600;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

/* Controles propios en modo "audio convertido" */
.vod-bar {
    position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.25rem; z-index: 4;
    display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; border-radius: 18px;
    background: rgba(10, 10, 20, 0.75); border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: opacity 0.4s;
}
.vod-shell:not(:hover) .vod-bar { opacity: 0; }
.vod-time { font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #e2e8f0; min-width: 52px; text-align: center; }
#vodSeek {
    flex: 1; min-width: 60px; height: 6px; border-radius: 6px; cursor: pointer; appearance: none; -webkit-appearance: none;
    background: linear-gradient(90deg, var(--neon), var(--purple)) 0 / var(--p, 0%) 100% no-repeat, rgba(255, 255, 255, 0.18);
}
#vodSeek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px var(--neon); }
#vodSeek::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: #fff; }
.dolby-tag {
    display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
    padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.5px;
    color: var(--cyan); background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.25);
}
@media (max-width: 640px) {
    .vod-bar { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; gap: 0.35rem; padding: 0.5rem; }
    .dolby-tag { display: none; }
    .vod-time { min-width: 40px; font-size: 0.68rem; }
}

/* Barra de pestañas inferior (solo celular) */
.mobile-tabs { display: none; }

/* ===== Modal de ayuda ===== */
.modal {
    position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.glass { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
.modal-card { max-width: 780px; width: 100%; padding: 2rem; max-height: 90vh; overflow-y: auto; box-shadow: 0 0 80px rgba(255, 0, 127, 0.25); }
.modal-card h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 1.25rem; display: flex; gap: 0.6rem; align-items: center; }
.modal-card h2 i { color: var(--neon); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.9rem; margin-bottom: 1.5rem; }
.help-item { padding: 1rem; border-radius: 16px; background: var(--glass-card); border: 1px solid var(--glass-border); }
.help-item i { font-size: 1.3rem; margin-bottom: 0.6rem; display: block; background: var(--grad-3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.help-item strong { display: block; margin-bottom: 0.3rem; }
.help-item p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }

/* ===== Login ===== */
.login-page { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 410px; text-align: center; padding: 2.5rem 2rem; box-shadow: 0 0 80px rgba(255, 0, 127, 0.18); }
.login-card .form-group { text-align: left; }
.login-logo { width: 130px; margin: 0 auto 0.5rem; display: block; filter: drop-shadow(0 0 25px rgba(255, 0, 127, 0.45)); }
.brand-title { font-weight: 900; letter-spacing: 1px; }
.brand-title span { color: var(--neon); }
.login-card h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.login-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.75rem; }
.login-card .status-box { margin: 0 0 1rem; text-align: left; }
.btn-block { width: 100%; justify-content: center; margin-top: 0.5rem; padding: 0.9rem; }

/* ===== Configuracion (admin) ===== */
.view-title { font-size: 1.4rem; font-weight: 900; margin-bottom: 1.25rem; display: flex; gap: 0.6rem; align-items: center; }
.view-title i { color: var(--neon); }
#view-config > .card, #view-config > section, #view-config > .content-grid { margin-bottom: 1.25rem; }

.card {
    background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 1.5rem; backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.stat-card { display: flex; align-items: center; gap: 1.25rem; }
.stat-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; }
.stat-icon.speed { background: rgba(255, 0, 127, 0.15); color: #f472b6; }
.stat-icon.data { background: rgba(0, 240, 255, 0.12); color: var(--cyan); }
.stat-icon.streams { background: rgba(255, 184, 0, 0.15); color: var(--amber); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 1.7rem; font-weight: 900; margin-top: 0.2rem; }
.stat-value small { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }

.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.card-header {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color);
}
.card-header h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; }

.apk-options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.apk-box { background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border-color); border-radius: 14px; padding: 1.25rem; }
.apk-box h4 { font-size: 0.95rem; color: var(--cyan); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.apk-box p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.copy-field { background: rgba(0, 0, 0, 0.3); padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid var(--border-color); }
code { font-size: 0.85rem; color: #34d399; word-break: break-all; }

/* Formularios */
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; gap: 1rem; }
.form-group.col { flex: 1; }
label { display: block; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--text-muted); }
input[type="text"], input[type="number"], input[type="password"], select {
    width: 100%; padding: 0.75rem 0.95rem; border-radius: 12px; outline: none;
    background: var(--bg-input); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-main);
    font: inherit; font-size: 0.95rem; transition: border-color 0.2s, background 0.2s;
}
select option { background: var(--bg); }
input:focus, select:focus { border-color: rgba(255, 0, 127, 0.6); background: rgba(255, 255, 255, 0.08); }
.password-wrapper { position: relative; display: flex; }
.btn-toggle-pw {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 8px;
}
.checkbox-group label { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; color: var(--text-main); font-size: 0.9rem; }
.user-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.user-form input, .user-form select { flex: 1; min-width: 110px; }
.role-badge { padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; background: rgba(255, 255, 255, 0.08); }
.role-badge.admin { background: rgba(255, 0, 127, 0.18); color: #f9a8d4; }

/* Botones */
.btn-group { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.btn {
    padding: 0.7rem 1.3rem; border-radius: 14px; font-weight: 800; font-size: 0.85rem; cursor: pointer; border: none;
    display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
    transition: transform 0.15s var(--ease), background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad); color: white; box-shadow: 0 0 20px rgba(255, 0, 127, 0.35); }
.btn-primary:hover { transform: scale(1.03); }
.btn-secondary { background: var(--glass-strong); color: white; border: 1px solid var(--glass-border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.16); }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { background: var(--glass-strong); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.78rem; border-radius: 10px; }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.btn-danger:hover { background: var(--danger); color: white; }

.status-box { margin-top: 1rem; padding: 0.85rem; border-radius: 12px; font-size: 0.85rem; line-height: 1.5; }
.status-box.success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #34d399; }
.status-box.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #f87171; }
.status-box.info { background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.3); color: var(--cyan); }

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table th { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--glass); border: 1px solid var(--glass-border); color: #fff;
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    padding: 0.8rem 1.2rem; border-radius: 16px; font-size: 0.8rem; font-weight: 700;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    opacity: 0; transform: translateY(20px) scale(0.9); transition: all 0.35s var(--ease); pointer-events: none;
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--neon); flex: none; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }

/* ===== Responsivo ===== */
@media (max-width: 1280px) {
    .user-meta, .clock-box { display: none; }
    .topnav, .app { padding-left: 1.5rem; padding-right: 1.5rem; }
    .live-stage { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 1024px) {
    .nav-links { display: none; }
    .content-grid { grid-template-columns: 1fr; }
    /* Pantalla arriba; canales abajo en carrusel horizontal */
    .live-stage { grid-template-columns: minmax(0, 1fr); }
    .screen { order: -1; }
    .channel-rail { border-radius: 22px; }
    .rail-arrow { display: none; }
    .channel-wheel {
        flex: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0.5rem 1rem 1rem;
        scroll-snap-type: x proximity; mask-image: none; -webkit-mask-image: none;
    }
    .wi-text { width: 100%; }
    .wheel-item { transform: none; opacity: 1; grid-template-columns: minmax(0, 1fr); width: 132px; text-align: center; justify-items: center; gap: 0.4rem; padding: 0.7rem; background: rgba(255, 255, 255, 0.04); }
    .wi-num { display: none; }
    .wi-text small { display: block; text-align: center; }
    .wheel-item .fav-btn { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; background: rgba(5, 5, 10, 0.6); }
    .wheel-item { position: relative; }
    .hero.is-playing.ui-hidden .screen-info { opacity: 1; transform: none; pointer-events: auto; }
    .screen-info { position: static; padding: 1rem 0.25rem 0; background: none; }
    .hero-media { overflow: visible; background: none; border: none; box-shadow: none; aspect-ratio: auto; border-radius: 0; }
    .hero-media video, .hero-media > .idle-state, .hero-media > .player-overlay { border-radius: 22px; }
    .hero-media video { aspect-ratio: 16 / 9; height: auto; background: #000; }
    .hero-media > .idle-state, .hero-media > .player-overlay { bottom: auto; aspect-ratio: 16 / 9; }
    .detail-body { flex-direction: column; align-items: flex-start; padding-top: 7rem; }
    .detail-poster { width: 140px; }
}
@media (max-width: 640px) {
    .topnav { padding: 0.65rem 1rem; gap: 0.6rem; }
    .brand-name { display: none; }
    .nav-left { gap: 0.6rem; }
    .search-box { width: auto; flex: 1; }
    .nav-right { flex: 1; min-width: 0; }
    .app { padding: 1rem 1rem 6rem; }
    .cat-arrow { display: none; }
    .idle-logo { width: 70px; }
    .idle-state h3 { font-size: 1.05rem; }
    .idle-state .btn-neon, .steps { display: none; }
    .hints { display: none; }
    .si-actions { width: 100%; justify-content: space-between; }
    .si-actions .icon-btn.lg { width: 42px; height: 42px; }
    .zap-card strong { font-size: 1rem; }
    .zap-logo .ch-logo { width: 64px; }
    .media-hero { min-height: 260px; }
    .media-hero-text { padding: 1.5rem; }
    .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
    .poster-card:hover .poster { transform: none; }
    .detail-body, .seasons { padding-left: 1.25rem; padding-right: 1.25rem; }
    .ep-thumb { width: 110px; }
    .toast { left: 1rem; right: 1rem; bottom: 5.5rem; }
    .mobile-tabs {
        display: flex; justify-content: space-around; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 45;
        padding: 0.4rem; border-radius: 20px; background: rgba(5, 5, 10, 0.85); border: 1px solid var(--glass-border);
        backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    }
    .mobile-tabs .nav-btn { flex-direction: column; gap: 0.2rem; font-size: 0.6rem; padding: 0.45rem 0.6rem; }
    .mobile-tabs .nav-btn i { font-size: 1rem; }
}

/* Pantalla completa: siempre controles sobre el video que se ocultan solos, aunque la pantalla sea
   chica o Windows tenga escalado alto (si no, aplicaban las reglas de celular y nunca se ocultaban) */
.hero-media:fullscreen { aspect-ratio: auto; background: #000; }
.hero-media:fullscreen video { height: 100%; aspect-ratio: auto; border-radius: 0; }
.hero-media:fullscreen > .idle-state, .hero-media:fullscreen > .player-overlay { aspect-ratio: auto; bottom: 0; border-radius: 0; }
.hero-media:fullscreen .screen-info { position: absolute; padding: 1.25rem 1.5rem; }
.hero.is-playing.ui-hidden .hero-media:fullscreen .screen-info { opacity: 0; transform: translateY(12px); pointer-events: none; }
.hero.is-playing.ui-hidden .hero-media:fullscreen { cursor: none; }

/* ===== Calidad real del video ===== */
.quality-badge {
    position: absolute; top: 14px; right: 14px; z-index: 4; pointer-events: auto;
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 999px;
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.5px; color: #fff;
    background: rgba(5, 5, 10, 0.55); border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: opacity 0.5s;
}
.quality-badge i { color: var(--cyan); }
.hero.is-playing.ui-hidden .quality-badge { opacity: 0; }
.vod-screen .quality-badge { top: 76px; right: 1.5rem; }
.vod-shell:not(:hover) .quality-badge { opacity: 0; }

/* ===== Permisos por usuario ===== */
.access-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; width: 100%; }
.access-label { font-size: 0.78rem; color: var(--text-muted); margin-right: 0.2rem; }
.check-chip {
    display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; cursor: pointer; color: var(--text-main);
    padding: 0.45rem 0.8rem; border-radius: 12px; font-size: 0.78rem; font-weight: 700;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
}
.check-chip input { accent-color: var(--neon); width: 15px; height: 15px; }
.check-chip:has(input:checked) { border-color: rgba(255, 0, 127, 0.5); background: rgba(255, 0, 127, 0.12); }
.access-cell { white-space: nowrap; }
.access-chip {
    display: inline-flex; align-items: center; gap: 0.3rem; margin: 0 0.25rem 0.25rem 0; cursor: pointer;
    padding: 0.25rem 0.6rem; border-radius: 999px; font: inherit; font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); background: rgba(255, 255, 255, 0.04); border: 1px dashed rgba(255, 255, 255, 0.2);
    text-decoration: line-through; opacity: 0.7; transition: all 0.2s;
}
.access-chip.on { color: #fff; background: rgba(0, 240, 255, 0.12); border: 1px solid rgba(0, 240, 255, 0.35); text-decoration: none; opacity: 1; }
.access-chip.on i { color: var(--cyan); }

/* ===== Monitores grandes: la interfaz crece con la pantalla (antes se veia chica en 2K/4K) ===== */
@media (min-width: 2200px) { html { zoom: 1.2; } .app { max-width: 2000px; } }
@media (min-width: 3000px) { html { zoom: 1.5; } }
@media (min-width: 3800px) { html { zoom: 1.9; } }
.user-form .check-chip input { flex: none; min-width: 0; width: 15px; }

/* ===== Reproductor de peliculas: siempre del tamano de la pantalla (antes crecia y la barra quedaba abajo) ===== */
.vod-modal .vod-shell { position: absolute; inset: 0; width: auto; height: auto; }
.vod-screen { position: absolute; inset: 0; }
.vod-screen video { width: 100%; height: 100%; object-fit: contain; }
.vod-bar { bottom: max(1.25rem, env(safe-area-inset-bottom)); }
.vod-bar #vodSeek:disabled { opacity: 0.35; }
.vod-shell:has(.vod-menu:not([hidden])) .vod-bar,
.vod-shell:has(.vod-menu:not([hidden])) .vod-top { opacity: 1; }

/* Menu de subtitulos e idioma */
.vod-menu {
    position: absolute; right: 1.25rem; bottom: 5.5rem; z-index: 6; width: min(340px, calc(100% - 2.5rem));
    max-height: 60vh; overflow-y: auto; padding: 0.9rem; border-radius: 18px;
    background: rgba(12, 12, 22, 0.94); border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8);
}
.vod-menu h4 { font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan); margin: 0.4rem 0.3rem 0.5rem; display: flex; gap: 0.5rem; align-items: center; }
.vod-menu h4:not(:first-child) { margin-top: 1rem; }
.menu-opt {
    display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; cursor: pointer;
    padding: 0.6rem 0.75rem; border-radius: 12px; border: none; background: none; color: var(--text-main); font: inherit; font-size: 0.85rem;
}
.menu-opt:hover:not([disabled]) { background: rgba(255, 255, 255, 0.07); }
.menu-opt.on { background: rgba(255, 0, 127, 0.15); }
.menu-opt i { color: var(--text-muted); }
.menu-opt.on i { color: var(--neon); }
.menu-opt[disabled] { opacity: 0.45; cursor: not-allowed; }
.menu-opt small { margin-left: auto; font-size: 0.68rem; color: var(--text-muted); }
.menu-note { font-size: 0.8rem; color: var(--text-muted); padding: 0.3rem 0.75rem; }

/* Subtitulos legibles sobre cualquier imagen */
#vodPlayer::cue { background: rgba(0, 0, 0, 0.72); color: #fff; font-family: var(--font-family); font-size: clamp(16px, 2.2vw, 30px); line-height: 1.35; }

/* ===== Radio ===== */
.radio-state {
    position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
    background: radial-gradient(circle at 50% 40%, rgba(255, 0, 127, 0.3), rgba(139, 92, 246, 0.25) 35%, #05050a 75%);
    text-align: center; padding: 1.5rem;
}
.radio-logo .ch-logo { width: 150px; border-radius: 22px; animation: float 5s ease-in-out infinite; }
.radio-state small { font-size: 0.7rem; letter-spacing: 3px; color: var(--cyan); font-weight: 800; }
.radio-state strong { font-size: clamp(1.2rem, 2.6vw, 2rem); font-weight: 900; }
.radio-eq { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.radio-eq i { width: 7px; border-radius: 4px; background: var(--grad-3); animation: eq 0.9s ease-in-out infinite alternate; }
.radio-eq i:nth-child(2) { animation-delay: -0.3s; } .radio-eq i:nth-child(3) { animation-delay: -0.6s; }
.radio-eq i:nth-child(4) { animation-delay: -0.15s; } .radio-eq i:nth-child(5) { animation-delay: -0.45s; }
.radio-eq i:nth-child(6) { animation-delay: -0.75s; } .radio-eq i:nth-child(7) { animation-delay: -0.2s; }
@keyframes eq { from { height: 15%; } to { height: 100%; } }


/* ===== Gestion de clientes (tema neon Onfiber) ===== */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .view-title { margin-bottom: 0.2rem; }
.page-sub { color: var(--text-muted); font-size: 0.85rem; }
.stat-icon.clients { background: rgba(139, 92, 246, 0.18); color: var(--primary-light); }
.search-box.small { width: 240px; height: 38px; }
.link-btn { background: none; border: none; cursor: pointer; color: var(--neon); font: inherit; font-weight: 700; font-size: 0.8rem; display: inline-flex; gap: 0.4rem; align-items: center; }
.btn-neon.sm, .btn-glass.sm { padding: 0.55rem 0.95rem; font-size: 0.7rem; border-radius: 12px; }

.client-list { display: flex; flex-direction: column; gap: 0.6rem; }
.client {
    display: grid; grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1.7fr) auto; align-items: center; gap: 1rem;
    padding: 0.8rem 1rem; border-radius: 18px; background: var(--glass-card); border: 1px solid var(--glass-border);
    transition: border-color 0.2s;
}
.client:hover { border-color: rgba(255, 0, 127, 0.35); }
.client .avatar { width: 42px; height: 42px; }
.client .avatar.admin { box-shadow: 0 0 0 2px var(--amber), 0 0 0 4px rgba(255, 184, 0, 0.3); }
.client-name strong { display: block; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-name small { display: block; color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-plan { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.plan-chip {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); background: rgba(255, 255, 255, 0.04); border: 1px dashed rgba(255, 255, 255, 0.18);
}
.plan-chip.on { color: #fff; background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.35); }
.plan-chip.on i { color: var(--cyan); }
.client-actions { display: flex; gap: 0.4rem; }

/* Asistente: datos -> secciones -> categorias y canales */
.wizard {
    width: 100%; max-width: 780px; height: min(860px, calc(100vh - 32px)); display: flex; flex-direction: column; overflow: hidden;
    border-radius: 28px; background: #0b0a14; border: 1px solid var(--glass-border); box-shadow: 0 0 80px rgba(255, 0, 127, 0.22);
}
.wiz-top { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.wiz-progress { flex: 1; max-width: 280px; margin: 0 auto; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.wiz-progress span { display: block; height: 100%; border-radius: 999px; background: var(--grad); box-shadow: 0 0 12px rgba(255, 0, 127, 0.6); transition: width 0.4s var(--ease); }
.wiz-body { flex: 1; overflow-y: auto; padding: 0.4rem 1.75rem 1rem; }
.wiz-step h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 0.4rem; }
.wiz-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.5; }
.wiz-foot { display: flex; gap: 0.8rem; padding: 1rem 1.75rem 1.3rem; border-top: 1px solid var(--glass-border); }
.wiz-foot > * { flex: 1; justify-content: center; }
.wiz-foot .btn-neon:disabled { opacity: 0.6; }

.uline { position: relative; margin-bottom: 1.2rem; }
.uline label { font-weight: 700; color: var(--text-main); margin-bottom: 0.25rem; }
.uline input, .uline select {
    width: 100%; padding: 0.75rem 0.95rem; border-radius: 12px; outline: none; font: inherit; font-size: 0.95rem;
    background: var(--bg-input); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-main);
}
.uline input:focus, .uline select:focus { border-color: rgba(255, 0, 127, 0.6); background: rgba(255, 255, 255, 0.08); }
.uline input:disabled, .uline select:disabled { opacity: 0.55; }
.uline .link-btn { position: absolute; right: 12px; bottom: 0.8rem; }

.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.choice {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; padding: 1.5rem 0.8rem 1.2rem; text-align: center;
    border-radius: 22px; cursor: pointer; color: #fff; font: inherit; background: var(--glass-card); border: 1px solid var(--glass-border); transition: all 0.2s;
}
.choice i { font-size: 2rem; color: #64748b; }
.choice strong { font-size: 0.95rem; }
.choice small { font-size: 0.72rem; color: var(--text-muted); }
.choice::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; top: 10px; right: 10px;
    width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.2); color: transparent;
}
.choice.on { border-color: rgba(255, 0, 127, 0.6); background: linear-gradient(135deg, rgba(255, 0, 127, 0.18), rgba(139, 92, 246, 0.12)); box-shadow: 0 10px 30px -12px rgba(255, 0, 127, 0.6); }
.choice.on i { color: var(--neon); }
.choice.on::after { background: var(--grad); border-color: transparent; color: #fff; }

.all-toggle {
    display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; padding: 0.95rem 1.1rem; border-radius: 18px; cursor: pointer;
    background: var(--glass-card); border: 1px solid var(--glass-border);
}
.all-toggle:has(input:checked) { border-color: rgba(255, 0, 127, 0.55); background: rgba(255, 0, 127, 0.1); }
.all-toggle strong { display: block; color: #fff; font-size: 0.95rem; }
.all-toggle small { display: block; color: var(--text-muted); font-size: 0.75rem; margin-top: 2px; }
.wizard input[type="checkbox"] { accent-color: var(--neon); width: 18px; height: 18px; flex: none; cursor: pointer; }
.wiz-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.wiz-tools .search-box { flex: 1; min-width: 200px; width: auto; }
.wiz-summary { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.wiz-summary b { color: var(--cyan); }
.cat-list { display: flex; flex-direction: column; gap: 0.5rem; }
.wcat { border-radius: 16px; background: var(--glass-card); border: 1px solid var(--glass-border); }
.wcat.full, .wcat.partial { border-color: rgba(255, 0, 127, 0.45); }
.wcat-head { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; }
.wcat-head label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.75rem; margin: 0; cursor: pointer; color: #fff; }
.wcat-head label span { font-weight: 800; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcat-count { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.wcat.full .wcat-count, .wcat.partial .wcat-count { color: var(--cyan); }
.wcat-open {
    display: flex; gap: 0.4rem; align-items: center; white-space: nowrap; cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 700;
    padding: 0.4rem 0.75rem; border-radius: 10px; color: #cbd5e1; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-border);
}
.wcat-open:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.wcat-body { padding: 0 1rem 1rem; }
.wcat-all {
    display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.7rem; padding: 0.65rem 0.9rem; border-radius: 12px; cursor: pointer;
    color: #fff; font-weight: 700; font-size: 0.82rem; background: linear-gradient(90deg, rgba(255, 0, 127, 0.2), rgba(139, 92, 246, 0.12));
}
.wch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.4rem; }
.wch {
    display: flex; align-items: center; gap: 0.6rem; min-width: 0; margin: 0; padding: 0.4rem 0.55rem; border-radius: 12px; cursor: pointer; color: #fff;
    background: rgba(255, 255, 255, 0.03); border: 1px solid transparent;
}
.wch:has(input:checked) { border-color: rgba(255, 0, 127, 0.5); background: rgba(255, 0, 127, 0.1); }
.wch .ch-logo { width: 44px; flex: none; border-radius: 8px; font-size: 0.75rem; }
.wch .ch-logo img { padding: 3px; }
.wch .nm { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1024px) {
    .client { grid-template-columns: auto minmax(0, 1fr) auto; }
    .client-plan { grid-column: 2 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
    .search-box.small { width: 100%; }
    .modal:has(.wizard) { padding: 8px; }
    .wizard { height: calc(100vh - 16px); border-radius: 22px; }
    .wiz-body { padding: 0.25rem 1.1rem 1rem; }
    .wiz-foot { padding: 0.9rem 1.1rem 1.1rem; }
    .wiz-step h2 { font-size: 1.35rem; }
    .choice-grid { grid-template-columns: 1fr; }
    .choice { flex-direction: row; padding: 1rem; text-align: left; }
    .choice i { font-size: 1.5rem; width: 34px; }
    .choice small { margin-left: auto; margin-right: 1.8rem; }
    .wch-grid { grid-template-columns: 1fr; }
}
