/* ===================== Ficha (película / serie) ===================== */
.ficha {
  /* clip solo en horizontal: los desplegables (diario, descargas) pueden salir por abajo sobre la sección siguiente */
  position: relative; z-index: 2; isolation: isolate; overflow-x: clip;
  background: var(--bg-hero);
  padding-top: var(--genres-h);
}
/* El fondo llega por detrás del título y el texto; el degradado lo oscurece ahí para que se lea */
/* max-height: sin él, el aspect-ratio lo hace más alto que la ficha y se monta sobre el reproductor */
.ficha__media { position: absolute; z-index: 0; right: 0; top: 0; width: 82%; aspect-ratio: 920 / 580; max-height: 100%; }
.ficha__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgb(10 10 14 / .75), rgb(10 10 14 / .45) 40%, transparent 70%);
}
.ficha__inner, .ficha__barra { position: relative; z-index: 1; pointer-events: none; }
.ficha__inner > *, .ficha__barra > * { pointer-events: auto; }
.ficha__media {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%), linear-gradient(to bottom, #000 62%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to right, transparent, #000 30%), linear-gradient(to bottom, #000 62%, transparent);
}
.ficha__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.ficha__inner {
  width: min(100% - 2 * var(--pad), 1270px); margin-inline: auto;
  min-height: 560px; padding-block: 38px 64px;
  display: grid; grid-template-columns: 216px minmax(0, 400px) 1fr; column-gap: 48px; align-items: start;
}
.ficha__aside { display: grid; justify-items: center; gap: 12px; }
.ficha__kicker {
  grid-column: 1 / -1; justify-self: start; max-width: 100%; margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-lg); line-height: 1.2;
}
.ficha__kicker strong { min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha__kicker span {
  flex: none; padding: 4px 10px; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase;
}
.ficha__poster {
  width: 216px; aspect-ratio: 205 / 275; object-fit: cover;
  border: 3px solid var(--primary); border-radius: 16px; box-shadow: 0 18px 40px -16px rgb(109 87 232 / .5);
}
.ficha__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn-mini {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); font-size: .8rem; line-height: 1;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) var(--ease-out);
}
.btn-mini .ico { width: 15px; height: 15px; }
.btn-mini:active { transform: scale(.95); }
.btn-mini[aria-pressed="true"] { background: var(--primary); }
/* El corazón "late" una vez al marcarlo: resorte, porque responde a una acción */
.btn-mini--like[aria-pressed="true"] .ico { animation: pop 420ms var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.share { display: flex; gap: 12px; margin-top: 4px; }
.share a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui); }
.share a:active { transform: scale(.9); }
.share a:hover { background: var(--primary); }
.share .ico { width: 18px; height: 18px; }

.ficha__info { padding-top: 34px; display: grid; gap: 10px; justify-items: start; }
.ficha__title { font-size: clamp(2rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 600; line-height: 1.05; }
.ficha__sub { display: block; font-size: 1.5rem; font-weight: 300; margin-top: 2px; }
.ficha__meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: #CFCFD6; margin-top: 14px; }
.tag { border: 1px solid #8C8C96; border-radius: 3px; padding: 0 4px; font-size: .72rem; }
.tag--strong { border-color: #CFCFD6; padding: 1px 6px; }
.tag--strong::first-line { font-weight: 600; }
.ficha__desc { font-size: .82rem; line-height: 1.3; color: #B8B8C2; max-width: 50ch; }
.ficha__credits { font-size: .78rem; color: #B8B8C2; display: grid; gap: 1px; }
.ficha__credits div { display: flex; gap: 6px; }
.ficha__credits dd { color: #fff; margin: 0; }
.rating { margin-top: 6px; }
.rating__label { font-size: .78rem; color: #B8B8C2; }
.stars { display: flex; gap: 2px; margin-top: 4px; margin-left: -4px; }
.star { display: grid; place-items: center; width: 30px; height: 30px; color: var(--primary); transition: transform var(--t-press) var(--ease-out); }
.star .ico { width: 24px; height: 24px; transition: fill 150ms; }
.star:active { transform: scale(.85); }
.star.is-lit .ico { fill: currentColor; animation: pop 380ms var(--spring); }

.ficha__actions { display: grid; justify-items: end; align-content: start; height: 100%; }
.ficha__dl { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.btn--xs { padding: .55em .8em .55em 1em; font-size: .8rem; border-radius: var(--r-sm); gap: .3em; }
.btn--xs .ico { width: 16px; height: 16px; }
.ficha__dl .popover { top: calc(100% + 8px); }

/* ===== Botón play con halo ===== */
.play-btn {
  position: relative; display: grid; place-items: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--primary); color: #fff;
  box-shadow: 0 0 0 12px rgb(109 87 232 / .32);
  transition: transform 260ms var(--spring), box-shadow var(--t-ui) var(--ease-out);
}
.play-btn .ico { width: 44px; height: 44px; margin-left: 6px; }
.play-btn::before {
  content: ""; position: absolute; inset: -12px; border-radius: 50%;
  border: 2px solid rgb(109 87 232 / .5); animation: halo 2.6s var(--ease-out) infinite;
}
@keyframes halo { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
.play-btn:active { transform: scale(.92); transition-duration: var(--t-press); }
@media (hover: hover) and (pointer: fine) { .play-btn:hover { box-shadow: 0 0 0 16px rgb(109 87 232 / .38); } }
.play-btn--xl { width: 92px; height: 92px; }

/* ===================== Reproductor ===================== */
.player {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 1898 / 694; min-height: 360px; background: #111;
}
.player__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: filter 600ms var(--ease-out), transform 900ms var(--ease-out); }
/* Barra «Ver online» (Ajustes del sitio → player_bar): rellena el hueco entre la ficha y el reproductor */
.player-bar { background: var(--bg-hero); border-top: 1px solid rgb(255 255 255 / .06); }
.player-bar__in { width: min(1200px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 14px 0; }
.player-bar__title { display: flex; align-items: center; gap: 8px; margin: 0 auto 0 0; font-size: .95rem; color: rgb(255 255 255 / .7); }
.player-bar__title strong { color: #fff; }
.player-bar__title .ico { flex: none; width: 16px; height: 16px; color: var(--primary); }
.player-bar__langs { display: flex; flex-wrap: wrap; gap: 8px; }
.player-bar__lang {
  display: inline-flex; align-items: center; gap: 6px; padding: .4em .9em; border-radius: var(--r-pill); font-size: .8rem;
  border: 1px solid rgb(255 255 255 / .18); transition: background-color var(--t-ui), border-color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.player-bar__lang:hover { background: var(--primary); border-color: var(--primary); }
.player-bar__lang:active { transform: scale(.95); }
.player-bar__lang .flag { width: 16px; height: 16px; }
.player-bar__meta { margin: 0; font-size: .78rem; color: rgb(255 255 255 / .55); }
/* Fundido: la imagen sale del color de la barra en vez de cortar en seco; se quita al reproducir */
.player--fundido::after { content: ""; position: absolute; inset: 0 0 auto; height: 35%; z-index: -1; pointer-events: none; background: linear-gradient(var(--bg-hero), transparent); transition: opacity 300ms var(--ease-out); }
.player--fundido.has-source::after, .player--fundido.is-playing::after { opacity: 0; }
@media (max-width: 640px) { .player-bar__title { flex-basis: 100%; } .player-bar__meta { margin-left: auto; } }
/* Estilo cine (Ajustes del sitio → player_style): imagen en penumbra, viñeta, brillo tras el play, grano y zoom lento.
   La imagen baja a z -2 para que la capa ::before (z -1) quede encima de ella y debajo de los controles */
.player--cine .player__bg { z-index: -2; filter: brightness(.6) saturate(1.2) contrast(1.05); animation: player-cine 40s ease-in-out infinite alternate; }
.player--cine::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transition: opacity 400ms var(--ease-out);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 53%, rgb(109 87 232 / .35), transparent 28%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgb(0 0 0 / .8) 100%),
    linear-gradient(transparent 70%, rgb(0 0 0 / .55));
}
/* Al reproducir manda el vídeo: la imagen recupera su luz y se quitan las capas */
.player--cine.is-playing .player__bg, .player--cine.has-source .player__bg { animation: none; filter: brightness(1.7) saturate(1.1); }
.player--cine.is-playing::before, .player--cine.has-source::before { opacity: 0; }
@keyframes player-cine { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
@media (prefers-reduced-motion: reduce) { .player--cine .player__bg { animation: none; } }
.player.is-playing .player__bg { filter: brightness(1.7) saturate(1.1); transform: scale(1.02); }
.player__play { position: absolute; left: 50%; top: 53%; translate: -50% -50%; }
.player.is-playing .player__play { transform: scale(.6); opacity: 0; pointer-events: none; transition: transform 300ms var(--ease-out), opacity 200ms; }

.player-modal {
  position: absolute; top: 50%; left: 50%; right: auto; translate: -50% -50%;
  width: 300px; padding: 20px 24px 14px; border-radius: 28px; background: #000; border: 0;
  transform-origin: center;
}
.player-modal__title { font-size: .85rem; text-align: center; padding-bottom: 12px; border-bottom: 1px solid #555; }
.server-list a {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 12px 0; font-size: .8rem; border-bottom: 1px solid #555;
  transition: background-color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.server-list li:last-child a { border-bottom: 0; }
.server-list a:hover { background: #151515; }
.server-list a:active { transform: scale(.97); }
.server-ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #D9272E; font-size: .7rem; font-weight: 800; }

.player__controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px;
  padding: 18px var(--pad); background: linear-gradient(to top, rgb(0 0 0 / .8), transparent);
  font-size: .8rem; opacity: 0; translate: 0 10px; transition: opacity 300ms var(--ease-out), translate 300ms var(--ease-out);
}
.player.is-playing .player__controls { opacity: 1; translate: 0; }
.player__pause { display: grid; place-items: center; width: 36px; height: 36px; }
.player__pause .ico { width: 22px; height: 22px; }
.player__track { flex: 1; height: 4px; border-radius: 2px; background: rgb(255 255 255 / .25); overflow: hidden; }
.player__fill { display: block; height: 100%; width: 100%; background: var(--primary); transform-origin: left; transform: scaleX(0); }

/* ===================== Comentarios ===================== */
.comments { width: min(100% - 2 * var(--pad), 1200px); margin: 40px auto 0; }
.comments__title { font-size: 1.6rem; font-weight: 500; margin-bottom: 14px; }
.composer { position: relative; pointer-events: none; } /* el primer comentario sube bajo los botones (margin -44px): solo la caja y los botones reciben clics */
.composer textarea, .composer .btn, .composer .mention-pick { pointer-events: auto; }
.composer__avatar { position: absolute; left: 18px; top: 14px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.composer textarea {
  width: 100%; min-height: 104px; resize: vertical; padding: 22px 24px 20px 120px;
  background: transparent; border: 1.5px solid #6E6E7A; border-radius: 30px; font-size: 1.15rem;
  transition: border-color var(--t-ui);
}
.composer textarea::placeholder { color: #85858F; }
.composer textarea:focus { outline: none; border-color: var(--primary-soft); }
.composer__actions { display: flex; justify-content: flex-end; gap: 20px; margin-top: 26px; position: relative; z-index: 1; }
.composer__actions .btn { min-width: 147px; font-size: 1.15rem; padding: .55em 1em; border-radius: var(--r-sm); }
.composer__actions .btn[aria-pressed="true"] { background: #4B3BB0; box-shadow: inset 0 0 0 2px var(--primary-soft); }

.comment-list { display: grid; gap: 34px; margin-top: -44px; }
.comment { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
.comment__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; margin-top: 4px; }
.comment__body { min-width: 0; }
.role { display: inline-block; padding: 0 6px; border-radius: 2px; font-size: .62rem; line-height: 1.4; }
.role--usuario { background: var(--primary); }
.role--admin { background: var(--danger); }
/* Mismo color que el marco de la foto de cada rango, en tono más oscuro para que el texto blanco se lea */
.role--editor { background: #1C86B8; }
.role--moderador { background: #1E9A3A; }
.role--uploader { background: #D2691E; }
.role--redactor { background: #C93A85; }
.comment__author { font-size: 1.05rem; font-weight: 600; line-height: 1.1; }
.comment__time { font-size: .6rem; color: var(--dim); }
.comment__text { font-size: 1rem; margin: 14px 0 12px; }
.comment__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: .68rem; color: #9A9AA5; margin-left: -6px; }
.act { display: inline-flex; align-items: center; gap: 4px; padding: 6px; border-radius: 4px; transition: color var(--t-ui), transform var(--t-press) var(--ease-out); }
.act .ico { width: 13px; height: 13px; }
.act:hover { color: #fff; }
.act:active { transform: scale(.94); }
.react { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: .78rem; }
.react__ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--primary); transition: transform 260ms var(--spring), background-color var(--t-ui); }
.react--dislike .react__ico { background: #2A2A33; color: #CFCFD6; }
.react .ico { width: 14px; height: 14px; }
.react:active .react__ico { transform: scale(.82); transition-duration: var(--t-press); }
.react[aria-pressed="true"] .react__ico { background: var(--primary); color: #fff; }
.react--dislike[aria-pressed="true"] .react__ico { background: var(--danger); }
.comment-list--nested { position: relative; margin: 16px 0 0 -48px; padding-left: 60px; gap: 20px; }
.comment-list--nested::before { content: ""; position: absolute; left: 30px; top: -42px; bottom: 34px; width: 14px; border: 1px solid #50505A; border-right: 0; }
.comment-list--nested .comment__avatar { width: 32px; height: 32px; margin-top: 10px; justify-self: center; }

/* Spoiler: el texto se revela con un barrido de clip-path */
.spoiler { position: relative; margin: 14px 0 12px; max-width: 380px; }
.spoiler .comment__text, .spoiler .post__text { margin: 0; clip-path: inset(0 100% 0 0); transition: clip-path 500ms var(--ease-out); }
.spoiler.is-open .comment__text, .spoiler.is-open .post__text { clip-path: inset(0 0 0 0); }
.spoiler__btn {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 28px; border-radius: 3px; background: var(--primary); font-size: .8rem;
  transition: opacity 260ms var(--ease-out), transform var(--t-press) var(--ease-out);
}
.spoiler__btn:active { transform: scale(.98); }
.spoiler__btn .ico { width: 18px; height: 18px; }
.spoiler.is-open .spoiler__btn { opacity: 0; pointer-events: none; }
.comments__more { margin: 30px 0 0 58px; font-size: 1.05rem; font-weight: 500; padding: 6px 0; transition: color var(--t-ui); }
.comments__more:hover { color: var(--primary-soft); }

/* ===================== Responsive ficha ===================== */
@media (max-width: 1100px) {
  .ficha__inner { grid-template-columns: 216px 1fr; row-gap: 24px; }
  .ficha__actions { grid-column: 1 / -1; grid-row: 1; display: flex; justify-content: space-between; align-items: center; height: auto; }
  .ficha__media { width: 90%; }
}
@media (max-width: 760px) {
  .ficha__inner { grid-template-columns: 1fr; padding-top: 20px; text-align: left; }
  .ficha__actions { flex-direction: row-reverse; }
  .ficha__aside { grid-template-columns: 120px 1fr; justify-items: start; column-gap: 16px; align-items: start; }
  .ficha__kicker { font-size: var(--fs-md); margin-bottom: 0; }
  .ficha__poster { width: 120px; grid-row: span 3; border-radius: 12px; }
  .ficha__btns { flex-wrap: wrap; }
  .share { gap: 8px; }
  .ficha__info { padding-top: 0; }
  /* Como en la ficha de serie: la imagen de fondo detrás del póster y los datos, atenuada y fundida hacia abajo */
  .ficha__media { top: var(--genres-h); left: 0; width: 100%; height: 340px; aspect-ratio: auto; opacity: .6; }
  .ficha__media::after { display: none; }
  .ficha__media { -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent); mask-image: linear-gradient(to bottom, #000 50%, transparent); }
  .spoiler { max-width: 100%; }
  .play-btn, .play-btn--xl { width: 64px; height: 64px; box-shadow: 0 0 0 8px rgb(109 87 232 / .32); }
  .play-btn .ico { width: 30px; height: 30px; margin-left: 4px; }
  .play-btn::before { inset: -8px; }
  .player { aspect-ratio: auto; min-height: 300px; }
  .player__play { top: 60%; }
  .composer textarea { padding-left: 76px; font-size: 1rem; border-radius: 22px; }
  .composer__avatar { left: 14px; }
  .composer__actions { gap: 10px; margin-top: 14px; }
  .composer__actions .btn { min-width: 0; flex: 1; font-size: 1rem; }
  .comment-list { margin-top: 28px; }
  .comment-list--nested { margin-left: -44px; padding-left: 44px; }
  .comment-list--nested::before { left: 18px; width: 10px; }
  .comments__more { margin-left: 0; }
}

/* ===================== Serie (vista_serie.jpg) ===================== */
.serie-hero { background: var(--bg-hero); position: relative; }
.serie-bar { border-block: 1px solid var(--line); background: rgb(255 255 255 / .03); }
.serie-bar__inner, .serie-grid { width: min(100% - 2 * var(--pad), 1010px); margin-inline: auto; }
.serie-bar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 53px; gap: 16px; }
.serie-bar__label { display: flex; align-items: center; gap: 10px; font-weight: 600; text-transform: uppercase; font-size: 1rem; }
.serie-bar__label .ico { width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; padding: 2px; }
.serie-bar__status { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 0 rgb(43 217 74 / .6); animation: live 2s var(--ease-out) infinite; }
@keyframes live { 70%, 100% { box-shadow: 0 0 0 8px rgb(43 217 74 / 0); } }

.serie-hero__stage { position: relative; isolation: isolate; padding: 30px 0 34px; }
.serie-hero__bg {
  position: absolute; z-index: -1; top: 0; left: 29%; width: 71%; height: 300px; object-fit: cover; object-position: left top;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%), linear-gradient(to bottom, #000 50%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%), linear-gradient(to bottom, #000 50%, transparent); mask-composite: intersect;
}
.serie-grid { display: grid; grid-template-columns: 192px 1fr; column-gap: 30px; }
.serie-aside { display: grid; justify-items: center; gap: 10px; align-content: start; }
.serie-aside__top { display: flex; align-items: center; gap: 12px; justify-self: start; margin-bottom: 14px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: var(--r-pill);
  border: 1px solid rgb(255 255 255 / .45); font-size: .78rem; background: rgb(0 0 0 / .25);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui), border-color var(--t-ui);
}
.pill-btn .ico { width: 15px; height: 15px; }
.pill-btn:active { transform: scale(.95); }
.pill-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }
.share--round { margin: 0; gap: 6px; }
.share--round a { width: 26px; height: 26px; border-radius: 50%; background: transparent; border: 1.5px solid #fff; }
.share--round .ico { width: 13px; height: 13px; }
.serie-aside__poster { width: 192px; aspect-ratio: 255 / 386; object-fit: cover; border-radius: 4px; }
.serie-aside .btn { width: 118px; }
.serie-aside .btn .ico { width: 15px; height: 15px; }
.btn--deep { background: #3A2BB8; color: #fff; }

.serie-main { min-width: 0; }
.serie-main__head { position: relative; min-height: 118px; }
.serie-main__head .ficha__dl { position: absolute; right: 0; top: 0; }
.select-btn { display: inline-flex; align-items: center; gap: 22px; padding: 6px 12px; border-radius: var(--r-pill); background: #1E1E26; font-size: .75rem; transition: transform var(--t-press) var(--ease-out); }
.select-btn .ico { width: 16px; height: 16px; color: var(--primary); }
.select-btn:active { transform: scale(.96); }
.play-ghost {
  /* Se ancla a la escena (.serie-hero__stage): centrado sobre la imagen de fondo, que va del 29% al 100% del ancho */
  position: absolute; left: 64.5%; top: 52px; translate: -50% 0;
  display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  /* El efecto se ve siempre (relleno violeta, aro y brillo); al pasar el ratón solo se intensifica */
  background: var(--primary);
  box-shadow: 0 0 0 10px rgb(109 87 232 / .3), 0 0 40px rgb(109 87 232 / .55);
  transition: transform 260ms var(--spring), box-shadow var(--t-ui) var(--ease-out);
}
.play-ghost::before { /* halo que late, como el play del reproductor */
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgb(109 87 232 / .6); animation: halo 2.6s var(--ease-out) infinite; pointer-events: none;
}
.play-ghost .ico { width: 40px; height: 40px; margin-left: 5px; color: #fff; transition: transform 260ms var(--spring); }
@media (hover: hover) and (pointer: fine) {
  .play-ghost:hover { transform: scale(1.08); box-shadow: 0 0 0 14px rgb(109 87 232 / .4), 0 0 60px rgb(109 87 232 / .75); }
  .play-ghost:hover .ico { transform: scale(1.06); }
}
.play-ghost:focus-visible { outline: 2px solid #fff; outline-offset: 14px; }
.play-ghost:active { transform: scale(.92); transition-duration: var(--t-press); }
@media (prefers-reduced-motion: reduce) { .play-ghost::before { animation: none; opacity: 0; } }
.serie-title { font-size: clamp(2.2rem, 1.5rem + 2vw, 3.1rem); font-weight: 700; }
.serie-original { font-size: .95rem; font-weight: 500; margin-top: 8px; }
.serie-original span { font-size: .72rem; font-weight: 400; margin-right: 6px; }
.serie-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; }
.stat-boxes { display: flex; gap: 8px; }
.stat-boxes div { display: grid; place-items: center; min-width: 44px; padding: 4px 8px; border: 1px solid rgb(255 255 255 / .2); background: rgb(0 0 0 / .35); font-size: .72rem; line-height: 1.2; text-align: center; }
.stat-boxes dd { margin: 0; }
.serie-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .75rem; }
.serie-rate__stars { display: flex; gap: 3px; }
.serie-rate__stars .ico { width: 18px; height: 18px; fill: #fff; stroke: #fff; }
.dot-purple { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px #fff; }
.serie-details { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; margin-top: 46px; }
.serie-credits { display: grid; gap: 10px; align-content: end; font-size: .8rem; }
.serie-credits div { display: flex; align-items: center; gap: 10px; }
.serie-credits dt { font-weight: 600; }
.serie-credits dd { margin: 0; }
.serie-credits dd:has(.pill) { display: flex; flex-wrap: wrap; gap: 6px; } /* géneros: hueco entre píldoras, también al saltar de línea */
.serie-synopsis { font-size: .78rem; line-height: 1.75; color: #8F8F9C; }
.serie-synopsis__by { color: #fff; font-size: .8rem; margin-bottom: 6px; }

.serie-cta { display: flex; justify-content: center; gap: 24px; padding: 18px var(--pad) 26px; background: var(--bg); }
.cta-fb {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 210px; padding: 8px 16px;
  background: linear-gradient(90deg, #2A62D8, #3B7CF2); font-weight: 600; font-size: .85rem; line-height: 1.15;
  transition: transform var(--t-press) var(--ease-out);
}
.cta-fb small { display: block; font-weight: 400; font-size: .6rem; opacity: .7; }
.cta-fb .ico { width: 34px; height: 34px; opacity: .7; }
.cta-dark {
  display: grid; place-items: center; min-width: 184px; padding: 0 20px; font-size: 1.25rem; font-weight: 700;
  background: linear-gradient(to bottom, #3B3B3B, #000 70%); border: 1px solid #222;
  transition: transform var(--t-press) var(--ease-out), filter var(--t-ui);
}
.cta-dark--gray { background: linear-gradient(to bottom, #6B6B6B, #1A1A1A 80%); }
.cta-fb:active, .cta-dark:active { transform: scale(.97); }
.cta-dark:hover { filter: brightness(1.25); }

.serie-cols { width: min(100% - 2 * var(--pad), 1320px); margin: 0 auto; display: grid; grid-template-columns: 1fr 326px; column-gap: 40px; }
.serie-cols .comments { width: auto; margin: 30px 0 0; }
.ranked { border-left: 1px solid var(--line); padding: 40px 0 0 38px; }
.ranked__title { font-size: 1.4rem; font-weight: 500; margin-bottom: 26px; }
.ranked__list { display: grid; gap: 14px; }
.top-item--tall img { width: 86px; height: 84px; }
.critica { margin-top: 56px; }
.critica__title { font-size: 1.5rem; font-weight: 500; margin-bottom: 18px; }
.critica__box { background: #14141E; padding: 18px 22px; font-size: .78rem; line-height: 1.8; color: #7C7C8A; }
.section-head--center { justify-content: center; position: relative; }
.section-head--center .dashes { position: absolute; right: 0; }

@media (max-width: 1100px) {
  .serie-cols { grid-template-columns: 1fr; }
  .ranked { border-left: 0; padding-left: 0; }
  .ranked__list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 760px) {
  .serie-bar__label { font-size: .8rem; }
  .serie-grid { grid-template-columns: 1fr; row-gap: 22px; }
  .serie-aside { grid-template-columns: 130px 1fr; justify-items: start; column-gap: 16px; }
  .serie-aside__top { grid-column: 1 / -1; }
  .serie-aside__poster { width: 130px; grid-row: span 2; }
  .serie-aside .btn { align-self: end; }
  .serie-hero__bg { left: 0; width: 100%; opacity: .6; }
  .serie-main__head { min-height: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .serie-main__head .ficha__dl { position: static; }
  /* Junto al póster: arriba el play (centrado en el hueco), abajo Seguir y Ver episodio 1 apilados */
  .serie-aside { grid-template-rows: auto 1fr auto auto; }
  .serie-aside__poster { grid-row: 2 / 5; }
  .serie-aside > button.btn { grid-column: 2; grid-row: 3; }
  .serie-aside > a.btn { grid-column: 2; grid-row: 4; }
  .serie-aside > .serie-aside__editar { grid-column: 1 / -1; }
  .play-ghost {
    position: relative; left: auto; top: auto; translate: none; grid-column: 2; grid-row: 2; place-self: center;
    width: 60px; height: 60px; box-shadow: 0 0 0 6px rgb(109 87 232 / .3), 0 0 28px rgb(109 87 232 / .55);
  }
  .play-ghost::before { inset: -6px; }
  .serie-hero__stage { overflow-x: clip; } /* el halo al crecer no crea scroll lateral */
  .play-ghost .ico { width: 28px; height: 28px; margin-left: 4px; }
  .serie-details { grid-template-columns: 1fr; gap: 20px; margin-top: 26px; }
  .serie-cta { flex-wrap: wrap; gap: 10px; }
  .cta-fb { flex-basis: 100%; }
  .cta-dark { flex: 1; min-width: 0; min-height: 48px; font-size: 1.05rem; }
  .section-head--center { justify-content: space-between; }
  .section-head--center .dashes { position: static; }
}
/* ===================== Episodio: elegir idioma ===================== */
.player--ep .player-modal { width: min(340px, 100% - 32px); }
.lang-list { display: grid; justify-items: center; gap: 12px; padding: 28px 0 14px; }
.lang-btn { width: 156px; display: grid; grid-template-columns: 22px 1fr; padding-right: 28px; text-align: center; font-size: .8rem; background: transparent; border: 1px solid #8a8a8a; }
.lang-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }

/* ===================== Barra de temporadas ===================== */
.season-bar {
  width: min(100% - 2 * var(--pad), 1290px); margin-inline: auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 12px;
  padding: 30px 30px 34px; border-top: 1px solid #4a4a4e;
}
.season-bar__label { font-weight: 600; font-size: 1rem; margin-right: 6px; }
.season-tabs { display: flex; flex-wrap: wrap; gap: 12px; }
.season-tab {
  padding: .4em .8em; border: 1px solid #8a8a8e; border-radius: var(--r-sm); font-size: 1rem; font-weight: 300;
  transition: background-color var(--t-ui), border-color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.season-tab:hover { border-color: #fff; }
.season-tab:active { transform: scale(.96); }
.season-tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); }
.season-bar__tools { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.search-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.search-inline input { width: 7ch; background: none; border: 0; color: inherit; font: inherit; outline: none; transition: width 300ms var(--ease-out); }
.search-inline input::placeholder { color: var(--text); }
.search-inline input:focus { width: 14ch; }
.search-inline:focus-within { box-shadow: 0 1px 0 var(--primary); }

/* ===================== Episodios de la temporada ===================== */
.episodes { background: var(--bg-hero); padding: 4px 0 56px; }
/* Caja con scroll propio: unas 3 filas de episodios y barra morada; el resto de la página sigue corta */
.ep-scroll {
  width: min(100% - 2 * var(--pad), 1300px); margin-inline: auto;
  max-height: min(600px, 70vh); /* menos que 3 filas: el aviso de «cargar más» empieza fuera de la vista */ overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 12px 0 0; /* arriba: hueco para que la tarjeta suba al pasar el ratón; derecha: separa la barra */
  scrollbar-width: thin; scrollbar-color: var(--primary) rgb(255 255 255 / .06);
}
.ep-scroll::-webkit-scrollbar { width: 8px; }
.ep-scroll::-webkit-scrollbar-track { background: rgb(255 255 255 / .06); border-radius: 8px; }
.ep-scroll::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 8px; }
.ep-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
/* Check de «visto» de cada episodio: botón encima de la tarjeta (no puede ir dentro del enlace) */
.ep-list > li { position: relative; }
.ep-check-hueco { width: 28px; height: 28px; flex: none; }
.ep-check--btn { position: absolute; z-index: 3; left: 16px; bottom: 14px; background: rgb(0 0 0 / .25); transition: background-color var(--t-ui), color var(--t-ui), translate 300ms var(--ease-out), transform var(--t-press) var(--ease-out); }
/* Sin marcar: ojito tenue que se aclara al pasar; marcado: el check sobre morado */
button.ep-check--btn { color: rgb(255 255 255 / .55); }
button.ep-check--btn:hover { color: #fff; background: rgb(109 87 232 / .35); }
.ep-check--btn .ep-check__ok, .ep-check--btn.is-visto .ep-check__ojo { display: none; }
.ep-check--btn.is-visto .ep-check__ok { display: block; }
button.ep-check--btn.is-visto { color: #fff; background: var(--primary); border-color: var(--primary); }
.ep-check--btn:active { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) { .ep-list > li:has(a.ep-tile:hover) .ep-check--btn { translate: 0 -4px; } }
@media (max-width: 760px) { .ep-check--btn { left: 10px; bottom: 8px; } }
.ep-tile {
  position: relative; display: block; aspect-ratio: 305 / 207; border-radius: 14px; overflow: hidden; background: #222;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.ep-tile img { width: 100%; height: 100%; object-fit: cover; }
.ep-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(0 0 0 / .25), transparent 40%, rgb(0 0 0 / .45)); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { a.ep-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgb(109 87 232 / .6); } }
a.ep-tile:active { transform: scale(.98); }
.ep-tile__label { position: absolute; z-index: 1; top: 14px; left: 16px; font-weight: 700; font-size: 1.15rem; }
.ep-tile--next img { filter: blur(3px) brightness(.55); transform: scale(1.06); }
.ep-tile__next { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; font-weight: 500; font-size: 1.05rem; }
.ep-tile__foot { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: center; gap: 6px; }
.ep-check, .ep-bell, .ep-tile__cc { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; }
.ep-check { border: 1.5px solid rgb(255 255 255 / .7); color: transparent; transition: background-color var(--t-ui), color var(--t-ui); }
.ep-check.is-visto { background: var(--primary); border-color: var(--primary); color: #fff; }
button.ep-check { background: transparent; border: 1px solid #fff; transition: background-color var(--t-ui), transform var(--t-press) var(--ease-out); }
button.ep-check[aria-pressed="true"], .ep-bell[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }
.ep-bell { border: 1px solid #fff; transition: background-color var(--t-ui), transform var(--t-press) var(--ease-out); }
.ep-check:active, .ep-bell:active { transform: scale(.9); }
.ep-check .ico, .ep-bell .ico, .ep-tile__cc .ico { width: 16px; height: 16px; }
.ep-tile__date { margin-left: auto; font-size: .85rem; }
.ep-tile__cc { border: 1.5px solid #fff; }
.ep-tile__cc--on { background: var(--primary); border-color: var(--primary); }

@media (max-width: 1100px) { .ep-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .season-bar { padding-inline: 0; }
  .season-bar__tools { margin-left: 0; width: 100%; justify-content: space-between; }
  .ep-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ep-tile__foot { left: 10px; right: 10px; bottom: 8px; }
}

/* ===================== Página de episodio ===================== */
/* Rejilla fija: título | estado; debajo, recomendar y ver juntos. Con flex-wrap los botones saltaban según el largo del título */
.ep-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 24px; padding-block: 22px; max-width: 1290px; }
.ep-head > .social-ficha { grid-column: 1 / -1; }
@media (max-width: 720px) { .ep-head { grid-template-columns: minmax(0, 1fr); } }
.ep-head__kicker { font-size: .85rem; color: var(--muted); }
.ep-head__kicker a { color: var(--primary-hi); }
.ep-head__kicker a:hover { text-decoration: underline; }
.ep-head__title { margin-top: 4px; font-size: var(--fs-xl); font-weight: 600; }
.ep-head__title span { margin-left: 8px; padding: 2px 10px; border-radius: var(--r-pill); background: rgb(109 87 232 / .18); color: var(--primary-hi); font-size: .7em; vertical-align: middle; }

/* Estado: Visto / Pendiente / Finalizado (uno a la vez) */
.estado { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.estado__btn {
  display: inline-flex; align-items: center; gap: 6px; padding: .5em 1em; border-radius: var(--r-pill);
  border: 1px solid rgb(255 255 255 / .22); font-size: .82rem; color: #D6D6DE;
  transition: background-color var(--t-ui), border-color var(--t-ui), color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.estado__btn .ico { width: 15px; height: 15px; }
.estado__btn:hover { border-color: var(--primary-hi); color: #fff; }
.estado__btn:active { transform: scale(.95); }
.estado__btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.estado__btn--pendiente[aria-pressed="true"] { background: #B7791F; border-color: #B7791F; }
.estado__btn--finalizado[aria-pressed="true"] { background: #1F9D55; border-color: #1F9D55; }

/* Servidores numerados por idioma */
.server-list[data-servers] a { justify-content: flex-start; gap: 14px; padding-inline: 14px; }
.server-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); font-size: .72rem; font-weight: 700; }
.server-lang { color: var(--muted); }
.player-modal__back { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: .78rem; color: var(--primary-soft); }
.player-modal__back:hover { color: #fff; }
.player-modal__back .ico { width: 14px; height: 14px; }

/* Barra superior del reproductor: solo cuando ya hay servidor elegido */
.player__tools {
  position: absolute; z-index: 2; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  opacity: 0; pointer-events: none; translate: 0 -8px; transition: opacity 300ms var(--ease-out), translate 300ms var(--ease-out);
}
.player.has-source .player__tools { opacity: 1; pointer-events: auto; translate: 0; }
.player__tools > button, .player__tools > a {
  display: inline-flex; align-items: center; gap: 6px; padding: .5em 1em; border-radius: var(--r-pill);
  background: rgb(10 10 16 / .75); border: 1px solid rgb(255 255 255 / .14); font-size: .82rem; backdrop-filter: blur(6px);
  transition: background-color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.player__tools > button:hover, .player__tools > a:hover { background: var(--primary); }
.player__tools > button:active, .player__tools > a:active { transform: scale(.95); }
.player__tools .ico { width: 15px; height: 15px; }
.player__now { margin-right: auto; padding: .35em .9em; border-radius: var(--r-pill); background: rgb(109 87 232 / .3); font-size: .75rem; }
.player__now:empty { display: none; }

/* Con un servidor elegido, las herramientas bajan a una franja propia y no tapan los controles del vídeo incrustado */
.player.has-source .player__frame { height: calc(100% - 58px); }
.player.has-source .player__tools {
  top: auto; bottom: 0; left: 0; right: 0; height: 58px; padding-inline: 16px; flex-wrap: nowrap;
  background: #0E0E15; border-top: 1px solid var(--line); translate: 0;
}
.player.has-source .player__now { background: none; padding-inline: 0; font-size: .85rem; color: var(--muted); }
.player__now::before { content: "Viendo en "; }


/* Panel único: idioma arriba, servidores debajo, un clic reproduce */
.player-src { width: min(400px, 100% - 32px); padding: 20px 20px 12px; border-radius: 22px; background: rgb(8 8 12 / .96); border: 1px solid rgb(255 255 255 / .08); }
.player-src .player-modal__title { text-align: left; font-size: 1rem; font-weight: 600; border: 0; padding-bottom: 14px; }
.src-langs { display: flex; gap: 4px; padding: 4px; margin-bottom: 8px; border-radius: var(--r-pill); background: #1A1A22; }
.player-src .src-lang {
  flex: 1; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 10px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: .8rem; font-weight: 600;
  transition: background-color var(--t-ui), color var(--t-ui);
}
.player-src .src-lang:hover { color: #fff; }
.player-src .src-lang[aria-pressed="true"] { background: var(--primary); color: #fff; }
.player-src .flag { width: 18px; height: 18px; }
.src-solo { display: flex; align-items: center; gap: 8px; margin: -6px 0 8px; font-size: .8rem; color: var(--muted); }
.player-src .server-list a {
  display: grid; grid-template-columns: 24px 1fr auto 16px; align-items: center; gap: 12px;
  padding: 12px 10px; margin-inline: -10px; border: 0; border-radius: 12px; font-size: .9rem;
}
.player-src .server-list li + li a { box-shadow: 0 -1px 0 rgb(255 255 255 / .07); }
.player-src .server-list a:hover, .player-src .server-list a:focus-visible { background: rgb(255 255 255 / .06); box-shadow: none; }
.player-src .server-list li:hover + li a { box-shadow: none; }
.server-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-q { padding: .15em .6em; border-radius: 6px; background: rgb(255 255 255 / .08); color: #D6D6DE; font-size: .72rem; font-weight: 600; }
.server-go { width: 14px; height: 14px; color: var(--primary-soft); opacity: 0; transition: opacity var(--t-ui); }
.player-src .server-list a:hover .server-go, .player-src .server-list a:focus-visible .server-go { opacity: 1; }
@media (hover: none) { .server-go { opacity: 1; } }

/* Anterior / siguiente episodio */
.ep-nav { display: flex; justify-content: space-between; gap: 12px; padding-block: 26px 6px; max-width: 1290px; }
.ep-nav__btn {
  display: inline-flex; align-items: center; gap: 12px; padding: .7em 1.2em; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); transition: background-color var(--t-ui), border-color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.ep-nav__btn span { display: grid; font-weight: 500; }
.ep-nav__btn small { font-size: .72rem; color: var(--muted); font-weight: 400; }
.ep-nav__btn--next { text-align: right; background: var(--primary); border-color: var(--primary); }
.ep-nav__btn--next small { color: rgb(255 255 255 / .75); }
a.ep-nav__btn:hover { border-color: var(--primary-hi); }
.ep-nav__btn--next:hover { background: var(--primary-hi); }
a.ep-nav__btn:active { transform: scale(.97); }
.ep-nav__btn .ico { width: 18px; height: 18px; }
.ep-nav__btn--off { opacity: .6; }
@media (max-width: 760px) {
  .ep-nav__btn { padding: .6em .9em; font-size: .9rem; }
  .player__now { display: none; }
}
.ficha__info .estado { margin-top: 18px; }

/* ===================== Reproductor de película: pasos, galería y descargas ===================== */
.player.has-step .player__play { opacity: 0; pointer-events: none; transform: scale(.7); transition: opacity 200ms, transform 300ms var(--ease-out); }
/* con el menú arriba, los paneles se centran en el espacio que queda debajo */
.player--peli .player-modal { top: calc(50% + 50px); }
.player--peli .player-modal.player-gallery { width: min(560px, 92%); padding-bottom: 12px; }
.player-gallery__count { margin-left: 8px; color: var(--muted); font-weight: 400; }
.player-gallery__stage { position: relative; margin-top: 12px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #050508; }
.player-gallery__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 450ms var(--ease-out); }
.player-gallery__slide.is-active { opacity: 1; }
.player-gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.player-gallery__slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 10px; font-size: .78rem; background: linear-gradient(to top, rgb(0 0 0 / .8), transparent); }
.player-gallery__arrow {
  position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgb(10 10 16 / .7); border: 1px solid rgb(255 255 255 / .18); transition: background-color var(--t-ui), transform var(--t-press) var(--ease-out);
}
.player-gallery__arrow:hover { background: var(--primary); }
.player-gallery__arrow:active { transform: scale(.9); }
.player-gallery__arrow--prev { left: 10px; } .player-gallery__arrow--next { right: 10px; }
.player-gallery__arrow .ico { width: 18px; height: 18px; }
.player-gallery__dots { justify-content: center; margin: 12px 0 0; }
.player-gallery__dots button { display: grid; align-items: center; width: 34px; height: 14px; }
.player-gallery__dots button::after { content: ""; height: 3px; border-radius: 2px; background: #3A3A44; transition: background-color var(--t-ui); }
.player-gallery__dots button.is-on::after { background: var(--primary); }
.player-gallery .player-modal__back, .player-dl .player-modal__back { margin-top: 6px; }

.player-modal.player-dl { width: min(400px, 92%); }
.dl-list { display: grid; margin-top: 6px; }
.dl-list a {
  position: relative; display: grid; grid-template-columns: 22px 1fr auto auto 18px; align-items: center; gap: 10px;
  padding: 10px 6px; border-bottom: 1px solid #2a2a30; font-size: .8rem; transition: background-color var(--t-ui);
}
.dl-list li:last-child a { border-bottom: 0; }
.dl-list a:hover { background: #15151c; }
.dl-list .flag { width: 22px; height: 22px; }
.dl-list__q { padding: 2px 8px; border-radius: var(--r-pill); background: rgb(109 87 232 / .2); color: var(--primary-hi); font-size: .7rem; font-weight: 600; }
.dl-list__peso { color: var(--muted); font-size: .72rem; }
.dl-list .ico { width: 18px; height: 18px; color: var(--primary-hi); }
.dl-list a[data-estado]::after {
  content: attr(data-estado); position: absolute; inset: 0; display: grid; place-items: center;
  background: rgb(18 18 26 / .94); color: var(--primary-soft); font-weight: 600; border-radius: 6px;
}
@media (max-width: 760px) {
  /* Alto extra solo con un panel abierto (idiomas, galería, descargas): cerrado, sin enlaces, sobra media pantalla */
  .player--peli { transition: min-height 300ms var(--ease-out); }
  .player--peli.has-step { min-height: 520px; }
  .player--peli .player-modal { top: calc(50% + 34px); }
}

/* Tráiler en ventana */
.trailer { width: min(960px, 94vw); margin: auto; padding: 0; border: 0; border-radius: var(--r-md); background: #000; overflow: visible; }
.trailer::backdrop { background: rgb(0 0 0 / .8); }
.trailer__frame { aspect-ratio: 16 / 9; }
.trailer__frame iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r-md); }
.trailer__close { position: absolute; top: -44px; right: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / .12); color: #fff; }
/* Marca de «cargando más episodios» al final de la temporada: tres puntos que laten */
.ep-more { display: flex; justify-content: center; gap: 6px; padding: 24px 0 8px; }
.ep-more span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: ep-more 1s ease-in-out infinite alternate; }
.ep-more span:nth-child(2) { animation-delay: .15s; }
.ep-more span:nth-child(3) { animation-delay: .3s; }
@keyframes ep-more { from { opacity: .25; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ep-more span { animation: none; opacity: .6; } }
/* Estado de emisión de la serie (barra superior): antena verde con ondas en emisión, bandera de meta al finalizar */
.serie-bar__status svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.serie-bar__status--live { color: var(--online); }
.senal circle { fill: currentColor; stroke: none; }
.senal__o1, .senal__o2 { animation: senal 1.8s ease-in-out infinite; }
.senal__o2 { animation-delay: .3s; }
@keyframes senal { 0%, 100% { opacity: .2; } 40%, 60% { opacity: 1; } }
.serie-bar__status--fin { color: rgb(255 255 255 / .75); }
.meta__asta, .meta__tela { stroke-dasharray: 60; stroke-dashoffset: 60; animation: meta-dibujo 900ms var(--ease-out) forwards; }
.meta__tela { animation-delay: 250ms; }
@keyframes meta-dibujo { to { stroke-dashoffset: 0; } }
/* Doble check del título: morado si el usuario marcó la serie como Finalizada */
.serie-bar__fin { transition: color 300ms var(--ease-out), background-color 300ms var(--ease-out), border-color 300ms var(--ease-out), transform 300ms var(--ease-out); }
.serie-bar__label .serie-bar__fin.is-on { color: #fff; background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) {
  .senal__o1, .senal__o2 { animation: none; opacity: 1; }
  .meta__asta, .meta__tela { animation: none; stroke-dashoffset: 0; }
}
/* Ficha de serie con fondo como el slider de /series: sube bajo la barra de géneros (hero-under) y lleva la escena difuminada a todo el ancho */
.serie-hero { background: var(--bg); isolation: isolate; overflow: hidden; padding-top: var(--genres-h); }
.serie-hero__blur {
  position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  filter: blur(34px) brightness(.42) saturate(1.2); transform: scale(1.15);
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
.serie-bar { background: rgb(0 0 0 / .18); }
/* Sombra negra arriba: géneros y «Ver … online» se leen sobre la escena (z-index -1 y último en el árbol: sobre las imágenes, bajo el texto) */
.serie-hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: calc(var(--genres-h) + 140px); pointer-events: none;
  background: linear-gradient(to bottom, rgb(0 0 0 / .85), rgb(0 0 0 / .6) 55%, transparent);
}
/* Escritorio: la escena nítida sube hasta la barra de géneros y guarda su 16:9 para que no se corten los personajes */
@media (min-width: 761px) {
  .serie-hero__stage { isolation: auto; } /* su z-index -1 pasa a .serie-hero: queda tras la barra pero sobre el difuminado */
  .serie-hero__bg { top: calc(-1 * (var(--genres-h) + 55px)); height: auto; aspect-ratio: 16 / 9; object-position: center top; }
  /* Velo oscuro bajo la info: el play queda limpio arriba y el título, créditos y sinopsis se leen sobre la escena */
  .serie-hero__stage::after {
    content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, transparent 90px, rgb(0 0 0 / .45) 200px, rgb(0 0 0 / .7) 360px);
  }
  .serie-synopsis { color: #C4C4CE; }
}

/* Temporadas: fila deslizable de tarjetas con póster, número grande y nº de episodios */
.temporadas { margin-top: 40px; min-width: 0; }
.temporadas__title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 1.15rem; font-weight: 600; }
.temporadas__title span { padding: 1px 10px; border-radius: var(--r-pill); background: rgb(109 87 232 / .18); color: var(--primary-hi); font-size: .8rem; }
.temporadas__rail {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgb(109 87 232 / .5) transparent;
  padding: 4px 2px 12px; margin: 0; list-style: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.temporadas__rail li { flex: 0 0 120px; scroll-snap-align: start; }
.temporadas__rail li:last-child { margin-right: 40px; } /* que la última no quede bajo el fundido */
.temporada-card { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #222; transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
.temporada-card img { display: block; width: 100%; aspect-ratio: 2 / 3; height: auto; object-fit: cover; }
.temporada-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgb(0 0 0 / .9)); pointer-events: none; }
.temporada-card__n { position: absolute; z-index: 1; top: 6px; left: 10px; font-size: 2rem; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 2px 12px rgb(0 0 0 / .7); }
.temporada-card__txt { position: absolute; z-index: 1; left: 10px; right: 8px; bottom: 8px; display: grid; gap: 1px; font-size: .78rem; line-height: 1.2; }
.temporada-card__txt small { color: rgb(255 255 255 / .7); font-size: .7rem; }
@media (hover: hover) and (pointer: fine) { .temporada-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgb(109 87 232 / .7); } }
.temporada-card:active { transform: scale(.97); }
.temporada-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 760px) { .temporadas { margin-top: 26px; } .temporadas__rail li { flex-basis: 104px; } }
