/* ═══════════════════════════════════════════════════════════════
   La Isla Player — sistema visual
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* superficies */
  --bg:         #07080a;
  --bg-2:       #0a0c0f;
  --surface:    #101318;
  --surface-2:  #161a21;
  --surface-3:  #1d222a;
  --line:       #1e232b;
  --line-2:     #2b313b;

  /* acento */
  --green:      #1fd97a;
  --green-2:    #5ef2a6;
  --green-dim:  rgba(31, 217, 122, 0.12);
  --green-line: rgba(31, 217, 122, 0.32);
  --amber:      #f0b23f;
  --red:        #ff5c6e;

  /* texto */
  --text:       #f3f5f8;
  --sub:        #9ba5b3;
  --muted:      #616b79;

  /* forma */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   22px;

  /* métrica */
  --nav-h:     66px;
  --maxw:      1280px;
  --gutter:    28px;
  --gap:       20px;
  --section-y: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: 'Outfit', sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--green); color: #04150c; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #39414d; }

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grow { flex: 1; }

/* ─────────────────────────────── NAV ─────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: rgba(7, 8, 10, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--green), #0da35c);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(31, 217, 122, 0.3);
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-mark.sm { width: 24px; height: 24px; border-radius: 7px; }
.brand-mark.sm svg { width: 13px; height: 13px; }

.brand-name { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }

/* Los enlaces ocupan toda la altura de la barra: así la línea verde cae
   exactamente sobre el borde inferior, sin depender de cuentas de píxeles */
.nav-links { display: flex; gap: 4px; flex: 1; align-self: stretch; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sub);
  transition: color 0.18s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 600; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px;
  bottom: -1px;                 /* encima del borde de 1px de la barra */
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.22s ease;
}
.nav-link:hover::after { transform: scaleX(0.35); opacity: 0.6; }
.nav-link.active::after { transform: scaleX(1); opacity: 1; }

/* ── cabecera de página (listado de temporadas) ── */
.page-head { padding-top: 6px; padding-bottom: 28px; }
.page-head .eyebrow { margin-bottom: 8px; }
.page-head h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 10px; }
.page-sub { font-size: 15px; color: var(--sub); }

.search { position: relative; flex-shrink: 0; }
.search > svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 250px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 62px 9px 36px;
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s, width 0.2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none;
  width: 290px;
  border-color: var(--line-2);
  background: var(--surface-2);
}
.kbd {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  pointer-events: none;
}

/* ───────────────────────────── BOTONES ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  background: var(--green);
  color: #04150c;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
  box-shadow: 0 6px 20px rgba(31, 217, 122, 0.22);
}
.btn:hover { background: var(--green-2); box-shadow: 0 8px 26px rgba(31, 217, 122, 0.3); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }

.btn.ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--surface-3); border-color: #3a424e; box-shadow: none; }

.btn.xs { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }

.link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  transition: color 0.15s;
}
.link:hover { color: var(--green-2); }

/* ───────────────────────── PÓSTER (imagen real) ───────────────────────── */
/* Base común: garantiza que TODA portada tenga el mismo encuadre y tamaño */
.poster {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
  isolation: isolate;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.4s ease;
}
.poster img.ready { opacity: 1; }

/* Relleno elegante cuando no hay fotograma disponible (mismo tono, sin arcoíris) */
.poster .fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 50% 0%, #1b2129 0%, #10141a 55%, #0a0d11 100%);
}
.poster .fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 55% at 50% 115%, rgba(31, 217, 122, 0.16), transparent 70%);
}
.poster .fallback svg {
  width: 38%;
  max-width: 82px;
  opacity: 0.16;
  color: #fff;
}
.poster .fallback .fb-num {
  position: absolute;
  right: 12px; bottom: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.07);
}

/* velo inferior uniforme: unifica fotos claras y oscuras */
.poster::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(4, 6, 8, 0.72) 0%, rgba(4, 6, 8, 0.12) 46%, transparent 72%);
  pointer-events: none;
}

.poster.ratio-wide { aspect-ratio: 16 / 9; }
.poster.ratio-tall { aspect-ratio: 5 / 7; }
/* leve sesgo hacia arriba: favorece las caras sin llegar a cortarlas */
.poster.ratio-tall img { object-position: 50% 42%; }
/* el número grande ya lo pinta la capa de texto de la tarjeta */
.poster.ratio-tall .fb-num { display: none; }

/* ───────────────────────────── HERO ───────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.22;
  filter: saturate(115%);
  transform: scale(1.06);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--bg) 8%, rgba(7, 8, 10, 0.72) 48%, rgba(7, 8, 10, 0.35) 100%),
    linear-gradient(to top, var(--bg) 2%, transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 640px);
  align-items: center;
  gap: 44px;
  padding-top: 60px;
  padding-bottom: 76px;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 16px;
  color: var(--sub);
  max-width: 460px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.2s;
}
.hero-card:hover { transform: translateY(-5px); border-color: var(--green-line); }
.hero-card:hover .poster img { transform: scale(1.04); }
.hero-card .poster { aspect-ratio: 16 / 9; }

.hero-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--green);
  display: grid;
  place-items: center;
  color: #04150c;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, background 0.15s;
}
.hero-card:hover .hero-card-play { transform: translate(-50%, -50%) scale(1.08); background: var(--green-2); }
.hero-card-play svg { width: 27px; height: 27px; margin-left: 4px; }

.hero-card-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 22px 24px;
  text-align: left;
}
.hero-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(6, 8, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--green-line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.tag.grey { color: var(--sub); border-color: var(--line-2); }

/* ───────────────────────────── SECCIONES ───────────────────────────── */
.section { padding-bottom: var(--section-y); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head h2 { font-size: 22px; }
.section-head .count { font-size: 13.5px; color: var(--muted); }

/* ──────────────────────── REJILLA DE TEMPORADAS ──────────────────────── */
.seasons-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap);
}

.season-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  text-align: left;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.2s, box-shadow 0.22s;
}
.season-card:hover {
  transform: translateY(-5px);
  border-color: var(--green-line);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.5);
}
.season-card:hover .poster img { transform: scale(1.05); }

.season-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
}
.season-num {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 6px;
}
.season-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.season-eps { font-size: 12.5px; color: var(--sub); }

/* ───────────────────────── REJILLA DE EPISODIOS ───────────────────────── */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.ep-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: left;
  width: 100%;
}
.ep-card.locked { cursor: default; }

.ep-frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.2s, box-shadow 0.22s;
}
.ep-card:not(.locked):hover .ep-frame {
  transform: translateY(-5px);
  border-color: var(--green-line);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.48);
}
.ep-card:not(.locked):hover .poster img { transform: scale(1.05); }
.ep-card.locked .ep-frame { opacity: 0.5; }

.ep-badge-tl {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 3;
}

.ep-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 9, 0.42);
  opacity: 0;
  transition: opacity 0.18s;
}
.ep-card:not(.locked):hover .ep-hover { opacity: 1; }
.ep-hover span {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #04150c;
  display: grid;
  place-items: center;
}
.ep-hover svg { width: 18px; height: 18px; margin-left: 3px; }

.ep-dur {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 3;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(4, 6, 8, 0.78);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e8ecf1;
}

/* cuerpo de altura fija → todas las tarjetas terminan a la misma altura */
.ep-body { display: flex; flex-direction: column; gap: 5px; }
.ep-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  min-height: calc(1.4em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-card.locked .ep-title { color: var(--muted); }
.ep-meta { font-size: 12.5px; color: var(--muted); }

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 64px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  text-align: center;
  color: var(--muted);
}
.empty-state h3 { font-size: 16px; color: var(--sub); }
.empty-state p { font-size: 13.5px; max-width: 420px; }

/* ───────────────────────────── MIGAS ───────────────────────────── */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 22px;
  padding-bottom: 16px;
  font-size: 13.5px;
}
.crumbs button { color: var(--muted); transition: color 0.15s; }
.crumbs button:hover { color: var(--text); }
.crumbs .sep { color: var(--muted); opacity: 0.4; }
.crumbs .current {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}

/* ─────────────────────── CABECERA DE TEMPORADA ─────────────────────── */
/* ─────────────────── CABECERA DE TEMPORADA ─────────────────── */
.season-hero {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding-top: 8px;
  padding-bottom: 34px;
}

.season-cover {
  display: block;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}
.season-cover .poster { border-radius: inherit; }
/* aquí sí interesa el número de fondo: llena la portada cuando no hay foto */
.season-cover .poster.ratio-tall .fb-num {
  display: block;
  right: 14px; bottom: 6px;
  font-size: 84px;
  color: rgba(255, 255, 255, 0.09);
}

.season-info { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.season-info .eyebrow { margin-bottom: 8px; }
.season-info h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}

.season-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.stat-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  font-weight: 600;
}
.stat-soft { font-size: 13px; color: var(--sub); }

.season-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sub);
  max-width: 640px;
  margin-bottom: 22px;
}

/* ── barra de pestañas y salto de temporada ── */
.season-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.tabs { display: flex; gap: 4px; }
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}
.tab:hover { color: var(--sub); }
.tab.active { color: var(--text); font-weight: 600; }
.tab.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}
.tab .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab.active .n { color: var(--green); }

.season-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.season-switch span {
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 6px;
  min-width: 108px;
  text-align: center;
  white-space: nowrap;
}
.season-switch button {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--sub);
  transition: background 0.15s, color 0.15s;
}
.season-switch button:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.season-switch button:disabled { opacity: 0.3; cursor: default; }
.season-switch svg { width: 15px; height: 15px; }

/* ───────────────────────────── PLAYER ───────────────────────────── */
#view-player { position: relative; padding-bottom: var(--section-y); }

.stage { position: relative; z-index: 1; }

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}
.player-main { display: flex; flex-direction: column; gap: 22px; }

.video-shell {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-2);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.62);
}
video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  object-fit: contain;
  background: #000;
}

.video-fallback {
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  background: radial-gradient(60% 50% at 50% 45%, rgba(31, 217, 122, 0.07), transparent 70%), #000;
  padding: 24px;
  text-align: center;
}
.video-fallback .ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.video-fallback p { font-size: 14px; max-width: 460px; }

/* En pantalla completa el marco desaparece y el vídeo ocupa todo:
   sin max-height ni proporción fija, que dejaban una franja negra debajo */
.video-shell:fullscreen {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.video-shell:fullscreen video,
.video-shell:fullscreen .video-fallback {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

/* Reproductor externo embebido: mismo encuadre que el vídeo propio */
#embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  border: 0;
  background: #000;
}
.video-shell:fullscreen #embed { height: 100%; max-height: none; aspect-ratio: auto; }
.dm-wrap, .dm-wrap iframe, .dm-wrap > div {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  border: 0;
  background: #000;
}
.video-shell:fullscreen .dm-wrap,
.video-shell:fullscreen .dm-wrap iframe,
.video-shell:fullscreen .dm-wrap > div { height: 100%; max-height: none; aspect-ratio: auto; }

/* capas visibles solo con vídeo cargado */
.video-shell:not(.playing) .click-layer,
.video-shell:not(.playing) .center-play,
.video-shell:not(.playing) .controls-bar { display: none; }

.click-layer { position: absolute; inset: 0; z-index: 2; cursor: pointer; }

/* Aviso de carga: el reproductor aparece antes que el primer fotograma,
   y sin esto ese hueco parece que se haya colgado */
.buffering {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  background: radial-gradient(40% 40% at 50% 50%, rgba(0, 0, 0, 0.45), transparent 70%);
  animation: fade 0.25s ease;
}
.buffering .ring {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--green);
  animation: spin 0.85s linear infinite;
}
.buffering-text {
  font-size: 13px;
  font-weight: 500;
  color: #dfe5ec;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
/* mientras carga no tiene sentido el botón central de reproducir */
.video-shell.buffering-on .center-play { opacity: 0; pointer-events: none; }

.center-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: rgba(8, 10, 13, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: background 0.16s, color 0.16s, transform 0.18s, opacity 0.2s;
}
.center-play:hover { background: var(--green); color: #04150c; transform: translate(-50%, -50%) scale(1.07); }
.center-play svg { width: 25px; height: 25px; margin-left: 3px; }
.video-shell.is-playing .center-play { opacity: 0; pointer-events: none; }

.ep-badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 4;
  padding: 6px 11px;
  border-radius: var(--r-sm);
  background: rgba(6, 8, 10, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
}

/* ───────────────────── BARRA DE CONTROLES ───────────────────── */
.controls-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 34px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.42) 55%, transparent 100%);
  transition: opacity 0.22s;
}
.controls-bar.hide { opacity: 0; pointer-events: none; }

.seek {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  cursor: pointer;
  margin-bottom: 8px;
  transition: height 0.15s;
}
.controls-bar:hover .seek { height: 7px; }
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  box-shadow: 0 0 0 4px rgba(31, 217, 122, 0.22);
  cursor: pointer;
}
.seek::-moz-range-thumb {
  width: 13px; height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
}

.controls-row { display: flex; align-items: center; gap: 4px; }

.ctrl-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 9px;
  color: #e9edf2;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.ctrl-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.ctrl-btn svg { width: 19px; height: 19px; }

.time {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: #c6ced8;
  padding: 0 8px;
  white-space: nowrap;
}

.volume-group { display: flex; align-items: center; gap: 2px; }
/* el icono enseña tantas ondas como volumen haya: bajo 1, medio 2, alto 3 */
#icon-vol .onda { transition: opacity 0.15s; }
#icon-vol.vol-1 .onda-2, #icon-vol.vol-1 .onda-3,
#icon-vol.vol-2 .onda-3 { opacity: 0; }
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 4px;
  border-radius: 3px;
  /* la parte llena la pinta el JS según el volumen (--vol) */
  background: linear-gradient(to right, #fff 0%, #fff var(--vol, 100%),
    rgba(255, 255, 255, 0.28) var(--vol, 100%), rgba(255, 255, 255, 0.28) 100%);
  outline: none;
  cursor: pointer;
  opacity: 0;
  transition: width 0.22s ease, opacity 0.22s ease, margin 0.22s ease;
}
.volume-group:hover .volume-slider,
.volume-slider:focus { width: 78px; opacity: 1; margin-right: 6px; }
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.volume-slider::-moz-range-thumb {
  width: 11px; height: 11px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.quality-group { position: relative; }
.quality-btn {
  width: auto;
  min-width: 46px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
}
.quality-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  z-index: 8;
  min-width: 126px;
  padding: 6px;
  border-radius: var(--r-md);
  background: rgba(14, 17, 21, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}
.quality-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  text-align: left;
  transition: background 0.14s;
}
.quality-option:hover { background: var(--surface-2); }
.quality-option.selected { color: var(--green); font-weight: 600; }
.quality-option .check { width: 14px; height: 14px; flex-shrink: 0; }

/* ──────────────────── SIGUIENTE EPISODIO ──────────────────── */
.next-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent 58%);
  animation: fade 0.25s ease;
}
@keyframes fade { from { opacity: 0 } }

.next-card {
  display: flex;
  gap: 13px;
  width: min(400px, 100%);
  padding: 13px;
  border-radius: var(--r-lg);
  background: rgba(13, 16, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.6);
}
.next-thumb {
  width: 104px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.next-info { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.next-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.next-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.next-actions { display: flex; gap: 8px; margin-top: 2px; }

/* ──────────────────── INFO DEL EPISODIO ──────────────────── */
.now-playing {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.np-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.np-title { font-size: clamp(22px, 2.4vw, 28px); }
.np-synopsis { font-size: 14.5px; line-height: 1.7; color: var(--sub); max-width: 680px; }
.np-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* episodios subidos en varios vídeos */
.np-parts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 4px 0 6px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(31, 217, 122, 0.08), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.parts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.parts-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.parts-title strong { display: block; font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; }
.parts-title small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--sub); }
.parts-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--green-dim);
  border: 1px solid var(--green-line);
  color: var(--green);
}
.parts-icon svg { width: 19px; height: 19px; }
.parts-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 9px 12px 9px 16px;
  border-radius: 999px;
  background: var(--green);
  color: #04150c;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 20px -8px rgba(31, 217, 122, 0.7);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.parts-next:hover { background: var(--green-2); transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(31, 217, 122, 0.8); }
.parts-next svg { width: 16px; height: 16px; }

/* barra: cada tramo mide lo que dura su parte */
.parts-track { display: flex; gap: 4px; height: 6px; }
.parts-seg { flex-basis: 0; border-radius: 99px; background: var(--line-2); transition: background 0.2s; }
.parts-seg.done { background: rgba(31, 217, 122, 0.45); }
.parts-seg.active { background: var(--green); box-shadow: 0 0 12px rgba(31, 217, 122, 0.55); }
.parts-seg.missing { background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 10px); }

.parts-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.part-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  text-align: left;
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
}
button.part-card:hover { border-color: var(--green-line); transform: translateY(-2px); background: var(--surface-2); }
.part-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-3);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--sub);
  transition: background 0.18s, color 0.18s;
}
.part-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.part-name { font-size: 14px; font-weight: 700; color: var(--text); }
.part-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.part-state { display: grid; place-items: center; flex-shrink: 0; width: 22px; color: var(--muted); }
.part-state svg { width: 16px; height: 16px; transition: color 0.18s; }
button.part-card:hover .part-state svg { color: var(--green); }
button.part-card:hover .part-num { color: var(--text); }

.part-card.done .part-num { background: var(--green-dim); color: var(--green); }

.part-card.active {
  border-color: var(--green-line);
  background: linear-gradient(135deg, rgba(31, 217, 122, 0.16), rgba(31, 217, 122, 0.04));
  box-shadow: inset 0 0 0 1px rgba(31, 217, 122, 0.18), 0 8px 24px -14px rgba(31, 217, 122, 0.6);
}
.part-card.active .part-num { background: var(--green); color: #04150c; }
.part-card.active .part-meta { color: var(--green-2); }

.part-card.missing { opacity: 0.55; border-style: dashed; background: transparent; }
.part-card.missing .part-num { background: transparent; border: 1px dashed var(--line-2); }

/* ecualizador de «reproduciendo» */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--green); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; transform: scaleY(0.7); } }

@media (max-width: 640px) {
  .parts-grid { grid-template-columns: 1fr; }
  .parts-head { flex-wrap: wrap; }
}

.chip {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sub);
}
.chip.accent {
  background: var(--green-dim);
  border-color: var(--green-line);
  color: var(--green-2);
  font-weight: 600;
}

/* ──────────────────── ANTERIOR / SIGUIENTE ──────────────────── */
/* minmax(0, 1fr): con 1fr a secas, un título largo ensancha su columna y los
   dos botones dejan de medir lo mismo */
.prevnext { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pn-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 66px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.pn-btn:hover:not(:disabled) { border-color: var(--line-2); background: var(--surface-2); }
.pn-btn:disabled { opacity: 0.38; cursor: default; }
.pn-btn.next { justify-content: flex-end; text-align: right; }
.pn-btn svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.pn-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pn-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.pn-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ──────────────────── LISTA LATERAL ──────────────────── */
/* La altura la fija el JS para que coincida con la del vídeo: la lista empieza
   y termina a la par que el reproductor, y lo que sobra se desplaza dentro */
.player-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 16px 16px 12px;
}
.side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 13px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.side-head h2 { font-size: 14.5px; }
.side-count { font-size: 12px; color: var(--muted); flex-shrink: 0; }

.side-list {
  position: relative;          /* offsetTop de cada episodio relativo a la lista */
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -8px 0 -6px;
  padding: 0 6px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.side-list::-webkit-scrollbar { width: 6px; }
.side-list::-webkit-scrollbar-track { background: transparent; }
.side-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 0; }
.side-list::-webkit-scrollbar-thumb:hover { background: #3d4552; }
.side-item { flex-shrink: 0; }

.side-item {
  display: flex;
  gap: 11px;
  padding: 7px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.side-item:hover:not(.locked) { background: var(--surface-2); }
.side-item.active { background: var(--green-dim); border-color: var(--green-line); }
.side-item.locked { opacity: 0.42; cursor: default; }

.side-thumb {
  width: 104px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.side-thumb .poster { border-radius: inherit; height: 100%; }
.side-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.side-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-item.active .side-title { color: var(--green-2); }
.side-sub { font-size: 11px; color: var(--muted); }
.side-item.active .side-sub { color: var(--green); font-weight: 600; }

/* ───────────────────────────── TOAST ───────────────────────────── */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 22px);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 20px;
  max-width: min(560px, calc(100vw - 48px));
  border-radius: var(--r-md);
  background: rgba(18, 21, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.toast.ok .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(31, 217, 122, 0.18); }
.toast.error .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 92, 110, 0.18); }
.toast.loading .dot { background: var(--amber); animation: blink 1s infinite; }
.toast.error { color: #ffb2bb; }


/* ───────────────────────── PERSONAJES ───────────────────────── */
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 26px; }
.filtro-fila { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip-filtro:hover { border-color: var(--green-line); color: var(--text); }
.chip-filtro.active { background: var(--green); border-color: var(--green); color: #04150c; }
.chip-filtro .n { font-size: 11px; opacity: 0.7; font-variant-numeric: tabular-nums; }

.buscador-personas { position: relative; flex: 1; min-width: 230px; }
.buscador-personas svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.buscador-personas input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.buscador-personas input::placeholder { color: var(--muted); }
.buscador-personas input:focus { outline: none; border-color: var(--green-line); background: var(--surface-2); }

.personas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 18px;
  padding-bottom: 72px;
}
.persona-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  min-width: 0;
}
.persona-foto {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #1b2129, #0d1116);
  border: 1px solid var(--line);
  margin-bottom: 11px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.persona-card:hover .persona-foto {
  border-color: var(--green-line);
  transform: translateY(-4px);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.9);
}
.persona-foto img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.35s ease;
}
.persona-foto img.ready { opacity: 1; }
.persona-card:hover .persona-foto img { transform: scale(1.04); }
.persona-iniciales {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #2f3742;
}
.persona-iniciales.grande { font-size: 64px; }
.persona-temporada {
  position: absolute; top: 9px; left: 9px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(7, 8, 10, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
}
.persona-nombre { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.25; }
.persona-sub { font-size: 12.5px; color: var(--muted); }
.persona-rol {
  align-self: flex-start;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: var(--sub);
}
.persona-rol.pareja { background: var(--green-dim); border-color: var(--green-line); color: var(--green-2); }

/* ficha ampliada */
.persona-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 9, 0.78);
  backdrop-filter: blur(6px);
  animation: fade 0.18s ease;
}
.persona-card-grande {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.persona-grande-cuerpo { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 26px; padding: 26px; }
.persona-grande-foto {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #1b2129, #0d1116);
  border: 1px solid var(--line);
}
.persona-grande-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s; }
.persona-grande-foto img.ready { opacity: 1; }
.persona-grande-datos { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.persona-grande-datos h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.03em; }
.persona-datos { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.persona-dato { display: flex; flex-direction: column; gap: 2px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.persona-dato span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.persona-dato strong { font-size: 14.5px; font-weight: 600; color: var(--text); }
.persona-cerrar {
  position: absolute; top: 14px; right: 14px;
  z-index: 2;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(7, 8, 10, 0.7);
  border: 1px solid var(--line-2);
  color: var(--sub);
}
.persona-cerrar:hover { color: var(--text); border-color: var(--green-line); }
.persona-cerrar svg { width: 15px; height: 15px; }

@media (max-width: 640px) {
  .personas-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .persona-grande-cuerpo { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
}

/* ─────────────────────── SOBRE EL PROGRAMA ─────────────────────── */
.about {
  position: relative;
  padding: 72px 0 80px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(31, 217, 122, 0.07), transparent 70%),
    var(--bg-2);
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  margin-bottom: 44px;
}
.about-text .eyebrow { margin-bottom: 10px; }
.about-text h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.about-text p { font-size: 15.5px; line-height: 1.7; color: var(--sub); margin-bottom: 12px; max-width: 620px; }
.about-text em { color: var(--text); font-style: normal; font-weight: 600; }

.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 20px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.fact-n {
  font-family: 'Outfit', sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green);
}
.fact-l { font-size: 13px; color: var(--sub); }

/* ── el formato en cuatro tarjetas ── */
.formato {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: 72px;
}
.formato-card {
  padding: 24px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s;
}
.formato-card:hover { border-color: var(--green-line); transform: translateY(-3px); }
.formato-ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--green-dim);
  color: var(--green);
  margin-bottom: 16px;
}
.formato-ico svg { width: 21px; height: 21px; }
.formato-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.formato-card p { font-size: 13.5px; line-height: 1.6; color: var(--sub); }

/* ── preguntas frecuentes ── */
.faq { max-width: 860px; margin: 0 auto; }
.faq-head { text-align: center; margin-bottom: 26px; }
.faq-head .eyebrow { margin-bottom: 8px; }
.faq-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.03em; }

.faq-item {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.faq-item[open] { border-color: var(--green-line); background: var(--surface-2); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s, border-color 0.2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-3px); border-color: var(--green); }
.faq-item summary:hover { color: var(--green-2); }
.faq-item > p, .faq-item > .atajos {
  padding: 0 22px 20px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--sub);
}
.atajos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.atajos span { display: flex; align-items: center; gap: 6px; }
.atajos kbd {
  display: inline-block;
  min-width: 26px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* ─────────────────────────────── PIE ─────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 13.5px;
  color: var(--sub);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 56px 0 44px;
}
.footer-brand .brand { margin-bottom: 14px; display: inline-flex; }
.footer-brand p { font-size: 13.5px; line-height: 1.7; color: var(--muted); max-width: 320px; }
.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--sub); transition: color 0.15s; }
.footer-col a:hover { color: var(--green); }
.footer-col span { color: var(--muted); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* ─────────────────────────── RESPONSIVE ─────────────────────────── */
@media (max-width: 1180px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(440px, 520px); gap: 36px; }
  .seasons-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .player-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1040px) {
  .season-hero { grid-template-columns: 158px minmax(0, 1fr); gap: 24px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 46px; padding-bottom: 52px; }
  .hero-card { max-width: 760px; }
  .nav-links { display: none; }
  .ep-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .player-grid { grid-template-columns: minmax(0, 1fr); }
  .player-side { position: static; max-height: none; }
  .side-list { max-height: 420px; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; --gap: 14px; --section-y: 46px; }
  .search input { width: 172px; padding-right: 14px; }
  .search input:focus { width: 200px; }
  .kbd { display: none; }
  .banner .sub { display: none; }
  .seasons-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-num { font-size: 30px; }
  .season-hero { grid-template-columns: 116px minmax(0, 1fr); gap: 18px; }
  .season-bar { gap: 12px; }
  .season-switch { order: -1; }
  .prevnext { grid-template-columns: 1fr; }
  .controls-row { gap: 2px; }
  .time { padding: 0 4px; font-size: 11.5px; }
  .volume-group:hover .volume-slider { width: 56px; }
  .about-intro { grid-template-columns: 1fr; gap: 30px; }
  .formato { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .atajos { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .seasons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-grid { grid-template-columns: 1fr; }
}
