:root {
  --bg-0: #08080c;
  --bg-1: #0f1018;
  --bg-2: #161826;
  --bg-3: #1e2138;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text-0: #ffffff;
  --text-1: #d8dae8;
  --text-2: #9b9fb3;
  --text-3: #5d6075;
  --accent: #e50914;
  --accent-2: #ff3d4a;
  --accent-3: #ffb000;
  --green: #1bd96a;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  --transition: 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --gap-section: 22px;
}

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

html, body, #root {
  height: 100%;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

body { font-size: 18px; line-height: 1.5; }

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

*:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  height: 100vh;
  background:
    radial-gradient(ellipse 1200px 600px at 80% 0%, rgba(229, 9, 20, 0.08), transparent 70%),
    radial-gradient(ellipse 800px 500px at 0% 100%, rgba(120, 60, 220, 0.06), transparent 70%),
    var(--bg-0);
}

.sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, #0c0d18 0%, #08080d 100%);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  position: relative;
  z-index: 200;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 24px 12px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  align-items: center;
  justify-content: center;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.45);
}

.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  padding: 14px 12px 6px 12px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-2);
  color: var(--text-0);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.18) 0%, rgba(229, 9, 20, 0.04) 100%);
  color: var(--text-0);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-footer .sidebar-legal-links {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sidebar-footer .sidebar-legal-link {
  color: var(--text-3);
  font-size: 11px;
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  letter-spacing: 0.5px;
  transition: all 160ms ease;
}

.sidebar-footer .sidebar-legal-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: rgba(8, 8, 12, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 200;
  position: relative;
}

.breadcrumb {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb small {
  color: var(--text-3);
  font-weight: 500;
  font-size: 14px;
}

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 280px;
  transition: var(--transition);
}

.search:focus-within {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.search input {
  background: none;
  border: none;
  color: var(--text-0);
  font-size: 15px;
  outline: none;
  width: 100%;
}

.search input::placeholder { color: var(--text-3); }

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.main {
  grid-area: main;
  overflow-y: auto;
  padding: 0 28px 60px 28px;
  scroll-behavior: smooth;
}

.page { padding-top: 8px; }

/* Detalle abierto = vista única: ocultar todo lo demás de la página */
.page.detail-open > *:not(.detail-page) {
  display: none;
}

/* Movie/Series card (Netflix-style poster) */
.card {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg-2);
  transition: var(--transition);
  padding: 0;
  text-align: left;
  color: inherit;
  pointer-events: auto;
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  z-index: 3;
}

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

/* Badge "no disponible" para novelas sin capítulos de YouTube */
.card-unavailable {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}
.card-dimmed { opacity: 0.55; filter: grayscale(0.35); }
.card-dimmed:hover { opacity: 0.95; filter: grayscale(0); }

.card-type {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}

.card-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 176, 0, 0.2);
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}

.card-quality {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.card-quality-4k,
.card-quality-2160p,
.card-quality-uhd {
  background: rgba(229, 9, 20, 0.85);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 61, 74, 0.45);
}

.card-quality-1080p,
.card-quality-fhd,
.card-quality-fullhd,
.card-quality-full {
  background: rgba(255, 176, 0, 0.85);
  color: #1a1a1a;
  box-shadow: 0 0 0 1px rgba(255, 176, 0, 0.45);
}

.card-quality-720p,
.card-quality-hd,
.card-quality-hdtv,
.card-quality-hdrip,
.card-quality-bluray,
.card-quality-web,
.card-quality-webdl {
  background: rgba(27, 217, 106, 0.85);
  color: #062a13;
  box-shadow: 0 0 0 1px rgba(27, 217, 106, 0.45);
}

.card-quality-480p,
.card-quality-sd,
.card-quality-dvdrip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.card-quality-cam,
.card-quality-hdcam,
.card-quality-ts,
.card-quality-telesync {
  background: rgba(229, 9, 20, 0.2);
  color: var(--accent-2);
}

.card-fav {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease;
  user-select: none;
}

.card-fav:hover {
  transform: scale(1.12);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.card-fav.active {
  color: #ffcc00;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.6);
  background: rgba(0, 0, 0, 0.55);
}

.card-fav.active:hover {
  color: #ffd633;
}

.card-live {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(27, 217, 106, 0.95);
  color: #fff;
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}

/* Card inside a horizontal row */
.row > .card,
.row > .channel-row-card {
  flex-shrink: 0;
  width: 220px;
  min-width: 220px;
  height: auto;
  aspect-ratio: 2 / 3;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.row > .card:hover {
  z-index: 5;
}

/* Card inside grid (catalogo) */
.grid > .card {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.grid > .card:hover {
  z-index: 5;
}

.card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* Featured Hero (Cuevana3-style) */
.featured-section {
  margin-top: 0;
  margin-bottom: 32px;
  position: relative;
  width: 100%;
}

.featured-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: var(--bg-0);
  transition: opacity 500ms ease;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
}

.featured-hero.fade-in { opacity: 1; }
.featured-hero.fade-out { opacity: 0; }

/* Blur ambient de fondo */
.featured-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.2);
  opacity: 0.25;
  z-index: 0;
}

/* Imagen principal a la derecha con difuminado */
.featured-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%);
  mask-image: linear-gradient(to right, transparent 0%, #000 30%);
}


/* Vignette que mezcla imagen con fondo */
.featured-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
      to right,
      var(--bg-0) 0%,
      rgba(8, 8, 12, 0.9) 35%,
      rgba(8, 8, 12, 0.3) 65%,
      transparent 100%
    ),
    linear-gradient(to bottom, transparent 50%, var(--bg-0) 100%);
}

/* Contenido texto izquierda */
.featured-content {
  position: relative;
  z-index: 3;
  padding: 28px 50px;
  max-width: 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.featured-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-1);
  flex-wrap: wrap;
}

.featured-rating { color: var(--accent-3); font-weight: 800; }
.featured-year { color: var(--text-2); }
.featured-genre {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  color: var(--text-1);
}

.featured-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-actions { display: flex; gap: 12px; }

.featured-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, background 200ms ease;
  backdrop-filter: blur(4px);
}

.featured-section:hover .featured-arrow { opacity: 1; }
.featured-arrow:hover { background: rgba(229, 9, 20, 0.85); }
.featured-arrow-left { left: 24px; }
.featured-arrow-right { right: 24px; }
.featured-arrow-icon { line-height: 1; }

.featured-dots {
  position: absolute;
  bottom: 20px;
  right: 30px;
  z-index: 10;
  display: flex;
  gap: 6px;
}

.featured-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.featured-dot.active { background: var(--accent); transform: scale(1.3); }
.featured-dot:hover { background: rgba(255, 255, 255, 0.5); }

.row-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 8px 4px;
}

/* Los servidores van en el reproductor, no en la ficha */
#servers-section {
  display: none !important;
}

/* Channel row card (tira horizontal en home) */
.channel-row-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg-2);
  transition: var(--transition);
  padding: 0;
  text-align: left;
  color: inherit;
}

.channel-row-card:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  border-color: var(--line-2);
  z-index: 3;
}

.channel-row-bg {
  position: absolute;
  inset: 0;
  filter: saturate(1.05);
}

.channel-row-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 30%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.channel-row-live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 2;
}

.channel-row-hd {
  position: absolute;
  bottom: 52px;
  right: 10px;
  z-index: 3;
  pointer-events: none;
}

.channel-row-initial {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -65%);
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  letter-spacing: -2px;
  z-index: 1;
  opacity: 0.92;
}

/* Fallback para canales sin poster (cards de "También viste" / "Actividad") */
.channel-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.channel-fallback span {
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  letter-spacing: -1.5px;
  opacity: 0.95;
}
.continue-card-poster-channel { aspect-ratio: 16/9; }
.continue-card-poster-channel .channel-fallback span { font-size: 38px; }

/* Logo del canal (cuando hay URL valida) */
.channel-row-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 78%;
  max-height: 46%;
  height: auto;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.channel-row-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px 12px;
  z-index: 2;
}

.channel-row-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  letter-spacing: -0.2px;
}

.channel-row-res {
  font-weight: 500;
  opacity: 0.85;
  font-size: 12px;
}

.channel-row-cat {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.2px;
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.channel-row-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 8px 4px;
}



/* Overlay oscuro: cubre todo EXCEPTO el sidebar (var(--sidebar-w) izq) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(6, 6, 10, 0.92);
  animation: slideInRight 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: auto;
  clip-path: inset(0 0 0 var(--sidebar-w));
}

/* Modal: slide-in panel al lado derecho, respete sidebar variable (responsive) */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: fixed;
  top: var(--topbar-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 250;
  width: min(680px, 100%);
  background: var(--bg-1);
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--line-2);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  animation: slideInRight 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Detail full-page (sin modal flotante, estilo Netflix) ── */
.detail-page {
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  background: var(--bg-1);
}

.detail-page .modal {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  border: none;
  border-left: none;
  box-shadow: none;
  overflow: visible;
}

.detail-page .modal-hero {
  height: 400px;
  border-radius: 0;
}

.detail-page .modal-body {
  margin-top: 0;
  background: var(--bg-1);
  padding-top: 24px;
}

.modal-back {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  background: rgba(8, 8, 12, 0.7);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  z-index: 2;
  transition: var(--transition);
}

.modal-back:hover { background: var(--accent); }

.modal-hero {
  height: 320px;
  background-size: cover;
  background-position: center 20%;
  position: relative;
  flex-shrink: 0;
}

.modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 12, 0.1) 0%,
    rgba(8, 8, 12, 0.5) 50%,
    var(--bg-1) 100%
  );
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.7);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
}

.modal-close:hover { background: var(--accent); transform: rotate(90deg); }

.modal-body {
  padding: 0 36px 32px 36px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  background: linear-gradient(to bottom, transparent 0, var(--bg-1) 40px);
}

.modal h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 10px;
  line-height: 1.1;
}

.modal-meta {
  display: flex;
  gap: 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-meta .pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-0);
  font-size: 12px;
  font-weight: 700;
}

/* ── Base button ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

/* Primary CTA — the big red "Reproducir" button */
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
  font-size: 16px;
  padding: 12px 28px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Ghost / secondary button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-1);
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-0);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Favoritos (modal de detalle) */
.btn-fav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-1);
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  transition: var(--transition);
}

.btn-fav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-0);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-fav.active {
  background: rgba(255, 204, 0, 0.18);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.55);
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.btn-fav.active:hover {
  background: rgba(255, 204, 0, 0.26);
  color: #ffd633;
  border-color: rgba(255, 204, 0, 0.7);
}

.modal-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  margin-bottom: 16px;
  max-width: 700px;
}

.modal-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; max-width: 700px; }

.modal-genre {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-0);
  background: var(--bg-2);
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.modal-cast { font-size: 13px; color: var(--text-2); margin-bottom: 18px; max-width: 700px; }
.modal-cast strong { color: var(--text-0); }

.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-2);
  font-size: 16px;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 64px 1fr; }
  :root { --sidebar-w: 64px; }
  .nav-item span.label, .brand span:not(.brand-mark), .nav-section, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .brand { justify-content: center; }
  .hero h1 { font-size: 36px; }
  .hero-content { padding: 24px 28px; max-width: 100%; }
}

/* Video Player */
.vp-root {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-poster-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  filter: blur(14px) brightness(0.55);
  transform: scale(1.05);
  transition: opacity 500ms ease;
  pointer-events: none;
  z-index: 0;
}

.vp-poster-bg.hidden { opacity: 0; }

.vp-video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.vp-top, .vp-bottom {
  position: absolute;
  left: 0;
  right: 0;
  padding: 18px 24px;
  color: #fff;
  transition: opacity 240ms ease, transform 240ms ease;
  z-index: 3;
}

.vp-top {
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
}

.vp-bottom {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
}

.vp-hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }

.vp-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.vp-subtitle { font-size: 13px; color: rgba(255, 255, 255, 0.7); margin-top: 2px; font-weight: 600; }

.vp-icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vp-icon-btn:hover, .vp-icon-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.vp-top .vp-icon-btn { font-size: 20px; background: rgba(0, 0, 0, 0.5); }

.vp-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2;
}

.vp-play-big {
  min-width: 180px;
  height: auto;
  padding: 16px 28px;
  border-radius: 10px;
  background: rgba(229, 9, 20, 0.95);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(229, 9, 20, 0.4);
  transition: var(--transition);
  border: 0;
  cursor: pointer;
}

.vp-server-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
  align-items: center;
}

.vp-server-bar:empty,
.vp-server-bar.hidden {
  display: none;
}

.vp-server-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  white-space: nowrap;
}

.vp-server-chip:hover { background: rgba(255, 255, 255, 0.2); }

.vp-server-chip.active {
  background: #e50914;
  border-color: #ff3d4a;
}

.vp-play-big:hover { transform: scale(1.06); }

.vp-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.vp-error, .vp-modal-prompt {
  background: rgba(15, 16, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 30px 36px;
  text-align: center;
  color: #fff;
  max-width: 480px;
}

.vp-seek-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.vp-seek {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.vp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.vp-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #fff;
}

.vp-time {
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
  text-align: center;
  font-weight: 600;
}

.vp-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.vp-controls-left, .vp-controls-right { display: flex; align-items: center; gap: 8px; }

.vp-volume { display: flex; align-items: center; gap: 6px; }

.vp-vol-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.vp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.vp-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.vp-servers { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Selector de servidores (modal 📡 → lista numerada por idioma) ── */
.vp-servers-panel { width: min(520px, 92%); }

/* Botón superior "Servidores" estilo episodios */
.vp-server-btn-top {
  width: auto;
  padding: 0 14px;
  gap: 8px;
  white-space: nowrap;
}

.vp-server-btn-top .vp-server-top-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.vp-server-dead { opacity: 0.55; }
.vp-server-dead .vp-episode-title { color: #9b9fb3; }

/* Grupos por idioma dentro del panel */
.vp-server-group { padding: 10px 16px 4px; }

.vp-server-group:first-child { padding-top: 14px; }

.vp-server-group-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Fila de servidor numerada (1, 2, 3…) */
.vp-server-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.vp-server-row:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }

.vp-server-row.active {
  background: rgba(229, 9, 20, 0.18);
  border-color: #e50914;
}

.vp-server-row .vp-server-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.vp-server-row.active .vp-server-num {
  background: #e50914;
  color: #fff;
}

.vp-server-row .vp-server-row-mark {
  margin-left: auto;
  color: var(--accent);
  font-size: 13px;
}

/* ── Panel de episodios (capas) — animación suave ── */
.vp-episodes {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-episodes-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 12, 0.62);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  animation: vpFadeIn 240ms ease;
}

@keyframes vpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vp-episodes-panel {
  position: relative;
  width: min(560px, 92%);
  max-height: 74%;
  background: rgba(15, 16, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: vpSlideUp 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes vpSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.vp-episodes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vp-episodes-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}

.vp-episodes-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.vp-episodes-close:hover { background: var(--accent); border-color: var(--accent); }

.vp-episodes-list {
  overflow-y: auto;
  padding: 12px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vp-episodes-list::-webkit-scrollbar { width: 8px; }
.vp-episodes-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.vp-episode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.vp-episode-card:hover { background: rgba(255, 255, 255, 0.09); transform: translateX(4px); }

.vp-episode-card.active {
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.12);
}

.vp-episode-thumbwrap {
  position: relative;
  flex-shrink: 0;
  width: 128px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.vp-episode-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }

.vp-episode-thumb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.vp-episode-current,
.vp-episode-watched {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
}

.vp-episode-current { background: var(--accent); color: #fff; }
.vp-episode-watched { background: rgba(0, 0, 0, 0.65); color: #9b9fb3; }

.vp-episode-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.vp-episode-sub {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.3px;
}

.vp-episode-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.vp-server-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.vp-server-pill:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* Idioma seleccionado: rojo Netflix bien visible */
.vp-server-pill.active {
  background: #e50914;
  color: #fff;
  border-color: #ff3d4a;
  box-shadow: 0 0 0 1px rgba(255, 61, 74, 0.5), 0 4px 16px rgba(229, 9, 20, 0.55);
  font-weight: 800;
}

.vp-server-btn {
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.vp-server-btn.active {
  background: #e50914;
  border-color: #ff3d4a;
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
  font-weight: 800;
}

.vp-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin-top: 4px;
}

.vp-ep-carousel-panel {
  width: 100%;
  max-width: none;
  max-height: 78%;
  border-radius: 18px 18px 0 0;
  align-self: flex-end;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

.vp-ep-seasons {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px 6px;
  scrollbar-width: none;
}

.vp-ep-seasons::-webkit-scrollbar { display: none; }

.vp-ep-seasons:empty { display: none; }

.vp-ep-season-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.vp-ep-season-chip.active {
  background: #e50914;
  border-color: #ff3d4a;
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.vp-ep-carousel-wrap {
  position: relative;
  padding: 4px 8px 20px;
}

.vp-ep-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 42px 14px;
  scrollbar-width: thin;
}

.vp-ep-carousel::-webkit-scrollbar { height: 8px; }
.vp-ep-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.vp-ep-tile {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  cursor: pointer;
  padding: 0;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.vp-ep-tile:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.vp-ep-tile.active {
  border-color: #e50914;
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.45);
}

.vp-ep-tile-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.vp-ep-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vp-ep-tile-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  font-size: 28px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.vp-ep-tile:hover .vp-ep-tile-play,
.vp-ep-tile.active .vp-ep-tile-play { opacity: 1; }

.vp-ep-tile-now {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #e50914;
  color: #fff;
  padding: 3px 8px;
  border-radius: 5px;
}

.vp-ep-tile-body {
  padding: 10px 12px 12px;
}

.vp-ep-tile-code {
  font-size: 11px;
  font-weight: 800;
  color: #e50914;
  letter-spacing: 0.3px;
}

.vp-ep-tile-name {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vp-ep-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 13, 20, 0.85);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.vp-ep-nav:hover { background: #e50914; border-color: #e50914; }
.vp-ep-nav-prev { left: 6px; }
.vp-ep-nav-next { right: 6px; }

.vp-autoplay {
  position: absolute;
  right: 24px;
  bottom: 96px;
  width: min(360px, calc(100% - 48px));
  background: linear-gradient(135deg, rgba(25, 26, 40, 0.96) 0%, rgba(15, 16, 24, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  z-index: 7;
  pointer-events: auto;
  animation: fadeIn 240ms ease;
  overflow: hidden;
}

.vp-autoplay-info { flex: 1; min-width: 0; }

.vp-autoplay-thumb {
  width: 84px;
  height: 118px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #111;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.vp-autoplay-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 700;
  margin-bottom: 6px;
}

.vp-autoplay-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.vp-autoplay-sub { font-size: 12px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }

.vp-autoplay-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  min-width: 130px;
}

.vp-autoplay-thumb-wrap { flex-shrink: 0; }
.vp-autoplay-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #8b5cf6; font-weight: 700; margin-bottom: 6px; }
.vp-autoplay-actions .btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
  width: 100%;
  text-align: center;
}

.vp-countdown-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }

.vp-countdown-ring svg { width: 100%; height: 100%; }

.vp-countdown-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

/* Detail modal - seasons & episodes */
.season-block { margin-top: 16px; }

.season-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-2);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  transition: var(--transition);
  width: 100%;
  text-align: left;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.season-head:hover { background: var(--bg-3); }

.season-toggle { font-size: 13px; color: var(--text-2); }

.episode-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  width: 100%;
  text-align: left;
  color: inherit;
}

.episode-row:hover { background: var(--bg-2); border-color: var(--line); }

.episode-num {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-0);
  flex-shrink: 0;
}

.episode-info { flex: 1; min-width: 0; }

.episode-title { font-size: 14px; font-weight: 700; color: var(--text-0); margin-bottom: 2px; }

.episode-meta { font-size: 12px; color: var(--text-2); }

.episode-play {
  font-size: 18px;
  color: var(--accent-2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.12);
}

/* Fila de episodio estilo Netflix (miniatura + sinopsis) */
.ep-netflix {
  align-items: flex-start;
  padding: 12px 14px;
}

.ep-thumb {
  width: 180px;
  min-width: 180px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  flex-shrink: 0;
}

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

.ep-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  color: var(--text-3);
}

.episode-title { font-size: 14px; font-weight: 700; color: var(--text-0); margin-bottom: 2px; }

.ep-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-right: 8px;
  vertical-align: 1px;
}

.episode-synopsis {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.season-banner {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin: 8px 0 12px 0;
  border: 1px solid var(--line);
}

@media (max-width: 700px) {
  .ep-thumb { width: 120px; min-width: 120px; }
}

/* IPTV filters */
.iptv-filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; padding: 0 4px; }

.iptv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  max-width: 480px;
}

.iptv-search input {
  background: none;
  border: none;
  color: var(--text-0);
  font-size: 15px;
  outline: none;
  width: 100%;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; max-width: 700px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: var(--transition);
  cursor: pointer;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Idioma / fuente seleccionada: blanco oscuro (NO rojo para no competir con Reproducir) */
.chip.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 800;
}

/* Profile Gate (Netflix-style Who's watching) */
.profile-gate {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 1200px 700px at 50% 0%, #1a1224 0%, #0a0a0f 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
}

.profile-gate-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 20% 20%, rgba(229, 9, 20, 0.12), transparent 60%),
    radial-gradient(ellipse 800px 500px at 80% 80%, rgba(91, 61, 245, 0.12), transparent 60%);
  pointer-events: none;
}

.profile-gate-inner {
  position: relative;
  text-align: center;
  padding: 40px;
  max-width: 900px;
  width: 100%;
}

.profile-gate-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 50px;
}

.brand-mark.big {
  width: 56px;
  height: 56px;
  font-size: 28px;
  border-radius: 12px;
}

.profile-gate-brand-name {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(90deg, #e50914 0%, #ff3d4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.profile-gate-title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.profile-gate-sub {
  color: #9b9fb3;
  font-size: 17px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.profile-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px 0 32px 0;
}

.profile-card,
.profile-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  width: 160px;
  text-align: center;
}

.profile-card:hover,
.profile-card-inner:hover {
  transform: translateY(-4px);
}

.profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  border: 3px solid transparent;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.profile-card:hover .profile-avatar,
.profile-card-inner:hover .profile-avatar,
.profile-card.active .profile-avatar {
  border-color: #fff;
  box-shadow: 0 14px 40px rgba(229, 9, 20, 0.5);
}

.profile-avatar-emoji {
  font-size: 60px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.profile-avatar-add {
  background: transparent !important;
  border: 3px dashed rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.6);
  font-size: 64px;
  font-weight: 300;
  box-shadow: none;
}

.profile-card:hover .profile-avatar-add,
.profile-card-inner:hover .profile-avatar-add {
  border-color: #fff;
  color: #fff;
}

.profile-name {
  font-size: 17px;
  font-weight: 600;
  color: #d8dae8;
  transition: var(--transition);
}

.profile-card:hover .profile-name,
.profile-card.active .profile-name,
.profile-card-inner:hover .profile-name {
  color: #fff;
}

.profile-manage-link {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #d8dae8;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px 30px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 24px;
  transition: var(--transition);
}

.profile-manage-link:hover {
  color: #fff;
  border-color: #fff;
}

.profile-manage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-edit-pen {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e50914;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.profile-delete-btn {
  background: none;
  border: none;
  color: #9b9fb3;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  text-decoration: underline;
}

.profile-delete-btn:hover {
  color: #ff3d4a;
}

.btn.big {
  padding: 16px 36px;
  font-size: 17px;
}

/* Editor modal */
.profile-editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 180ms ease;
}

.profile-editor {
  background: #161826;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  color: #fff;
  animation: slideUp 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.profile-editor h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
}

.profile-editor-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  margin: 0 auto 24px auto;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.profile-editor-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #9b9fb3;
  margin-bottom: 8px;
  margin-top: 16px;
}

.profile-editor-label input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  background: #0f1018;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

.profile-editor-label input:focus {
  border-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.profile-avatar-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.profile-avatar-mini {
  aspect-ratio: 1;
  background: #0f1018;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.profile-avatar-mini:hover {
  background: #1e2138;
}

.profile-avatar-mini.active {
  border-color: #e50914;
  background: rgba(229, 9, 20, 0.1);
}

.profile-color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-color-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.profile-color-dot:hover {
  transform: scale(1.1);
}

.profile-color-dot.active {
  border-color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #e50914;
}

.profile-editor-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}

/* Sidebar profile footer */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
  color: #fff;
}

.sidebar-profile:hover {
  background: var(--bg-3);
  border-color: var(--line-2);
}

.sidebar-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-profile-info {
  flex: 1;
  min-width: 0;
}

.sidebar-profile-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
}

.sidebar-profile-switch {
  font-size: 16px;
  color: var(--text-2);
}

/* ============================================================
   Continue Watching row — estilo Netflix (banner horizontal)
   ============================================================ */
.continue-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 16px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  align-items: stretch;
}

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

.continue-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 220px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: inherit;
  padding: 0;
  font-family: inherit;
}

/* Canal en vivo — card estilo ChannelRowCard dentro del row */
.continue-card-channel {
  width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ChannelRowCard dentro del continue-row: forzar ancho fijo */
.continue-row .channel-row-card {
  width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.continue-card:hover {
  border-color: var(--accent-2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.continue-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1a1224, #0f1018);
  overflow: hidden;
  flex-shrink: 0;
}

.continue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Thumb para canales — ancho tipo banner con logo */
.continue-thumb-channel {
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.continue-thumb-channel img {
  object-fit: contain;
  padding: 10px;
  background: #0a0a10;
}

.continue-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: var(--transition);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 3;
}

.continue-card:hover .continue-play-overlay {
  opacity: 1;
}

.continue-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  z-index: 2;
}

.continue-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255, 255, 255, 0.4);
}

.continue-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: var(--transition);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.continue-card:hover .continue-play-overlay {
  opacity: 1;
}

.continue-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.continue-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e50914, #ff3d4a);
  transition: width 240ms ease;
}

.continue-info {
  padding: 12px 14px;
  flex: 1;
}

.continue-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.continue-meta {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.continue-ep {
  background: var(--bg-3);
  color: var(--text-0);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.continue-time {
  color: var(--text-3);
}

/* ============================================================
   History view
   ============================================================ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.history-card:hover {
  background: var(--bg-3);
  border-color: var(--line-2);
}

.history-thumb {
  position: relative;
  width: 140px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  background: var(--bg-1);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.history-thumb:hover img {
  transform: scale(1.05);
}

.history-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: rgba(255, 255, 255, 0.3);
}

.history-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
}

.history-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e50914, #ff3d4a);
}

.history-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(27, 217, 106, 0.95);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.2;
}

.history-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-1);
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.history-badge {
  background: var(--bg-3);
  color: var(--text-0);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-ep {
  background: rgba(229, 9, 20, 0.15);
  color: var(--accent-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}

.history-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}

.history-dot {
  color: var(--text-3);
}

.history-progress-text {
  color: var(--text-1);
  font-weight: 600;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.history-remove-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 14px;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.history-remove-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 700px) {
  .history-card {
    flex-wrap: wrap;
  }
  .history-thumb {
    width: 90px;
  }
  .history-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ── Section headers ── */
.section {
  margin-bottom: var(--gap-section);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

/* ── Catálogo filtros ── */
.catalog-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-2);
  color: var(--text-1);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 32px 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239b9fb3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 150px;
}

.filter-select:hover {
  border-color: var(--accent);
  background-color: var(--bg-3);
  color: var(--text-0);
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}

.filter-select option {
  background: var(--bg-2);
  color: var(--text-1);
}

.filter-clear-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 100, 100, 0.15);
  color: #ff8888;
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-clear-btn:hover {
  background: rgba(255, 100, 100, 0.25);
  color: #ffaaaa;
}

.filter-clear-btn.hidden {
  display: none;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.3px;
}

.accent-dot {
  display: inline-block;
  width: 5px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  flex-shrink: 0;
}

.section-link {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

.section-link-arrow {
  display: inline-block;
  transition: transform 200ms ease;
}

.section-link:hover .section-link-arrow {
  transform: translateX(3px);
}

/* ── Horizontal scroll rows (Netflix-style carousel) ── */
.row-section {
  margin-bottom: 18px;
}

.row-wrapper {
  position: relative;
}

.row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 4px 10px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

/* Each card in the horizontal row (más compacto: 160px en vez de 220px) */
.row > *:not(.card):not(.channel-row-card):not(.row-see-all-card) {
  flex-shrink: 0;
  width: 160px;
}

.row > .row-see-all-card {
  width: 160px;
}

.row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, background 200ms ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.row-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}

.row-arrow:hover {
  background: var(--accent);
}

.row-arrow-left {
  left: 8px;
}

.row-arrow-right {
  right: 8px;
}

.row-arrow-icon {
  line-height: 1;
}

/* "See all" card at the end of the row (estilo Netflix: transparente) */
.row-see-all-card {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  transition: var(--transition);
  padding: 12px;
  text-align: center;
}

.row-see-all-card:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.row-see-all-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-weight: 700;
}

.row-see-all-card:hover .row-see-all-circle {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.row-see-all-text {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.row-see-all-count {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 600;
}


