/* ================= CUSTOM FONTS — HBOMaxSans ================= */
@import url('fonts/hbomaxsans/hbomaxsans.css');

/* SATV base UI (Vidstack themed by your external 1.css + 2.css) */
:root {
  --bg: #0b0c10;
  --panel: #12131a;
  --panel2: #171926;
  --text: #f3f4f6;
  --muted: #a0a3b1;
  --red: #2563eb;
  --line: rgba(255, 255, 255, .10);
  --shadow: 0 18px 55px rgba(0, 0, 0, .55);
  --radius: 16px;
  --radius2: 22px;

  /* carousel tuning */
  --edge-fade: 120px;
  /* cuánto “se pierde” por los bordes */
  --arrow-w: 48px;
  --arrow-h: 92px;
}

* {
  box-sizing: border-box;
  font-family: "HBOMaxSans" !important;
}

#continue-row .card {
  height: 14.6em !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  margin: 0 auto;
  padding: 18px;
  width: 100%;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* ================= NAV ================= */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 12, 16, .72);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px #2563eb63;
}

.navlink {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
}

.navlink:hover {
  border-color: var(--line);
  color: var(--text);
}

.navlink.active {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ================= BUTTONS ================= */

.btn {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn.ghost {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
}

.btn:active {
  transform: scale(0.5);
}

.pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

/* ================= HERO ================= */

.hero {
  margin-top: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero h1 {
  margin: 0 0 6px 0;
  font-size: 28px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

/* ================= SECTIONS ================= */

.section {
  margin-top: 18px;
  width: 100%;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px 78px;
}

.section-title {
  font-size: 16px;
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.panel {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* =========================================================
   ✅ CAROUSEL WRAPPER (NECESARIO PARA FLECHAS + FADE)
   ========================================================= */

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* “no se limite a bordes” visualmente => se pierde con fade */
}

/* fade edges */
.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  width: var(--edge-fade);
  height: 100%;
  pointer-events: none;
  z-index: 8;
}

.carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), rgba(11, 12, 16, 0));
}

.carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), rgba(11, 12, 16, 0));
}

/* arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--arrow-w);
  height: var(--arrow-h);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.4s ease;
  z-index: 10;
  opacity: 0;
}

.carousel:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, .85);
  transform: scale(1.06);
  transform: translateY(-50%);
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}

.carousel-btn svg {
  width: 22px;
  height: 22px;
}

/* =========================================================
   ROWS + CARDS (tu base, con ajuste para flechas/fade)
   ========================================================= */

.row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;

  padding: 6px 0;

  scroll-snap-type: x mandatory;
  scroll-padding-left: calc(var(--arrow-w) + 28px);
  scroll-padding-right: calc(var(--arrow-w) + 28px);

  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.row .card:first-child {
  margin-left: calc(var(--arrow-w) + 28px);
}

.row .card:last-child {
  margin-right: calc(var(--arrow-w) + 28px);
}

/* scrollbar hidden */
.row::-webkit-scrollbar {
  display: none;
}

.row {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.card {
  width: 298px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: 18em !important;
  padding-bottom: 0.4em;
}

#continue-row .card {
  height: 14em;
}

.card:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, .06);
}

/* 🔥 16:9 REAL SIN ALTURA FIJA */
.thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f1118;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* 🔥 TEXTO CRECE NATURALMENTE */
.card-title {
  padding: 10px 10px 2px 10px;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.3;
  word-break: break-word;
}

.card-subtitle {
  padding: 0 10px 10px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  word-break: break-word;
}

/* 🔥 PROGRESSBAR EXACTAMENTE EN TU POSICIÓN */
.progressbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -3.6em;
  height: 0.25em;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.3em;
  overflow: hidden;
}

.progressfill {
  height: 100%;
  width: 30%;
  border-radius: inherit;
  transition: width .25s ease;

  /* Color base */
  background: linear-gradient(90deg, #00eaff, #2563eb);

  /* Glow neón fuerte pero elegante */
  box-shadow:
    0 0 4px #00eaff,
    0 0 8px #00eaff,
    0 0 16px #2563eb,
    0 0 24px #2563eb;
}

/* ================= FORMS ================= */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 920px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(0, 0, 0, .25);
  color: var(--text);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ================= PLAYER ================= */

.video-wrap {
  height: 64.5em;
  position: relative;
  /* Para asegurar que los controles estén en la capa correcta */
}

media-player {
  display: block;
  /* Asegura que el reproductor esté visible */
  width: 100%;
  background: black;
  /* Fondo negro para el reproductor */
  height: 100%;
  /* Ajuste de altura */
}

/* ================= EPISODES ================= */

.ep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.ep {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: 14px;
  padding: 10px 12px;
}

.ep.active {
  border-color: rgba(229, 9, 20, .65);
  background: rgba(229, 9, 20, .10);
}

.ep-title {
  font-weight: 900;
  font-size: 13px;
}

/* ================= TOASTS ================= */

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.toast {
  opacity: 0;
  transition: all .18s ease;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
  color: var(--text);
  max-width: 360px;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
}

.toast.success {
  border-color: rgba(0, 200, 120, .35);
}

.toast.error {
  border-color: rgba(255, 80, 80, .35);
}

.toast.info {
  border-color: rgba(120, 160, 255, .35);
}

/* ================= TABLES ================= */

.hr {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 12px 0;
}

.carousel-disabled::before,
.carousel-disabled::after {
  display: none !important;
}

.carousel-disabled .row {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.carousel-disabled .row {
  padding: 6px 0 !important;
}

/* =========================================================
   🔥 CUSTOM DROPDOWN
   ========================================================= */

.dropdown {
  position: relative;
  width: 100%;
  user-select: none;
}

/* Caja principal */
.dropdown-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
  cursor: pointer;

  transition: border .2s ease, background .2s ease;
}

.dropdown-selected:hover {
  background: rgba(255, 255, 255, .04);
}

.dropdown.open .dropdown-selected {
  border-color: rgba(229, 9, 20, .6);
  background: rgba(255, 255, 255, .06);
}

/* Texto */
.dropdown-text {
  font-size: 14px;
  color: var(--text);
}

/* Flecha */
.dropdown-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;

  transition: transform .25s ease, opacity .25s ease;
  opacity: .7;
}

.dropdown-arrow svg {
  width: 18px;
  height: 18px;
}

.dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* Opciones */
.dropdown-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;

  overflow: hidden;
  z-index: 30;

  max-height: 260px;
  overflow-y: auto;

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;

  transition: opacity .18s ease, transform .18s ease;
}

.dropdown.open .dropdown-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Scroll interno elegante */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 6px;
}

/* Cada opción */
.dropdown-option {
  padding: 12px;
  cursor: pointer;
  transition: background .15s ease;
  font-size: 14px;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, .06);
}

/* Separación visual si querés en el futuro */
.dropdown-option+.dropdown-option {
  border-top: 1px solid rgba(255, 255, 255, .05);
}