:root {
  --bg: #0b0b0d;
  --panel: #16161a;
  --muted: #a6a6ad;
  --text: #f6f6f7;
  --accent: #e50914;
  --border: rgba(255,255,255,.09);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 18px 4vw;
  background: linear-gradient(to bottom, rgba(0,0,0,.95), rgba(0,0,0,.65));
}
.brand { font-weight: 900; letter-spacing: .08em; color: var(--accent); }
.topbar nav { display: flex; gap: 18px; font-size: 14px; flex: 1; }
.top-actions { display: flex; gap: 16px; align-items: center; }
.hero {
  min-height: 62vh; display: flex; align-items: end;
  padding: 8vw 5vw 7vw;
  background:
    radial-gradient(circle at 70% 30%, rgba(229,9,20,.2), transparent 35%),
    linear-gradient(180deg, #17171c 0%, #0b0b0d 100%);
}
.hero-copy { max-width: 720px; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
h1 { font-size: clamp(34px, 6vw, 72px); margin: 12px 0 18px; line-height: 1.02; }
.hero p { font-size: 18px; color: #ddd; line-height: 1.6; }
.hero-actions, .movie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  border: 0; border-radius: 7px; padding: 12px 18px;
  background: rgba(255,255,255,.16); color: white; cursor: pointer;
}
.btn.primary { background: white; color: black; font-weight: 700; }
.rail-section, .page-shell, .movie-detail { padding: 24px 4vw 40px; }
.rail-section h2 { margin: 0 0 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 16vw); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.card { min-width: 0; }
.poster { aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; background: var(--panel); }
.placeholder { display: grid; place-items: center; color: var(--muted); border: 1px solid var(--border); }
.card h3 { font-size: 14px; margin: 8px 0; }
.page-shell { max-width: 1100px; margin: 0 auto; }
.page-shell h1, .movie-meta h1 { font-size: clamp(34px, 5vw, 58px); }
.empty-state { margin-top: 28px; padding: 32px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); }
.player-wrap { width: 100%; aspect-ratio: 16/9; background: black; }
.player-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-placeholder { aspect-ratio: 16/9; display: grid; place-items: center; background: #000; color: var(--muted); }
.movie-detail { padding-top: 0; }
.movie-meta { max-width: 1000px; margin: 28px auto; }
@media (max-width: 820px) {
  .topbar nav { display: none; }
  .topbar { gap: 14px; }
  .top-actions { margin-left: auto; }
  .rail { grid-auto-columns: 42vw; }
  .hero { min-height: 58vh; padding-top: 90px; }
}


/* ===== Destacado semanal / Billboard ===== */
.weekly-hero {
  position: relative;
  min-height: clamp(560px, 72vh, 820px);
  overflow: hidden;
  background: #111;
  isolation: isolate;
}
.weekly-hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 8vw 5vw 7vw;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity .65s ease, transform 1.1s ease, visibility .65s;
  background-size: cover;
  background-position: center 28%;
}
.weekly-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}
.weekly-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,5,7,.96) 0%, rgba(5,5,7,.78) 31%, rgba(5,5,7,.25) 62%, rgba(5,5,7,.12) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11,11,13,.65) 16%, transparent 45%);
}
.weekly-hero-content {
  width: min(690px, 88vw);
  padding-bottom: 28px;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.weekly-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  color: rgba(255,255,255,.82);
}
.weekly-badge::before {
  content: '★';
  color: var(--accent);
  font-size: 16px;
}
.weekly-hero h1 {
  margin: 12px 0 10px;
  max-width: 780px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .98;
  text-wrap: balance;
}
.weekly-meta {
  min-height: 20px;
  margin: 8px 0 14px;
  color: #ddd;
  font-size: 14px;
  font-weight: 700;
}
.weekly-hero p {
  max-width: 650px;
  margin: 0;
  color: #e5e5e5;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.btn.info { background: rgba(109,109,110,.72); }
.hero-arrow {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 46px;
  height: 76px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: rgba(0,0,0,.34);
  font-size: 52px;
  line-height: 1;
  opacity: .3;
  cursor: pointer;
  transition: opacity .2s, background .2s;
}
.weekly-hero:hover .hero-arrow,
.hero-arrow:focus-visible { opacity: .95; }
.hero-arrow:hover { background: rgba(0,0,0,.65); }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }
.hero-dots {
  position: absolute;
  z-index: 9;
  right: 4vw;
  bottom: 4.2vw;
  display: flex;
  gap: 7px;
}
.hero-dot {
  width: 24px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.hero-dot.is-active { background: #fff; }
.first-rail { position: relative; z-index: 10; margin-top: -24px; }

@media (max-width: 820px) {
  .weekly-hero { min-height: 70vh; }
  .weekly-hero-slide {
    padding: 110px 5vw 78px;
    align-items: flex-end;
    background-position: center top;
  }
  .weekly-hero-shade {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(11,11,13,.86) 31%, rgba(11,11,13,.25) 68%, rgba(11,11,13,.25) 100%),
      linear-gradient(90deg, rgba(0,0,0,.5), transparent);
  }
  .weekly-hero h1 { font-size: clamp(38px, 12vw, 58px); }
  .weekly-hero p { max-height: 6.8em; overflow: hidden; }
  .hero-arrow { width: 34px; height: 58px; font-size: 42px; opacity: .7; }
  .hero-prev { left: 6px; }
  .hero-next { right: 6px; }
  .hero-dots { bottom: 26px; right: 5vw; }
  .weekly-hero .hero-actions .btn.info { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .weekly-hero-slide { transition: none; }
}


/* ===== Catálogo real ===== */
.catalog-page {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 42px 4vw 80px;
}
.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.catalog-heading h1 { margin-bottom: 10px; }
.catalog-heading p { margin: 0; color: var(--muted); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 24px 14px;
}
.movie-card {
  min-width: 0;
  transition: transform .2s ease;
}
.movie-card:hover { transform: translateY(-4px); }
.movie-card-link { display: block; }
.movie-card-poster {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 9px;
  overflow: hidden;
  background: #17171b;
  border: 1px solid var(--border);
}
.movie-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.movie-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 36px;
  color: #666;
}
.movie-card-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: rgba(255,255,255,.94);
  opacity: 0;
  transform: scale(.85);
  transition: opacity .18s, transform .18s;
}
.movie-card:hover .movie-card-play {
  opacity: 1;
  transform: scale(1);
}
.movie-card-body { padding: 9px 2px 0; }
.movie-card h3 {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-card-meta {
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 18vw);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 5px 2px 17px;
  scrollbar-width: thin;
}
.rail-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.rail-title h2 { margin: 0; }
.rail-title a { color: var(--muted); font-size: 13px; }
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 42px;
}
.page-btn {
  padding: 10px 14px;
  border-radius: 7px;
  background: #242429;
}
.page-status { color: var(--muted); font-size: 13px; }

.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 32px;
}
.genre-chip {
  padding: 9px 13px;
  border-radius: 999px;
  background: #1c1c21;
  border: 1px solid var(--border);
  font-size: 13px;
}
.genre-chip span { color: var(--muted); margin-left: 5px; }
.genre-chip:hover, .genre-chip.is-active {
  background: #f2f2f2;
  color: #111;
}
.genre-chip.is-active span { color: #555; }
.category-result-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.category-result-head h2 { margin: 0; }
.category-result-head span { color: var(--muted); font-size: 13px; }

/* ===== Ficha / cine ===== */
.movie-cinema {
  position: relative;
  min-height: calc(100vh - 70px);
  padding-bottom: 70px;
  overflow: hidden;
}
.movie-backdrop {
  position: absolute;
  inset: 0 0 auto 0;
  height: 68vh;
  background-size: cover;
  background-position: center 25%;
  opacity: .28;
  filter: blur(2px);
  transform: scale(1.02);
}
.movie-backdrop-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(11,11,13,.5) 42%, rgba(11,11,13,.18) 100%),
    linear-gradient(90deg, rgba(0,0,0,.45), transparent 70%);
}
.movie-player-shell {
  position: relative;
  z-index: 2;
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding-top: 34px;
}
.movie-player-shell .player-wrap,
.movie-player-shell .player-placeholder {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.movie-info-panel {
  position: relative;
  z-index: 2;
  width: min(1100px, 92vw);
  margin: 30px auto 0;
}
.movie-info-main h1 {
  margin: 10px 0 10px;
  font-size: clamp(36px, 5vw, 68px);
}
.movie-detail-meta {
  color: #d0d0d4;
  font-size: 14px;
  font-weight: 700;
}
.movie-description {
  max-width: 850px;
  margin-top: 24px;
  color: #d7d7da;
  font-size: 16px;
  line-height: 1.65;
}

@media (max-width: 820px) {
  .catalog-page { padding-top: 26px; }
  .catalog-heading { align-items: flex-start; flex-direction: column; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 9px; }
  .movie-rail { grid-auto-columns: 68vw; }
  .movie-card-play { opacity: .9; width: 36px; height: 36px; }
  .movie-player-shell { width: 100%; padding-top: 0; }
  .movie-player-shell .player-wrap,
  .movie-player-shell .player-placeholder { border-radius: 0; }
  .movie-info-panel { width: 92vw; }
}
