
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --soft: #f4f4f5;
  --ink: #18181b;
  --muted: #71717a;
  --dim: #a1a1aa;
  --border: #e4e4e7;
  --accent: var(--nu-accent, #fe4a23);
  --accent-hover: var(--nu-accent-hover, #e43d1a);
  --radius: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--nu-font-sans, 'Urbanist', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

b, strong, h1, h2, h3, h4 { font-weight: 400; margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

a:focus, button:focus, input:focus, [tabindex]:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Barra superior ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center;
  height: 64px; padding: 0 32px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; width: 100%; }
.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; }
.brand .tag { color: var(--accent); font-size: 14px; margin-left: 10px; letter-spacing: .02em; }
.spacer { flex: 1 1 auto; }
.nav-user { color: var(--muted); font-size: 15px; margin-right: 14px; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 400; font-size: 16px;
  color: #fff; background: var(--accent);
  padding: 11px 22px; border-radius: var(--radius); line-height: 1;
}
.btn:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--ink); background: var(--soft); border: 1px solid var(--border); }
.btn-ghost:hover { background: #ececee; }
.btn-light { color: var(--ink); background: #fff; }
.btn-light:hover { background: #f1f1f2; }
.btn-outline { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.22); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---- Hero (banner redondeado de color sobre página clara) ---- */
.hero {
  position: relative; overflow: hidden;
  margin: 28px 32px 8px; border-radius: var(--radius-lg);
  min-height: 360px; display: flex; align-items: flex-end;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.05) 70%); }
.hero-content { position: relative; padding: 44px 44px 40px; max-width: 640px; }
.hero-eyebrow { color: #fff; opacity: .9; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.hero-title { color: #fff; font-size: 40px; line-height: 1.1; margin-bottom: 14px; }
.hero-desc { color: #fff; opacity: .88; font-size: 17px; margin-bottom: 22px; max-width: 520px; }
.hero-actions a { margin-right: 10px; }

/* ---- Filas de catálogo ---- */
.rows { padding: 22px 0 40px; }
.row { margin: 0 0 34px; }
.row-label { color: var(--ink); font-size: 20px; padding: 0 32px; margin-bottom: 14px; }
.row-track { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: 6px 32px 10px; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.row-track::-webkit-scrollbar { height: 0; }

/* ---- Tarjeta (carátula 2:3) ---- */
.card { flex: 0 0 auto; width: 168px; margin-right: 16px; }
.card:last-child { margin-right: 32px; }
.card-poster {
  position: relative; width: 100%; padding-bottom: 150%;
  border-radius: var(--radius); overflow: hidden; background: var(--soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-poster .img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-poster .scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,0) 55%); }
.card-poster .pt { position: absolute; left: 12px; right: 12px; bottom: 12px; font-size: 16px; color: #fff; line-height: 1.2; }
.card-poster .corner { position: absolute; top: 10px; left: 10px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.35); padding: 3px 8px; border-radius: 6px; }
.card:hover .card-poster, .card:focus .card-poster, .card:focus-within .card-poster {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(24,24,27,.18), 0 0 0 2px var(--accent);
}
.card-meta { padding: 8px 2px 0; }
.card-name { font-size: 14px; color: var(--ink); }
.card-sub { font-size: 12px; color: var(--dim); }

/* ---- Ficha de título ---- */
.detail-backdrop {
  position: relative; overflow: hidden;
  margin: 28px 32px 0; border-radius: var(--radius-lg);
  min-height: 300px; display: flex; align-items: flex-end;
}
.detail-backdrop .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-backdrop .fade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,.05) 70%); }
.detail-backdrop .dtitle { position: relative; color: #fff; font-size: 34px; padding: 36px 40px; }
.detail-body { padding: 24px 40px 72px; max-width: 820px; }
.meta-line { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.meta-line .sep { color: var(--dim); margin: 0 8px; }
.meta-line .chip { color: var(--accent); }
.desc { color: #3f3f46; font-size: 17px; max-width: 640px; margin-bottom: 24px; }
.detail-actions { margin-bottom: 32px; }
.detail-actions a { margin-right: 10px; }

.episodes { border-top: 1px solid var(--border); }
.episode { display: flex; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.episode:hover, .episode:focus-within { background: var(--soft); }
.ep-num { width: 36px; color: var(--dim); font-size: 18px; }
.ep-info { flex: 1 1 auto; }
.ep-name { font-size: 17px; color: var(--ink); }
.ep-desc { font-size: 14px; color: var(--dim); }
.ep-dur { color: var(--muted); font-size: 14px; margin: 0 18px; }

/* ---- Reproductor ---- */
.player { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.player video { width: 100%; height: 100%; background: #000; }
.player-back { position: fixed; top: 18px; left: 18px; z-index: 10; }

/* ---- Login + QR ---- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 40px; box-shadow: 0 20px 60px rgba(24,24,27,.06); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 6px; }
.auth-logo img { height: 30px; }
.auth-sub { color: var(--muted); text-align: center; font-size: 14px; margin-bottom: 30px; }
.auth-cols { display: flex; flex-wrap: wrap; }
.auth-col { flex: 1 1 300px; padding: 8px 18px; }
.auth-col + .auth-col { border-left: 1px solid var(--border); }
.auth-h { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.qr-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; width: 220px; margin: 0 auto 16px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-hint { color: var(--muted); font-size: 14px; text-align: center; }
.qr-code { text-align: center; margin: 8px 0 4px; }
.qr-code b { display: inline-block; font-size: 26px; letter-spacing: .22em; color: var(--ink); padding: 6px 4px; }
.qr-status { text-align: center; color: var(--dim); font-size: 13px; margin-top: 8px; min-height: 18px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; font-family: inherit; font-weight: 400; font-size: 16px;
  color: var(--ink); background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.field input:focus { border-color: var(--accent); outline: none; }
.auth .btn { width: 100%; text-align: center; padding: 13px; margin-top: 6px; }
.error { background: #fee; color: #b42318; border: 1px solid #fbcfca; border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
.ok { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; border-radius: var(--radius); padding: 12px 14px; font-size: 15px; margin-bottom: 18px; text-align: center; }

.empty { color: var(--muted); padding: 40px 32px; font-size: 16px; }
.empty a { color: var(--accent); }
.foot { padding: 8px 32px 40px; }
#footer-container { padding-top: 12px; }

@media (max-width: 760px) {
  .nav { padding: 0 18px; }
  .hero { margin: 18px 16px 6px; }
  .hero-content, .detail-body { padding-left: 22px; padding-right: 22px; }
  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 15px; }
  .detail-backdrop { margin: 18px 16px 0; }
  .detail-backdrop .dtitle { font-size: 26px; }
  .row-label, .row-track, .foot, .empty { padding-left: 18px; padding-right: 18px; }
  .card { width: 132px; }
  .auth-card { padding: 28px 20px; }
  .auth-col + .auth-col { border-left: 0; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 22px; }
}

@media (min-width: 1500px) {
  .hero-title { font-size: 52px; }
  .card { width: 196px; }
  .row-label { font-size: 24px; }
}
