/* =========================================================
   Movieteros — "Premiere Red" design system
   ---------------------------------------------------------
   Ide      : ruang bioskop nyaris hitam pekat dengan SATU aksen warna
              — merah tegas ala layar pemutaran premier. Sengaja nyaris
              monokrom (hitam + merah + putih gading) supaya aksen merah
              selalu terasa bertujuan, bukan dekorasi acak.
   Palet    : Near-black #0b0708 · Curtain #1a1013 · Balcony #271620
              Crimson #f51212 · Crimson-deep #5a0707 (jadi warna atmosfer
              juga — tidak ada ungu/plum lagi, murni hitam+merah)
              Rust #c1652f (KHUSUS aksi hapus/danger, sengaja beda dari
              merah brand supaya tetap kebaca sebagai peringatan)
              Ivory #f4efe6
   Tipografi: Bricolage Grotesque (display/judul — grotesque modern dengan
              lekuk khas di huruf "a/g/y", sengaja bukan Inter/Manrope/
              Poppins yang dipakai di mana-mana)
              Plus Jakarta Sans (teks & UI — tetap jelas di ukuran kecil,
              karakter geometriknya cuma sedikit lebih hangat dari Inter)
   Ubah warna / font cukup dari blok :root di bawah.
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #0b0708;
  --bg-rgb: 11, 7, 8;
  --bg-soft: #130c0e;
  --surface: #1a1013;
  --surface-2: #271620;
  --line: rgba(196, 150, 162, 0.12);
  --line-strong: rgba(196, 150, 162, 0.28);

  --crimson: #f51212;
  --crimson-hi: #f33f3f;
  --crimson-btn: #e10909; /* gradien tombol/badge berteks — cukup gelap agar teks ivory tetap AA-safe */
  --crimson-deep: #5a0707;
  --crimson-rgb: 245, 18, 18;
  --crimson-deep-rgb: 90, 7, 7; /* dipakai utk glow atmosfer — menggantikan "plum", supaya benar2 cuma hitam+merah */
  --rust: #c1652f;
  --rust-rgb: 193, 101, 47;
  --wa: #25d366;

  --ivory: #f4efe6;
  --muted: #b3a2a8;
  --muted-2: #907e85;

  /* Warna cahaya dinamis (diisi JS dari backdrop film) */
  --amb-rgb: 120, 30, 55;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-hero: 28px;
  --r-card: 22px;
  --r-poster: 14px;

  --topbar-h: 58px;
  --nav-h: 64px;
  --nav-gap: 12px;
  --sidebar-w: 96px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.5, 0.64, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* {
  margin: 0;
  padding: 0;
  /* Hilangkan highlight biru bawaan browser saat tap di mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Elemen interaktif: tanpa overlay biru, feedback tekan lewat scale/opacity */
a, button, .card, .sb-link, .bn-link, .server-tab, .btn, input {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
input { -webkit-user-select: text; user-select: text; }
a:active, button:active { outline: none; }

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

::selection { background: var(--crimson); color: var(--ivory); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

/* ---------- Cahaya latar + grain film (statis, murah untuk GPU) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90% 55% at 8% -8%, rgba(var(--crimson-deep-rgb), 0.30), transparent 62%),
    radial-gradient(70% 45% at 100% 0%, rgba(var(--crimson-rgb), 0.10), transparent 60%),
    radial-gradient(60% 40% at 50% 112%, rgba(var(--crimson-deep-rgb), 0.16), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background-image:
    radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.26) 100%),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  background-size: 100% 100%, 180px 180px;
}

/* ---------- Icons ---------- */
.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex: none;
}
.icon-sm { width: 16px; height: 16px; }
.icon-play { fill: currentColor; }

/* ---------- Brand ∞ (logo = loader) ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px;
  height: auto;
  flex: none;
  overflow: visible;
  filter: drop-shadow(0 0 8px rgba(var(--crimson-rgb), 0.4));
}
.brand-mark path,
.info-mark path,
.loader-mark path {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark-base { transition: opacity 0.35s ease; }
.mark-trace {
  stroke: #fff3f0;
  opacity: 0;
  stroke-dasharray: 14 86;
  stroke-dashoffset: 0;
  transition: opacity 0.3s ease;
}
/* Foto bulat di dalam cincin (menggantikan segitiga play) */
.mark-photo { pointer-events: none; }
/* Saat ada request berjalan, garis terang berlari mengitari ∞ */
body.is-loading .brand-mark .mark-base { opacity: 0.35; }
body.is-loading .brand-mark .mark-trace { opacity: 1; animation: trace 1.3s linear infinite; }
@keyframes trace { to { stroke-dashoffset: -100; } }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.005em;
  color: var(--ivory);
  white-space: nowrap;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 20px 0;
  background: rgba(var(--bg-rgb), 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}

.topbar-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(39, 22, 32, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  height: 40px;
  width: min(360px, 42vw);
  color: var(--muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.topbar-search:focus-within {
  border-color: rgba(var(--crimson-rgb), 0.6);
  box-shadow: 0 0 0 4px rgba(var(--crimson-rgb), 0.14);
}
.topbar-search input {
  background: transparent;
  border: none;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
}
.topbar-search input::placeholder { color: var(--muted-2); }
.topbar-search input:focus { outline: none; }

@media (max-width: 720px) {
  .topbar-search { display: none; }
}

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.main {
  flex: 1;
  min-width: 0;
  padding-bottom: calc(var(--nav-h) + var(--nav-gap) + var(--safe-bottom) + 30px);
}

/* ---------- Sidebar kanan (desktop) ---------- */
.sidebar { display: none; }

.nav-glide {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 5);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(var(--crimson-rgb), 0.24), rgba(var(--crimson-rgb), 0.08));
  box-shadow: inset 0 0 0 1px rgba(var(--crimson-rgb), 0.4), 0 0 24px -6px rgba(var(--crimson-rgb), 0.55);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 0.5s var(--ease-spring), opacity 0.25s ease;
  pointer-events: none;
}
.is-idle > .nav-glide { opacity: 0; }
.no-glide .nav-glide { transition: none; }

/* ---------- Bottom nav (mobile): kaca melayang + indikator meluncur ---------- */
.bottomnav {
  position: fixed;
  z-index: 45;
  left: 12px;
  right: 12px;
  max-width: 520px;
  margin: 0 auto;
  bottom: calc(var(--nav-gap) + var(--safe-bottom));
  height: var(--nav-h);
  padding: 6px;
  display: flex;
  border-radius: 24px;
  background: rgba(26, 16, 19, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.bn-link {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}
.bn-link .icon { transition: transform 0.4s var(--ease-spring); }
.bn-link.active { color: var(--crimson); }
.bn-link.active .icon { transform: translateY(-1px) scale(1.1); }
.bn-link:active .icon { transform: scale(0.9); }

@media (min-width: 900px) {
  .bottomnav { display: none; }

  .app-shell { flex-direction: row-reverse; } /* sidebar di sisi kanan */
  .main { padding-bottom: 56px; }

  .sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--sidebar-w);
    padding: 22px 0;
    background: rgba(11, 15, 38, 0.6);
    border-left: 1px solid var(--line);
    position: sticky;
    top: calc(var(--topbar-h) + var(--safe-top));
    height: calc(100vh - var(--topbar-h) - var(--safe-top));
  }
  .sb-links { position: relative; width: 100%; padding: 0 8px; }
  .sb-links .nav-glide {
    top: 0;
    bottom: auto;
    left: 8px;
    right: 8px;
    width: auto;
    height: 66px;
    transform: translateY(calc(var(--i, 0) * 100%));
  }
  .sb-link {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 66px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 600;
    transition: color 0.25s ease;
  }
  .sb-link.active { color: var(--crimson); }
}
@media (min-width: 900px) and (hover: hover) {
  .sb-link:not(.active):hover { color: var(--ivory); }
}

/* ---------- Views ---------- */
.view { display: none; padding: 0 20px 40px; }
.view.active { display: block; animation: viewIn 0.32s var(--ease-out) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 900px) {
  .view { max-width: 1320px; margin-inline: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(180deg, var(--crimson-btn), var(--crimson-deep));
  color: var(--ivory);
  box-shadow: 0 10px 26px -10px rgba(var(--crimson-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--ivory);
}
@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(var(--crimson-rgb), 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
}

/* =========================================================
   HERO — momen utama: cahaya dari poster, Ken Burns pelan,
   judul "fokus tarik" (rack focus), progres ala story.
   ========================================================= */
.hero,
.hero-skeleton {
  position: relative;
  margin: 0 -20px;
  height: clamp(440px, 72vh, 620px);
  height: clamp(440px, 72svh, 620px);
}
.hero-skeleton.skeleton { border-radius: 0; }

.hero {
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
}

.hero-bg {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center 20%;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform, opacity;
}
.hero-bg.kb { animation: kenburns calc(var(--hero-ms, 6500ms) + 1600ms) ease-out forwards; }
@keyframes kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.13) translate3d(-1.5%, -1%, 0); }
}

/* Cahaya berwarna dari poster (warna diganti lewat --amb-rgb) */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: rgb(var(--amb-rgb));
  -webkit-mask-image: radial-gradient(95% 75% at 0% 100%, #000 0%, transparent 70%);
  mask-image: radial-gradient(95% 75% at 0% 100%, #000 0%, transparent 70%);
  opacity: 0.5;
  transition: background-color 0.9s ease;
}

.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg,
    var(--bg) 0%,
    rgba(var(--bg-rgb), 0.94) 20%,
    rgba(var(--bg-rgb), 0.6) 46%,
    rgba(var(--bg-rgb), 0.12) 72%,
    rgba(var(--bg-rgb), 0.5) 100%);
}

.hero-badge {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 600;
  color: var(--ivory);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crimson);
  animation: pulse 2s ease-out 3;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 92, 122, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(255, 92, 122, 0); }
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 20px 48px;
}
.hero-content > * { animation: rise 0.7s var(--ease-out) both; }
.hero-title { animation-name: focusPull; animation-duration: 0.95s; }
.hero-meta { animation-delay: 0.12s; }
.hero-desc { animation-delay: 0.2s; }
.hero-actions { animation-delay: 0.28s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes focusPull {
  from { opacity: 0; filter: blur(12px); transform: translateY(10px) scale(1.03); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.8vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-title.is-long { font-size: clamp(19px, 5.2vw, 36px); line-height: 1.16; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ivory);
}
.chip-rating { color: var(--crimson); border-color: rgba(var(--crimson-rgb), 0.4); background: rgba(var(--crimson-rgb), 0.14); }
.chip .icon { width: 13px; height: 13px; }
.chip-rating .icon { fill: currentColor; }
.chip-type { text-transform: capitalize; }

.hero-desc {
  color: rgba(244, 239, 230, 0.78);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 54ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Segmen progres: garis yang terisi = penghitung waktu slide berikutnya */
.hero-dots {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 6px;
}
.hero-dot { position: relative; flex: 1; height: 22px; }
.hero-dot::before,
.hero-dot i {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}
.hero-dot::before { background: rgba(255, 255, 255, 0.22); }
.hero-dot i {
  background: var(--ivory);
  transform: scaleX(0);
  transform-origin: left center;
}
.hero-dot.done i { transform: scaleX(1); }
.hero-dot.active i { animation: heroFill var(--hero-ms, 6500ms) linear forwards; }
@keyframes heroFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (min-width: 900px) {
  .hero, .hero-skeleton { margin: 20px 0 8px; height: clamp(440px, 58vh, 580px); }
  .hero { border-radius: var(--r-hero); border: 1px solid var(--line); }
  .hero-skeleton.skeleton { border-radius: var(--r-hero); }
  .hero-shade {
    background:
      linear-gradient(0deg, rgba(var(--bg-rgb), 0.96) 0%, rgba(var(--bg-rgb), 0.55) 45%, rgba(var(--bg-rgb), 0.05) 75%),
      linear-gradient(90deg, rgba(var(--bg-rgb), 0.8) 0%, rgba(var(--bg-rgb), 0.2) 55%, transparent 80%);
  }
  .hero-badge { top: 24px; left: 44px; }
  .hero-content { padding: 0 44px 66px; max-width: 740px; }
  .hero-dots { left: 44px; right: auto; width: 340px; bottom: 30px; }
}

/* ---------- Section header ---------- */
.section { margin: 30px 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.page-head { margin-top: 22px; }
.section-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-ico {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--crimson);
  background: linear-gradient(180deg, rgba(var(--crimson-rgb), 0.18), rgba(var(--crimson-rgb), 0.06));
  box-shadow: inset 0 0 0 1px rgba(var(--crimson-rgb), 0.3);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.section-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
@media (min-width: 900px) {
  .section-title { font-size: 20px; }
  .section-ico { width: 34px; height: 34px; }
}

/* ---------- Row (scroll horizontal) & Grid ---------- */
.row-scroll {
  --card-w: clamp(132px, 38vw, 176px);
  display: flex;
  gap: 14px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 4px 20px 16px;
  scroll-padding-inline: 20px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.row-scroll::-webkit-scrollbar { height: 6px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
@media (hover: none) {
  .row-scroll { scrollbar-width: none; }
  .row-scroll::-webkit-scrollbar { display: none; }
}
@media (min-width: 900px) { .row-scroll { gap: 18px; } }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 22px 14px;
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; } }

/* ---------- Kartu poster ---------- */
.card {
  scroll-snap-align: start;
  flex: 0 0 var(--card-w, 148px);
  cursor: pointer;
  position: relative;
  min-width: 0;
}
.grid .card { flex: none; width: auto; }

.card-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-poster);
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 12px 26px -16px rgba(0, 0, 0, 0.9);
  transition: transform 0.22s var(--ease-out), box-shadow 0.25s ease;
}
.card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
}
.card-frame img.is-in { opacity: 1; }
/* Jaring pengaman: kalau event load tidak pernah datang, poster tetap muncul */
.card-frame img:not(.is-in) { animation: showLate 0.01s 3s forwards; }
@keyframes showLate { to { opacity: 1; } }

/* Kilau cahaya menyapu poster saat disorot / ditekan */
.card-frame::after {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.24) 50%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 0.8s var(--ease-out);
}
.card:active .card-frame::after { transform: translateX(130%); }

.card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.78);
  box-shadow: inset 0 0 0 1px rgba(var(--crimson-rgb), 0.45);
  color: var(--crimson);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: normal;
}
.card-rating .icon { fill: currentColor; stroke-width: 1.2; }

.card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(var(--bg-rgb), 0.55), rgba(var(--bg-rgb), 0.05));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card-play .icon {
  width: 46px;
  height: 46px;
  padding: 13px 11px 13px 15px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--crimson-btn), var(--crimson-deep));
  color: var(--ivory);
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
  box-shadow: 0 10px 28px -6px rgba(var(--crimson-rgb), 0.65);
}

@media (hover: hover) {
  .card-play { display: flex; }
  /* Pratinjau membesar ala Netflix: jeda sesaat dulu (biar tidak "kedip"
     saat kursor cuma lewat), baru poster membesar + naik di atas tetangganya. */
  .card { transition: z-index 0s 0.22s; }
  .card:hover {
    z-index: 8;
    transition: z-index 0s;
  }
  .card:hover .card-frame {
    transform: scale(1.12) translateY(-6px);
    box-shadow: 0 0 0 1px rgba(var(--crimson-rgb), 0.6), 0 26px 46px -16px rgba(0, 0, 0, 0.95), 0 0 40px -6px rgba(var(--crimson-deep-rgb), 0.65);
    transition: transform 0.32s var(--ease-out) 0.4s, box-shadow 0.32s ease 0.4s;
  }
  .card:hover .card-frame img { transform: scale(1.06); transition-delay: 0.4s; }
  .card:hover .card-frame::after { transform: translateX(130%); transition-delay: 0.4s; }
  .card:hover .card-play { opacity: 1; transition-delay: 0.4s; }
}
.card:active .card-frame { transform: scale(0.97); transition-duration: 0.12s; }

.card-title {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ivory);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.card-type { text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-year { flex: none; }

/* ---------- Empty / loading / error states ---------- */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 56px 24px;
  color: var(--muted);
}
.state-block > .icon {
  width: 68px;
  height: 68px;
  padding: 20px;
  margin-bottom: 6px;
  border-radius: 50%;
  stroke: var(--crimson);
  background: rgba(var(--crimson-rgb), 0.12);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 0 40px -8px rgba(var(--crimson-deep-rgb), 0.55);
}
.state-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--ivory);
}
.state-sub { font-size: 13.5px; color: var(--muted); max-width: 40ch; line-height: 1.65; }
.state-retry {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson);
  border: 1px solid rgba(var(--crimson-rgb), 0.5);
  border-radius: 999px;
  padding: 10px 20px;
  background: rgba(var(--crimson-rgb), 0.1);
}
.state-retry:active { opacity: 0.7; }

.skeleton {
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-poster);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-card { flex: 0 0 var(--card-w, 148px); aspect-ratio: 2 / 3; }
.grid .skel-card { flex: none; width: auto; }

/* ---------- Search ---------- */
.search-bar-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px;
  margin: 4px 0 22px;
  border-radius: 999px;
  background: rgba(39, 22, 32, 0.55);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-bar-mobile:focus-within {
  border-color: rgba(var(--crimson-rgb), 0.6);
  box-shadow: 0 0 0 4px rgba(var(--crimson-rgb), 0.14);
}
.search-bar-mobile input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--ivory);
  font-size: 16px; /* 16px mencegah iOS memperbesar layar saat fokus */
  font-family: var(--font-body);
}
.search-bar-mobile input::placeholder { color: var(--muted-2); }
.search-bar-mobile input:focus { outline: none; }
@media (min-width: 900px) { .search-bar-mobile { display: none; } }

/* ---------- History ---------- */
.history-toolbar { display: flex; justify-content: flex-end; margin: 0 0 16px; }
.link-clear {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rust);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--rust-rgb), 0.1);
  border: 1px solid rgba(var(--rust-rgb), 0.4);
  border-radius: 999px;
  padding: 9px 16px;
}
.link-clear:active { opacity: 0.7; background: rgba(var(--rust-rgb), 0.18); }

/* ---------- Top loading bar ---------- */
.topload {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson-hi), var(--crimson), rgb(var(--crimson-deep-rgb)));
  box-shadow: 0 0 12px rgba(var(--crimson-rgb), 0.6);
  z-index: 80;
  opacity: 0;
  transition: width 0.35s ease, opacity 0.25s ease;
}
.topload.active { opacity: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--nav-gap) + var(--safe-bottom) + 16px);
  transform: translate(-50%, 14px) scale(0.96);
  max-width: calc(100vw - 32px);
  background: rgba(39, 22, 32, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  color: var(--ivory);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.85);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.4s var(--ease-spring);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* =========================================================
   INFO — banner sinematik dengan video art di belakang logo,
   daftar fitur editorial, kartu Developer
   ========================================================= */
.info-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 -20px 28px;
  padding: 62px 20px 46px;
  text-align: center;
  background:
    radial-gradient(120% 85% at 50% 0%, rgba(var(--crimson-deep-rgb), 0.6), transparent 68%),
    linear-gradient(180deg, #060202 0%, var(--bg) 100%);
}
.info-banner-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  pointer-events: none;
}
/* Scrim gelap di atas video supaya teks & logo tetap kontras/terbaca */
.info-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.55) 0%, rgba(var(--bg-rgb), 0.05) 34%, rgba(var(--bg-rgb), 0.5) 70%, var(--bg) 100%),
    radial-gradient(75% 65% at 50% 40%, transparent 0%, rgba(var(--bg-rgb), 0.5) 100%);
}
@media (min-width: 900px) {
  .info-banner { margin: 20px 0 28px; padding: 86px 24px 64px; border-radius: var(--r-hero); border: 1px solid var(--line); }
}
.info-banner-content { position: relative; z-index: 1; }

.info-mark {
  display: block;
  width: min(148px, 40vw);
  height: auto;
  margin: 0 auto 18px;
  overflow: visible;
  filter: drop-shadow(0 0 22px rgba(var(--crimson-rgb), 0.45));
}
.info-mark path { stroke-width: 2.4; }
/* Foto muncul setelah cincin selesai "digambar" */
.info-mark .mark-photo { opacity: 0; transform: scale(0.5); transform-origin: 24px 24px; }
#view-info.active .info-mark .mark-photo { animation: photoPop 0.55s var(--ease-spring) 1.45s forwards; }
@keyframes photoPop { to { opacity: 1; transform: scale(1); } }
.info-mark .mark-base { stroke-dasharray: 100; stroke-dashoffset: 100; }
.info-mark .mark-trace { opacity: 1; stroke-dasharray: 12 88; }
#view-info.active .info-mark .mark-base { animation: draw 1.6s var(--ease-out) 0.15s forwards; }
#view-info.active .info-mark .mark-trace {
  animation: traceFade 0.4s ease 1.7s backwards, trace 3.6s linear 1.7s infinite;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes traceFade { from { opacity: 0; } to { opacity: 1; } }

.info-banner-content h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 8vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.info-banner-content p { margin: 12px auto 0; max-width: 34ch; color: var(--muted); font-size: 14.5px; }

/* --- Daftar fitur bergaya editorial: nomor besar bergaris, bukan kartu kotak --- */
.info-features { display: flex; flex-direction: column; margin-bottom: 20px; }
.info-feature {
  display: flex;
  gap: 18px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: rise 0.6s var(--ease-out) forwards;
}
.info-feature:nth-child(1) { animation-delay: 0.05s; }
.info-feature:nth-child(2) { animation-delay: 0.15s; }
.info-feature:nth-child(3) { animation-delay: 0.25s; padding-bottom: 4px; border-bottom: none; }
.info-feature-num {
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  padding-top: 2px;
  min-width: 46px;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(var(--crimson-rgb), 0.55);
  transition: -webkit-text-stroke-color 0.25s ease;
}
.info-feature-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  margin-bottom: 8px;
}
.info-feature-body p { color: var(--muted); font-size: 14.5px; line-height: 1.75; max-width: 68ch; }
@media (hover: hover) {
  .info-feature:hover .info-feature-num { -webkit-text-stroke-color: rgba(var(--crimson-rgb), 0.95); }
}
@media (min-width: 640px) {
  .info-feature-num { font-size: 40px; min-width: 60px; }
}

.info-card {
  background: linear-gradient(180deg, rgba(39, 22, 32, 0.62), rgba(26, 16, 19, 0.62));
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
}
.info-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 14px;
}

/* --- Kartu Developer --- */
.creator-card { position: relative; overflow: hidden; border-color: var(--line-strong); margin-bottom: 8px; }
.creator-card::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(var(--crimson-rgb), 0.3), transparent 65%);
  pointer-events: none;
}
.creator-top { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.creator-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--crimson-btn), var(--crimson-deep));
  color: #12091f;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 0 0 4px rgba(var(--crimson-rgb), 0.18), 0 12px 30px -8px rgba(var(--crimson-rgb), 0.5);
}
.info-card h3.creator-name { margin: 0; font-size: 16px; }
.creator-desc { position: relative; margin-bottom: 18px; }
.creator-desc strong { color: var(--ivory); font-weight: 700; }

.channel-btn {
  position: relative;
  max-width: 420px; /* di desktop jangan membentang selebar kartu */
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(37, 211, 102, 0.06));
  border: 1px solid rgba(37, 211, 102, 0.5);
  color: var(--ivory);
  transition: transform 0.18s ease, box-shadow 0.25s ease;
}
.channel-ico {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wa);
  color: #05270f;
  box-shadow: 0 8px 20px -6px rgba(37, 211, 102, 0.7);
}
.channel-ico .icon { width: 22px; height: 22px; stroke-width: 2; }
.channel-text { flex: 1; font-weight: 700; font-size: 14px; line-height: 1.3; }
.channel-go { color: var(--wa); }
.channel-btn:active { transform: scale(0.98); }
@media (hover: hover) {
  .channel-btn:hover { box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.14), 0 16px 34px -14px rgba(37, 211, 102, 0.6); }
}

.info-footer { text-align: center; padding: 30px 0 4px; color: var(--muted-2); font-size: 12.5px; line-height: 1.7; }
.info-footer-brand {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: normal;
  color: var(--muted);
}

/* =========================================================
   DETAIL — halaman sendiri (cahaya poster mewarnai backdrop)
   ========================================================= */
.detail-topbar {
  position: sticky;
  top: calc(var(--topbar-h) + var(--safe-top));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -20px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.92), rgba(var(--bg-rgb), 0));
}
.detail-back {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ivory);
  transition: transform 0.18s ease;
}
.detail-back:active { transform: scale(0.92); }
.detail-topbar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  margin: -64px -20px 0;
  /* Tinggi eksplisit (≈16:9, min 240, maks 460). JANGAN pakai aspect-ratio + min-height di sini:
     Chrome lalu menaikkan LEBAR elemen (240×16/9 = 427px) dan halaman meluber di HP. */
  height: clamp(240px, 56.25vw, 460px);
  background-size: cover;
  background-position: center 20%;
}
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 2%, rgba(var(--bg-rgb), 0.45) 55%, rgba(var(--bg-rgb), 0.2) 100%),
    radial-gradient(90% 80% at 0% 100%, rgba(var(--amb-rgb), 0.38), transparent 70%);
}

.detail-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: -72px;
  padding: 0 2px 8px;
}
.detail-poster {
  flex: none;
  width: 112px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 24px 44px -14px rgba(0, 0, 0, 0.9),
    0 0 70px -12px rgba(var(--amb-rgb), 0.65);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }

.detail-heading {
  min-width: 0;
  padding-bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.detail-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--crimson);
  background: rgba(var(--crimson-rgb), 0.12);
  box-shadow: inset 0 0 0 1px rgba(var(--crimson-rgb), 0.4);
}
.detail-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.detail-badges span { display: flex; align-items: center; gap: 7px; }
.detail-badges .badge-rating {
  margin-bottom: 4px;
  color: var(--crimson);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.detail-badges .badge-rating .icon { fill: currentColor; }

.detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 6.2vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 18px 0 6px;
}
.detail-tagline { color: var(--muted-2); font-size: 14px; font-style: italic; }

.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.genre-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(39, 22, 32, 0.6);
  border: 1px solid var(--line);
}

.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.detail-actions .btn { flex: 1 1 auto; }
.detail-actions .btn-primary { flex-basis: 200px; }

.detail-section { margin-bottom: 30px; }
.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  margin-bottom: 12px;
}
.detail-section h3 svg { stroke: var(--crimson); }
.detail-synopsis { color: var(--muted); font-size: 15px; line-height: 1.8; max-width: 68ch; }

.detail-meta-grid { display: grid; grid-template-columns: 1fr; gap: 10px 24px; font-size: 14px; }
@media (min-width: 560px) { .detail-meta-grid { grid-template-columns: 1fr 1fr; } }
.mg-row { display: flex; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mg-label { min-width: 84px; color: var(--muted-2); font-size: 13px; }
.mg-value { color: var(--ivory); font-weight: 500; }

.cast-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 2px 20px 8px;
  scrollbar-width: none;
}
.cast-scroll::-webkit-scrollbar { display: none; }
.cast-card { flex: none; width: 82px; text-align: center; }
.cast-avatar {
  width: 70px;
  height: 70px;
  margin: 0 auto 9px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 4px rgba(var(--crimson-rgb), 0.1);
}
.cast-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cast-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cast-character {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-skel { padding-top: 8px; }
.detail-skel .sk-hero { aspect-ratio: 16 / 9; max-height: 460px; margin: 0 -20px; border-radius: 0; }
.detail-skel .sk-line { height: 14px; border-radius: 6px; margin: 12px 0; }

@media (min-width: 900px) {
  .detail-hero { border-radius: 0 0 var(--r-hero) var(--r-hero); margin-inline: 0; }
  .detail-topbar { margin-inline: 0; padding-inline: 0; }
  .detail-header { gap: 30px; margin-top: -120px; padding-inline: 28px; }
  .detail-poster { width: 176px; }
  .detail-title, .detail-tagline, .detail-genres, .detail-actions, .detail-section { padding-inline: 28px; }
  .cast-scroll { margin-inline: -28px; padding-inline: 28px; }
}

/* =========================================================
   PLAYER — layar sinema kecil dengan cahaya di bawahnya
   ========================================================= */
.server-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.server-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(39, 22, 32, 0.6);
  border: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.server-tab:active { opacity: 0.75; }
@media (hover: hover) {
  .server-tab:not(.active):hover { color: var(--ivory); border-color: var(--line-strong); background: rgba(39, 22, 32, 0.85); }
}
.server-tab.active {
  color: var(--crimson);
  border-color: rgba(var(--crimson-rgb), 0.6);
  background: rgba(var(--crimson-rgb), 0.14);
}
.server-tab .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.server-tab.active .dot-live { background: var(--crimson); box-shadow: 0 0 10px rgba(var(--crimson-rgb), 0.8); }

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-strong);
  margin-bottom: 14px;
  box-shadow: 0 40px 90px -40px rgba(var(--amb-rgb), 0.65);
}
.player-wrap iframe { width: 100%; height: 100%; border: none; }
.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
}
/* ∞ kecil sebagai loader server */
.loader-mark { width: 64px; height: auto; overflow: visible; }
.loader-mark .mark-base { opacity: 0.35; }
.loader-mark .mark-trace { opacity: 1; animation: trace 1.3s linear infinite; }

.player-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  color: var(--muted);
}
.player-fallback .icon { width: 32px; height: 32px; stroke: var(--crimson); }
.player-fallback .state-title { font-size: 15px; }
.player-fallback .state-sub { font-size: 12.5px; }
.player-fallback .state-retry { margin-top: 4px; }

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.player-server-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  min-height: 18px;
}
.player-server-status:not(:empty)::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 6px rgba(var(--crimson-rgb), 0.7);
  flex: none;
}

.ad-shield {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #34c77b;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.ad-shield .icon { width: 14px; height: 14px; stroke: currentColor; }
.ad-shield.is-off { color: var(--muted-2); opacity: 0.75; }

.player-compat-btn {
  padding: 6px 2px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  cursor: pointer;
  transition: color 0.15s ease;
}
@media (hover: hover) {
  .player-compat-btn:hover { color: var(--muted); }
}
.player-compat-btn.active {
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
}
.player-compat-btn:disabled { cursor: default; opacity: 0.85; }

/* =========================================================
   WATCH PAGE — judul, meta, sinopsis lipat, "Tonton Juga"
   ========================================================= */
.watch-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 5vw, 27px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 4px 0 12px;
}
.watch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.watch-actions .btn { height: 42px; padding: 0 18px; font-size: 13px; }

.watch-synopsis-wrap { margin-bottom: 26px; }
.watch-synopsis {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 74ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.watch-synopsis.is-expanded { -webkit-line-clamp: unset; }
.watch-synopsis-toggle {
  display: inline-block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--crimson);
}
.watch-synopsis-toggle:active { opacity: 0.7; }

.watch-related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .watch-related { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .watch-related { grid-template-columns: repeat(3, 1fr); } }

.watch-list-item { display: flex; gap: 12px; cursor: pointer; }
.watch-list-title { transition: color 0.2s ease; }
@media (hover: hover) {
  .watch-list-item:hover .watch-list-thumb { box-shadow: 0 0 0 1px rgba(var(--crimson-rgb), 0.55); }
  .watch-list-item:hover .watch-list-thumb img { transform: scale(1.05); }
  .watch-list-item:hover .watch-list-title { color: var(--crimson); }
}
.watch-list-thumb {
  position: relative;
  flex: none;
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.2s ease;
}
.watch-list-item:active .watch-list-thumb { box-shadow: 0 0 0 1px rgba(var(--crimson-rgb), 0.55); }
.watch-list-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.4s ease;
}
.watch-list-thumb img.is-in { opacity: 1; }
.watch-list-thumb img:not(.is-in) { animation: showLate 0.01s 3s forwards; }
.watch-list-rating {
  position: absolute; bottom: 6px; left: 6px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.8);
  color: var(--crimson);
  font-family: var(--font-display); font-weight: 600; font-size: 10px;
  box-shadow: inset 0 0 0 1px rgba(var(--crimson-rgb), 0.35);
}
.watch-list-rating .icon { fill: currentColor; stroke: none; width: 9px; height: 9px; }
.watch-list-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.watch-list-title {
  font-size: 13.5px; font-weight: 700; color: var(--ivory); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.watch-list-meta { font-size: 11.5px; font-weight: 500; color: var(--muted-2); text-transform: capitalize; }
.watch-list-item-skel { height: 74px; border-radius: 10px; }
@media (min-width: 640px) { .watch-list-item-skel { height: 84px; } }

/* =========================================================
   TRAILER MODAL
   ========================================================= */
.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.trailer-modal.show { display: flex; }
.trailer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 14, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.trailer-modal-box {
  position: relative;
  width: 100%;
  max-width: 900px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: 0 40px 100px -30px rgba(var(--crimson-rgb), 0.4), 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  animation: modalIn 0.4s var(--ease-spring) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.trailer-modal-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.trailer-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.trailer-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--bg-rgb), 0.72);
  border: 1px solid var(--line-strong);
  color: var(--ivory);
}
.trailer-modal-close .icon { width: 16px; height: 16px; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }

/* ---------- Reduced motion: tanpa gerak dekoratif, konten tetap tampil ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .skeleton { animation: none; }
  .hero-bg.kb { animation: none; }
  .info-mark .mark-base { stroke-dasharray: none; stroke-dashoffset: 0; }
  .info-mark .mark-trace { display: none; }
  .info-mark .mark-photo { opacity: 1; transform: scale(1); }
}
