/* Tema visual de la plataforma.
 *
 * Está calcado del tema «abyss» de Jellyfin que se guardó en `referencia/`:
 * fondo casi negro con la imagen de la obra desenfocada detrás, superficies de
 * cristal (translúcidas y con desenfoque), esquinas de 12px, pastillas de 50px
 * y un acento casi blanco que al pasar por encima invierte el contraste.
 *
 * Los valores de la sección 1 son los mismos del original para que el parecido
 * no dependa de acertar a ojo. Cambiar el acento aquí cambia toda la interfaz.
 */

/* 1. VARIABLES */

:root {
  --acento: 245, 245, 247;
  --radio: 12px;
  --radio-grande: 24px;
  --pastilla: 50px;

  --fondo: #0b0b0b;
  --vidrio: 42, 42, 42;
  --indicador: 55, 55, 55;

  --borde-vidrio: rgba(245, 245, 247, 0.2);
  --desenfoque-fondo: 23px;
  --desenfoque-vidrio: 15px;

  --suave: cubic-bezier(0.16, 1, 0.3, 1);
  --rapido: cubic-bezier(0.4, 0, 0.2, 1);

  --texto: rgb(var(--acento));
  --texto-tenue: rgba(245, 245, 247, 0.62);
  --texto-mudo: rgba(245, 245, 247, 0.42);

  --ancho: 1600px;
  --margen: clamp(16px, 4vw, 56px);

  color-scheme: dark;
  scrollbar-color: rgba(var(--acento), 0.8) transparent;
}

*, *::before, *::after { box-sizing: border-box; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(var(--acento), 0.5);
  border-radius: var(--radio);
}

/* 2. BASE */

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--texto);
  font-family: "Google Sans", "Product Sans", Roboto, -apple-system,
               "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

.tenue { color: var(--texto-tenue); }
.oculto { display: none !important; }

/* El fondo desenfocado. Fijo y a pantalla completa: el contenido se desplaza
   por encima y la imagen no se mueve, que es lo que da la sensación de capas
   del tema original. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--fondo);
}

.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Portada: la imagen se ve. El texto queda legible por los degradados de
   abajo, no oscureciendo la foto entera. Es lo que hace el tema original en
   la pantalla de inicio. */
.backdrop.nitido img {
  filter: saturate(115%) contrast(104%) brightness(62%);
}

.backdrop.nitido::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(11, 11, 11, 0.96) 0%,
      rgba(11, 11, 11, 0.72) 34%,
      rgba(11, 11, 11, 0.18) 62%,
      rgba(11, 11, 11, 0.05) 100%),
    linear-gradient(to bottom,
      rgba(11, 11, 11, 0.55) 0%,
      rgba(11, 11, 11, 0.05) 22%,
      rgba(11, 11, 11, 0.35) 62%,
      var(--fondo) 88%);
}

/* Ficha y resto: desenfoque fuerte, casi negro. Los valores son los del tema
   de referencia (blur 23px, brillo 25%). */
.backdrop.difuso img {
  filter: blur(var(--desenfoque-fondo)) saturate(120%) contrast(120%) brightness(25%);
  transform: scale(1.1);   /* tapa el borde transparente que deja el desenfoque */
}

.backdrop.difuso::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 11, 0.35) 0%,
    rgba(11, 11, 11, 0.55) 45%,
    var(--fondo) 100%
  );
}

/* 3. CABECERA */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px var(--margen);
  background: linear-gradient(to bottom, rgba(11, 11, 11, 0.75), transparent);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 1 1 0;
}

.marca span { font-size: 1.05rem; }

/* Las pastillas centrales del tema original: una cápsula de cristal con la
   sección activa en blanco sólido y texto oscuro. */
.pastillas {
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.9);
  border: 1px solid rgba(87, 87, 87, 0.18);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.pastillas a {
  padding: 0.45em 1.4em;
  border-radius: var(--pastilla);
  color: var(--texto-tenue);
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.pastillas a:hover { color: var(--texto); }

.pastillas a.activa {
  background: rgb(var(--acento));
  color: #121212;
  font-weight: 600;
}

.acciones {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 0;
}

.buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.69);
  border: 1px solid rgba(87, 87, 87, 0.18);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
  color: var(--texto-tenue);
  transition: border-color 0.37s var(--suave);
}

.buscador:focus-within { border-color: var(--borde-vidrio); }

.buscador input {
  border: 0;
  background: none;
  color: var(--texto);
  font: inherit;
  font-size: 0.92rem;
  width: 9em;
  outline: none;
}

.boton-fino {
  padding: 0.5em 1.2em;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.69);
  border: 1px solid rgba(87, 87, 87, 0.18);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.boton-fino:hover { background: rgb(var(--acento)); color: #121212; }

/* Menú de cuenta */
.menu-cuenta { position: relative; }
.menu-cuenta summary { list-style: none; cursor: pointer; }
.menu-cuenta summary::-webkit-details-marker { display: none; }

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--pastilla);
  background: rgb(var(--acento));
  color: #121212;
  font-weight: 700;
}

.desplegable {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  padding: 10px;
  border-radius: var(--radio-grande);
  background: rgba(var(--vidrio), 0.85);
  border: 1px solid var(--borde-vidrio);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.desplegable .quien {
  padding: 8px 12px 12px;
  font-weight: 600;
  line-height: 1.3;
}

.desplegable .quien span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--texto-mudo);
  overflow: hidden;
  text-overflow: ellipsis;
}

.desplegable a,
.desplegable button {
  display: block;
  width: 100%;
  padding: 0.55em 0.9em;
  border: 0;
  border-radius: var(--radio);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.desplegable a:hover,
.desplegable button:hover {
  background: rgb(var(--acento));
  color: #121212;
  font-weight: 700;
}

/* 4. BOTONES */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.75em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--pastilla);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.37s var(--suave), color 0.37s var(--suave),
              transform 0.37s var(--suave), box-shadow 0.37s var(--suave);
}

.boton.primario { background: rgb(var(--acento)); color: #121212; }
.boton.primario:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }

.boton.claro {
  background: rgba(var(--vidrio), 0.75);
  border-color: rgba(87, 87, 87, 0.28);
  color: var(--texto);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.boton.claro:hover { background: rgb(var(--acento)); color: #121212; }

.boton.fantasma { background: none; border-color: var(--borde-vidrio); color: var(--texto-tenue); }
.boton.fantasma:hover { color: var(--texto); border-color: rgb(var(--acento)); }

.boton.redondo {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.6);
  border-color: rgba(87, 87, 87, 0.28);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.boton.redondo:hover { background: rgb(var(--acento)); color: #121212; }
.boton.ancho { width: 100%; }

/* 5. PORTADA */

main { min-height: 60vh; }

.portada {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 18px;
  max-width: 620px;
  min-height: min(76vh, 760px);
  margin-top: -86px;            /* la cabecera flota sobre la imagen */
  padding: 120px var(--margen) clamp(40px, 7vh, 80px);
}

.portada h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}

.tipo {
  color: var(--texto-tenue);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Los datos en pastillas oscuras del tema original (PG-13, 2h 49m, 8.5). */
.pastillas-dato { display: flex; flex-wrap: wrap; gap: 8px; }

.pastillas-dato span {
  padding: 0.35em 0.9em;
  border-radius: var(--radio);
  background: rgba(var(--indicador), 0.75);
  border: 1px solid rgba(87, 87, 87, 0.25);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.pastillas-dato .libre,
.sello.libre { background: rgba(var(--acento), 0.92); color: #121212; border-color: transparent; }

.sinopsis {
  color: rgba(245, 245, 247, 0.86);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sinopsis.larga { -webkit-line-clamp: 8; max-width: 60ch; }

.botones { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.portada.vacia { color: var(--texto-tenue); }

.aviso-cuenta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 var(--margen) 8px;
  padding: 22px 26px;
  border-radius: var(--radio-grande);
  background: rgba(var(--vidrio), 0.55);
  border: 1px solid rgba(87, 87, 87, 0.22);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.aviso-cuenta h2 { font-size: 1.1rem; }
.aviso-cuenta p { color: var(--texto-tenue); max-width: 62ch; font-size: 0.95rem; }

/* 6. FILAS Y TARJETAS */

.filas { display: flex; flex-direction: column; gap: 34px; padding-bottom: 60px; }

.fila-cabeza { padding: 0 var(--margen); margin-bottom: 14px; }
.fila-cabeza h2 { font-size: 1.35rem; }

.carril {
  display: flex;
  gap: 16px;
  padding: 6px var(--margen) 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

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

.tarjeta { scroll-snap-align: start; }
.tarjeta.ancha { flex: 0 0 clamp(220px, 22vw, 330px); }

.lamina {
  position: relative;
  overflow: hidden;
  border-radius: var(--radio);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 3px rgba(200, 200, 200, 0.35) inset,
              0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.37s var(--suave), box-shadow 0.37s var(--suave),
              outline-color 0.37s var(--suave);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.tarjeta.ancha .lamina { aspect-ratio: 16 / 9; }
.tarjeta.cartel .lamina { aspect-ratio: 2 / 3; }

.lamina img { width: 100%; height: 100%; object-fit: cover; }

.tarjeta:hover .lamina {
  transform: translateY(-4px) scale(1.02);
  outline-color: rgb(var(--acento));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.sin-imagen {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(140deg, rgba(var(--vidrio), 0.9), rgba(20, 20, 20, 0.9));
  color: var(--texto-mudo);
  font-size: 2.4rem;
  font-weight: 700;
}

.sin-imagen.alto { aspect-ratio: 2 / 3; border-radius: var(--radio); }

/* El botón de reproducir que aparece al pasar por encima. */
.jugar {
  position: absolute;
  inset: auto auto 10px 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pastilla);
  background: rgba(var(--acento), 0.92);
  color: #121212;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.37s var(--suave), transform 0.37s var(--suave);
}

.tarjeta:hover .jugar { opacity: 1; transform: none; }

/* Barra de avance sobre la miniatura, como en «Continue Watching». */
.avance {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 4px;
  border-radius: var(--pastilla);
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.avance span { display: block; height: 100%; background: rgb(var(--acento)); }

.avance-lineal {
  flex: 1 1 160px;
  max-width: 260px;
  height: 5px;
  border-radius: var(--pastilla);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(var(--acento), 0.22);
  overflow: hidden;
}

.avance-lineal span { display: block; height: 100%; background: rgba(var(--acento), 0.75); }

.sello {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.25em 0.7em;
  border-radius: var(--pastilla);
  background: rgba(var(--indicador), 0.85);
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nombre {
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub { color: var(--texto-mudo); font-size: 0.86rem; }

/* 7. CATÁLOGO */

.rejilla-pagina { padding: 10px var(--margen) 70px; }

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  width: fit-content;
  margin: 0 auto 22px;
  padding: 5px;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.9);
  border: 1px solid rgba(87, 87, 87, 0.18);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.filtros a {
  padding: 0.45em 1.3em;
  border-radius: var(--pastilla);
  color: var(--texto-tenue);
  font-weight: 500;
  font-size: 0.94rem;
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.filtros a:hover { color: var(--texto); }
.filtros a.activa { background: rgb(var(--acento)); color: #121212; font-weight: 600; }

.conteo { text-align: center; color: var(--texto-mudo); font-size: 0.9rem; margin-bottom: 22px; }

.rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 15vw, 190px), 1fr));
  gap: 26px 18px;
}

.vacio { text-align: center; color: var(--texto-mudo); padding: 60px 0; }

.paginacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 44px;
  color: var(--texto-tenue);
}

.paginacion a {
  padding: 0.5em 1.2em;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.7);
  border: 1px solid rgba(87, 87, 87, 0.22);
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.paginacion a:hover { background: rgb(var(--acento)); color: #121212; }

/* 8. FICHA */

.ficha {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(24px, 6vh, 70px) var(--margen) 40px;
  max-width: var(--ancho);
}

.ficha-cartel img {
  width: 100%;
  border-radius: var(--radio);
  box-shadow: 0 0 3px rgba(200, 200, 200, 0.35) inset,
              0 18px 50px rgba(0, 0, 0, 0.6);
}

.ficha-datos { display: flex; flex-direction: column; gap: 16px; }
.ficha-datos h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; }
.titulo-original { color: var(--texto-mudo); font-style: italic; margin-top: -10px; }

.no-disponible {
  padding: 0.75em 1.3em;
  border-radius: var(--radio);
  background: rgba(var(--indicador), 0.6);
  border: 1px solid rgba(87, 87, 87, 0.3);
  color: var(--texto-tenue);
}

.nota-cuenta { color: var(--texto-mudo); font-size: 0.92rem; }
.nota-cuenta a { color: var(--texto); text-decoration: underline; text-underline-offset: 3px; }

.creditos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 26px;
  margin: 10px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(87, 87, 87, 0.3);
}

.creditos dt { color: var(--texto-mudo); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.creditos dd { margin: 2px 0 0; font-weight: 500; }

.festivales { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }

.festivales li {
  padding: 0.35em 0.9em;
  border-radius: var(--pastilla);
  background: rgba(var(--indicador), 0.55);
  border: 1px solid rgba(87, 87, 87, 0.25);
  font-size: 0.85rem;
  color: var(--texto-tenue);
}

/* 9. REPRODUCTOR */

body.reproduciendo { background: #000; }
body.reproduciendo .backdrop { display: none; }
body.reproduciendo .cabecera,
body.reproduciendo .pie { display: none; }

.reproductor {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.reproductor video {
  width: 100%;
  max-height: 100vh;
  background: #000;
}

.volver {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radio);
  background: rgba(var(--vidrio), 0.6);
  border: 1px solid rgba(87, 87, 87, 0.3);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.volver:hover { background: rgb(var(--acento)); color: #121212; }

/* La tarjeta flotante de «seguir donde lo dejaste», con el mismo cristal que
   los diálogos del tema original (esquinas de 24px). */
.reanudar {
  position: fixed;
  right: 24px;
  bottom: 110px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radio-grande);
  background: rgba(var(--vidrio), 0.8);
  border: 1px solid var(--borde-vidrio);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.reanudar p { font-weight: 500; }
.reanudar .boton { padding: 0.55em 1.2em; font-size: 0.92rem; }

.aviso-sin-cuenta {
  position: fixed;
  left: 50%;
  top: 62px;                 /* bajo el título: abajo chocaría con la barra */
  transform: translateX(-50%);
  z-index: 5;
  padding: 0.5em 1.1em;
  border-radius: var(--pastilla);
  background: rgba(var(--vidrio), 0.7);
  border: 1px solid rgba(87, 87, 87, 0.25);
  color: var(--texto-mudo);
  font-size: 0.85rem;
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.aviso-sin-cuenta a { color: var(--texto); text-decoration: underline; text-underline-offset: 3px; }

/* 10. CUENTA */

.caja-cuenta {
  max-width: 420px;
  margin: clamp(30px, 9vh, 90px) auto;
  padding: 34px 32px;
  border-radius: var(--radio-grande);
  background: rgba(var(--vidrio), 0.72);
  border: 1px solid var(--borde-vidrio);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
}

.caja-cuenta.centrada { text-align: center; }
.caja-cuenta h1 { font-size: 1.8rem; margin-bottom: 8px; }
.caja-cuenta form { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 18px; }
.caja-cuenta label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; color: var(--texto-tenue); }

.caja-cuenta input {
  padding: 0.75em 1em;
  border-radius: var(--radio);
  border: 1px solid rgba(87, 87, 87, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: var(--texto);
  font: inherit;
  transition: border-color 0.37s var(--suave), box-shadow 0.37s var(--suave);
}

.caja-cuenta input:focus {
  outline: none;
  border-color: rgb(var(--acento));
  box-shadow: 0 0 0 3px rgba(var(--acento), 0.12);
}

.caja-cuenta small { color: var(--texto-mudo); }
.caja-cuenta a { color: var(--texto); text-decoration: underline; text-underline-offset: 3px; }

.error {
  padding: 0.7em 1em;
  border-radius: var(--radio);
  background: rgba(249, 38, 114, 0.14);
  border: 1px solid rgba(249, 38, 114, 0.45);
  color: #ffd3e4;
  font-size: 0.92rem;
}

/* 11. PIE */

.pie {
  padding: 40px var(--margen) 50px;
  border-top: 1px solid rgba(87, 87, 87, 0.22);
  color: var(--texto-mudo);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 12. PANTALLAS ESTRECHAS */

@media (max-width: 860px) {
  .cabecera { flex-wrap: wrap; gap: 12px; }
  .marca, .acciones { flex: 1 1 auto; }
  .pastillas { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
  .buscador input { width: 6em; }
  .portada { padding-top: 30px; }
  .ficha { grid-template-columns: 1fr; }
  .ficha-cartel { max-width: 220px; }
  .tarjeta.ancha { flex-basis: 74vw; }
}

/* Quien haya pedido menos movimiento en su sistema no lo recibe. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .tarjeta:hover .lamina { transform: none; }
}

/* 13. CONTROLES PROPIOS DEL REPRODUCTOR
 *
 * La barra flotante de cristal del tema de referencia: separada de los bordes,
 * esquinas de 24px, sin fondo opaco. El <video> va sin `controls` nativos.
 */

.reproductor video { cursor: pointer; }

.titulo-obra {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: var(--texto-tenue);
  font-weight: 500;
  pointer-events: none;
  transition: opacity 0.37s var(--suave);
}

.controles {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 20px 10px;
  border-radius: var(--radio-grande);
  background: rgba(var(--vidrio), 0.72);
  border: 1px solid rgba(87, 87, 87, 0.28);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(var(--desenfoque-vidrio));
  -webkit-backdrop-filter: blur(var(--desenfoque-vidrio));
  transition: opacity 0.37s var(--suave), transform 0.37s var(--suave);
}

/* Se esconden mientras se reproduce y no hay ratón. Vuelven al mover el ratón,
   al enfocar con el teclado o al pausar. */
.reproductor.quieto .controles,
.reproductor.quieto .titulo-obra,
.reproductor.quieto .aviso-sin-cuenta,
.reproductor.quieto .volver {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.reproductor.quieto { cursor: none; }

.controles .linea { display: flex; align-items: center; gap: 14px; }
.controles .botonera { gap: 6px; }
.controles .separador { flex: 1 1 auto; }

.tiempo {
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  color: var(--texto-tenue);
  min-width: 4.2em;
  text-align: center;
}

.termina {
  margin-left: 14px;
  font-size: 0.86rem;
  color: var(--texto-mudo);
  white-space: nowrap;
}

/* Barra de posición */
.barra {
  position: relative;
  flex: 1 1 auto;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.barra::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--pastilla);
  background: rgba(var(--acento), 0.28);
}

.cargado, .visto {
  position: absolute;
  left: 0;
  height: 3px;
  border-radius: var(--pastilla);
}

.cargado { background: rgba(var(--acento), 0.35); width: 0; }
.visto { background: rgb(var(--acento)); width: 0; }

.tirador {
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: var(--pastilla);
  background: rgb(var(--acento));
  transform: translateY(-50%) scale(0.9);
  transition: transform 0.2s var(--rapido);
}

.barra:hover .tirador, .barra:focus-visible .tirador { transform: translateY(-50%) scale(1.25); }
.barra:focus-visible { outline: 2px solid rgb(var(--acento)); outline-offset: 4px; border-radius: 4px; }

/* Botones */
.icono {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radio);
  background: none;
  color: var(--texto);
  cursor: pointer;
  transition: background 0.37s var(--suave), color 0.37s var(--suave);
}

.icono:hover { background: rgba(0, 0, 0, 0.4); }
.icono.grande { width: 46px; height: 46px; }
.icono[aria-pressed="true"] { background: rgb(var(--acento)); color: #121212; }

.volumen {
  width: 90px;
  height: 3px;
  margin: 0 6px 0 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--pastilla);
  background: rgba(var(--acento), 0.3);
  cursor: pointer;
}

.volumen::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: var(--pastilla);
  background: rgb(var(--acento));
}

.volumen::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: var(--pastilla);
  background: rgb(var(--acento));
}

@media (max-width: 700px) {
  .controles { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px 8px; }
  .volumen, .termina, #pip { display: none; }
}
