/* ---------- Base ---------- */

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

/* BASIC PAGE BACKGROUND — smooth cinematic gradient (v1 style) */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Roboto", sans-serif;
  color: #f9fafb;
  background:
    radial-gradient(circle at 10% 0%, #1e293b 0, transparent 55%),
    radial-gradient(circle at 90% 100%, #020617 0, transparent 55%),
    #020617;
}



/* Optional overall page container if header/footer wrap it */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* --- Top header --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 14px 40px 8px;
  background: linear-gradient(
    to bottom,
    rgba(5, 10, 20, 0.92),
    rgba(5, 10, 20, 0.75),
    transparent
  );
  backdrop-filter: blur(16px);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}



/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}



.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e11d48, #fb923c);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.8);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f9fafb;
}

.brand-sub {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Simple top nav on the right */

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.85rem;
}

.top-nav a {
  text-decoration: none;
  color: #e5e7eb;
  opacity: 0.8;
}

.top-nav a:hover {
  opacity: 1;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Top-right language pills (EN, PT, AR) */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;

  padding: 0 10px;
  border-radius: 999px;

  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);

  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(248, 250, 252, 0.88);

  cursor: pointer;
  text-decoration: none;

  /* override old opacity */
  opacity: 1;

  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease;
}

.lang-btn:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(191, 219, 254, 0.9);
  color: #f9fafb;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.55);
}

/* Active language stands out in bright blue */
.lang-btn.active {
  background: linear-gradient(135deg, #3b82f6, #22c1c3);
  border-color: rgba(248, 250, 252, 0.9);
  color: #0b1120;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.7);
}



/* ---------- Hero Card ---------- */

/* MAIN CARD LAYOUT */
.hero-card {
  position: relative;
  max-width: 1200px;
  margin: 88px auto 72px;
  padding: 32px 40px;
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  background:
    radial-gradient(circle at top left, rgba(15,23,42,0.95), rgba(15,23,42,0.94)),
    radial-gradient(circle at bottom right, rgba(15,23,42,0.96), rgba(15,23,42,0.98));
  box-shadow:
    0 28px 80px rgba(0,0,0,0.85),
    0 0 0 1px rgba(148,163,184,0.15);
}

/* BLURRED HERO BACKGROUND INSIDE CARD */
.hero-bg {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  transform: scale(1.08);
  pointer-events: none;
  z-index: 0;
}

/* Dark overlay on top of blurred image to preserve text contrast */
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(15,23,42,0.92), rgba(15,23,42,0.6) 40%, rgba(15,23,42,0.2) 70%),
    radial-gradient(circle at bottom, rgba(15,23,42,0.7), transparent 60%);
  z-index: 1;
}

/* Ensure actual content sits above bg + overlay */
.hero-left,
.hero-right {
  position: relative;
  z-index: 2;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.hero-languages {
  margin-top: auto;     /* pushes it to the bottom of hero-left */
  padding-top: 20px;     /* spacing from content above */
  border-top: 1px solid rgba(148, 163, 184, 0.18); /* subtle divider */
}

/* ---------- Text & Meta ---------- */

.hero-kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9ca3af;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 3.1vw, 3.1rem);
  letter-spacing: -0.03em;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: #9ca3af;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.55);
}

.rating-star {
  color: #fbbf24;
  font-size: 0.9rem;
}

.rating-score {
  font-weight: 600;
  color: #e5e7eb;
}

.rating-count {
  color: #9ca3af;
}

.meta-item,
.dot {
  opacity: 0.9;
}

.hero-description {
  margin: 0 0 24px;
  max-width: 36rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #d1d5db;
}

/* ---------- Buttons ---------- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease,
    color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #22c1c3);
  color: #0b1120;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.7);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
}

.btn-icon {
  font-size: 1rem;
}

/* ---------- Subsections (Episodes, Languages, More) ---------- */

.hero-subsection {
  margin-top: 20px;
}

.subsection-header {
  margin-bottom: 8px;
}

.subsection-title {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
}

/* Episodes strip */
/* Episodes strip — 6 per row max, responsive */
.poster-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* up to 6 per row */
  gap: 16px;
  margin-top: 12px;

  /* Force max 6 per line */
  grid-auto-flow: row;
  grid-auto-columns: minmax(170px, 1fr);
}

@media (min-width: 1100px) {
  /* True 6-column layout on desktop */
  .poster-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Bigger cinematic episode thumbnails */
.episode-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background-color: #020617;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  overflow: hidden;

  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s ease,
              box-shadow 0.14s ease,
              filter 0.14s ease;
}

.episode-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85);
  filter: brightness(1.08);
}

.episode-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent 55%);
}

.episode-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e5e7eb;
}



/* Languages strip */

.language-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.lang-pill {
  padding: 0.42rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.82rem;                               /* a hair smaller */
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.7);                /* a bit softer */
  transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease,
              transform 0.08s ease, box-shadow 0.12s ease;
}

.lang-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.7);
}

/* Extra links */

.extra-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.extra-link {
  font-size: 0.9rem;
  color: #93c5fd;
  text-decoration: none;
}

.extra-link:hover {
  text-decoration: underline;
}

/* ---------- Poster side ---------- */

.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 2 / 3;
  border-radius: 32px;
  padding: 10px;
  background: radial-gradient(circle at top, #020617, #020617);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.8);
}

.poster-main {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.7);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-card {
    margin: 40px 16px 56px;
    padding: 32px 24px;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero-right {
    order: -1;
  }

  .poster-frame {
    margin: 0 auto;
  }

  .poster-strip {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .hero-card {
    margin: 24px 12px 40px;
    padding: 24px 18px;
    border-radius: 24px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .episode-thumb {
    flex: 0 0 60%;          /* bigger on small screens too */
    max-width: 60%;
  }
}


/* ---------- Episode page ---------- */

.episode-page {
  min-height: calc(100vh - 72px); /* adjust if your header height is different */
  padding: 96px 24px 40px;
  display: flex;
  justify-content: center;
}

.episode-container {
  width: 100%;
  max-width: 1000px; /* big & cinematic */
  margin: 0 auto;
}

.episode-header {
  margin-bottom: 16px;
}

.episode-series-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.episode-ep-title {
  margin: 4px 0 0;
  font-size: 1rem;
  opacity: 0.85;
}

/* BIG CENTERED PLAYER */
.episode-player-wrapper {
  margin-top: 16px;
}

.episode-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
}

.episode-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.episode-synopsis {
  margin-top: 18px;
  max-width: 70ch;
  font-size: 0.98rem;
  color: #e5e7eb;
}

/* NAV BUTTONS */
.episode-nav {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.episode-nav-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.episode-nav-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.episode-nav-btn:hover {
  border-color: #93c5fd;
  color: #f9fafb;
}

.episode-nav-primary {
  background: #f97316;
  border-color: #f97316;
  color: #0b1120;
}

.episode-nav-primary:hover {
  filter: brightness(1.05);
}

/* EXTRA LINKS */
.episode-extra {
  margin-top: 28px;
}

.episode-extra-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.episode-extra-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.episode-extra-link {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.85);
}

.episode-extra-link:hover {
  border-color: #93c5fd;
  color: #f9fafb;
}

/* MOBILE TWEAKS */
@media (max-width: 768px) {
  .episode-page {
    padding: 88px 16px 32px;
  }

  .episode-container {
    max-width: 100%;
  }
}

.rating-star-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

/* ---------- Trailer Overlay ---------- */

.trailer-overlay.hidden {
  display: none;
}

.trailer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-overlay-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.75);
}

.trailer-modal {
  position: relative;
  z-index: 10;
  max-width: 900px;
  width: 90%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.8);
}

.trailer-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.trailer-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer-close {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 20;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 0 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: opacity 0.2s ease;
}

.trailer-close:hover {
  opacity: 0.8;
}





