/* =========================================================
   IzzMovies — Cinematic Film-Strip Design System
   Palette : near-black theatre + marquee gold + velvet crimson
   Type    : Bebas Neue (display) / Plus Jakarta Sans (body) / IBM Plex Mono (data)
   Signature: perforated film-strip dividers & sprocket-edged poster cards
   ========================================================= */

:root {
  --bg: #0a0b0f;
  --bg-soft: #101219;
  --surface: #161923;
  --surface-2: #1e2230;
  --line: #2a2f3d;

  --gold: #e3b23c;
  --gold-dim: #a8822e;
  --crimson: #c1272d;
  --crimson-soft: rgba(193, 39, 45, 0.18);

  --ivory: #f5f1e6;
  --muted: #9296a3;
  --muted-2: #5c6070;

  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 6px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  --nav-h: 66px;
  --sidebar-w: 92px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Menghilangkan highlight biru/abu bawaan browser saat tap di mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

/* Pastikan elemen interaktif tidak pernah menampilkan overlay highlight biru,
   sekaligus tetap punya feedback tekan yang halus (scale/opacity, bukan warna sistem) */
a, button, .card, .sb-link, .bn-link, .server-tab, .btn, input {
  -webkit-tap-highlight-color: transparent;
  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; }
.card:active .card-frame { transform: scale(0.97); transition: transform 0.12s ease; }
.btn:active, .server-tab:active, .bn-link:active, .sb-link:active { opacity: 0.75; }

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(193, 39, 45, 0.08), transparent),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(227, 178, 60, 0.06), transparent);
}

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;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

::selection { background: var(--gold); color: #0a0b0f; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

/* ---------- Film-strip signature motif ---------- */
.filmstrip {
  height: 14px;
  width: 100%;
  background-color: var(--line);
  background-image:
    repeating-linear-gradient(90deg, var(--bg) 0 8px, transparent 8px 20px);
  position: relative;
  opacity: 0.55;
}
.filmstrip::before, .filmstrip::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--bg) 0 5px, var(--line) 5px 12px);
}
.filmstrip::before { top: 0; }
.filmstrip::after { bottom: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(10, 11, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: baseline; gap: 6px; }
.brand-izz {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.03em;
  color: var(--gold);
  line-height: 1;
}
.brand-movie {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  line-height: 1;
}

.topbar-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  width: min(360px, 42vw);
  color: var(--muted);
}
.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; }
  .brand-izz, .brand-movie { font-size: 24px; }
}

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

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

@media (min-width: 900px) {
  .app-shell { flex-direction: row-reverse; } /* sidebar sits on the right */
  .main { padding-bottom: 48px; }
}

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

@media (min-width: 900px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: var(--sidebar-w);
    padding: 28px 0;
    background: var(--bg-soft);
    border-left: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .sidebar .sb-logo {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 22px;
    margin-bottom: 26px;
    writing-mode: vertical-rl;
    letter-spacing: 0.08em;
  }
  .sb-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 12px 4px;
    color: var(--muted);
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
    border-left: 2px solid transparent;
    transition: color 0.15s ease, background 0.15s ease;
  }
  .sb-link:hover { color: var(--ivory); background: var(--surface); }
  .sb-link.active { color: var(--gold); border-left-color: var(--gold); background: var(--surface); }
  .sb-spacer { flex: 1; }
}

/* ---------- Bottom nav (mobile) ---------- */
.bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  height: var(--nav-h);
  background: rgba(16, 18, 25, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bn-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-family: var(--font-mono);
}
.bn-link.active { color: var(--gold); }
.bn-link.active .icon { stroke: var(--gold); }

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

/* ---------- Views ---------- */
.view { display: none; padding: 0 20px 40px; }
.view.active { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 18px 0 26px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background: var(--surface);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 15%;
  filter: saturate(1.05);
  transition: opacity 0.4s ease;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(10,11,15,0.97) 0%, rgba(10,11,15,0.55) 55%, rgba(10,11,15,0.1) 100%),
    linear-gradient(90deg, rgba(10,11,15,0.6) 0%, transparent 45%);
}
.hero-content { position: relative; padding: 28px 24px; max-width: 640px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--crimson); box-shadow: 0 0 0 3px var(--crimson-soft); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--ivory);
  margin-bottom: 12px;
}
.hero-meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-desc { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 18px; max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; }
.hero-dots {
  position: absolute; right: 20px; bottom: 18px; z-index: 2;
  display: flex; gap: 7px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(245,241,230,0.3); border: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dot.active { background: var(--gold); transform: scale(1.2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); color: #17140a; }
.btn-primary:hover { background: #efc25a; }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--ivory); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ---------- Section header ---------- */
.section { margin: 34px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.section-title-wrap { display: flex; align-items: baseline; gap: 10px; }
.section-index { font-family: var(--font-mono); color: var(--gold-dim); font-size: 12px; }
.section-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.03em;
  color: var(--ivory);
}
.section-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }

/* ---------- Row / horizontal scroller ---------- */
.row-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
}
.row-scroll::-webkit-scrollbar { height: 6px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ---------- Grid (search / rekomendasi / history) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px 14px;
}

/* ---------- Poster card (sprocket / film-frame styling) ---------- */
.card {
  scroll-snap-align: start;
  flex: 0 0 148px;
  cursor: pointer;
  position: relative;
}
.grid .card { flex: none; width: auto; }

.card-frame {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 2 / 3;
}
.card-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-frame img { transform: scale(1.06); }

.card-frame::before, .card-frame::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 10px;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--surface) 2.2px, transparent 2.3px);
  background-size: 12px 10px;
  background-position: 4px center;
  z-index: 2;
  opacity: 0.9;
}
.card-frame::before { top: 0; }
.card-frame::after { bottom: 0; }

.card-rating {
  position: absolute;
  top: 12px; right: 6px;
  z-index: 3;
  background: rgba(10,11,15,0.82);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex; align-items: center; gap: 3px;
}

.card-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,15,0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.card:hover .card-play { opacity: 1; }
.card-play .icon { width: 34px; height: 34px; stroke: var(--ivory); }

.card-title {
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Search view ---------- */
.search-bar-mobile {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 16px; margin: 18px 0 22px; color: var(--muted);
}
.search-bar-mobile input { flex: 1; background: transparent; border: none; color: var(--ivory); font-size: 14px; font-family: var(--font-body); }
.search-bar-mobile input:focus { outline: none; }
@media (min-width: 900px) { .search-bar-mobile { display: none; } }

/* ---------- Empty / loading / error states ---------- */
.state-block {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 60px 20px; color: var(--muted);
}
.state-block .icon { width: 40px; height: 40px; stroke: var(--muted-2); }
.state-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.02em; color: var(--ivory); }
.state-sub { font-size: 13px; color: var(--muted); max-width: 40ch; }

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

/* ---------- Info view ---------- */
.info-hero {
  padding: 34px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(227,178,60,0.12), transparent 55%),
    var(--surface);
  margin: 18px 0 30px;
  text-align: center;
}
.info-hero .clapper { width: 46px; height: 46px; margin: 0 auto 14px; stroke: var(--gold); }
.info-hero h1 { font-family: var(--font-display); font-size: 40px; letter-spacing: 0.03em; }
.info-hero p { color: var(--muted); font-size: 13.5px; margin-top: 8px; font-family: var(--font-mono); }

.info-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 30px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: 1fr 1fr; } }

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.info-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.info-card p { color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.info-card p + p { margin-top: 10px; }

.creator-card { display: flex; gap: 16px; align-items: center; }
.creator-avatar {
  flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--crimson), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; color: #0a0b0f;
}
.creator-links { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.creator-links a {
  font-family: var(--font-mono); font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; color: var(--ivory);
  display: inline-flex; align-items: center; gap: 6px;
}
.creator-links a:hover { border-color: var(--gold); color: var(--gold); }

.info-footer { text-align: center; padding: 20px 0 4px; color: var(--muted-2); font-family: var(--font-mono); font-size: 11px; }

/* ---------- History view ---------- */
.history-toolbar { display: flex; justify-content: flex-end; margin: 16px 0; }
.link-clear {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--crimson);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(193, 39, 45, 0.08);
  border: 1px solid rgba(193, 39, 45, 0.35);
  border-radius: 999px;
  padding: 8px 16px;
}
.link-clear:active { opacity: 0.7; background: rgba(193, 39, 45, 0.16); }

/* ---------- Top loading progress bar ---------- */
.topload {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  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) + 18px);
  transform: translate(-50%, 12px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ivory);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 26px; } }

/* ---------- View transition ---------- */
.view {
  animation: viewIn 0.28s ease;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

/* ---------- Active nav refinement (no system blue) ---------- */
.bn-link { position: relative; -webkit-tap-highlight-color: transparent; }
.bn-link.active::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
}
.sb-link { -webkit-tap-highlight-color: transparent; }

/* ---------- Retry button on empty/error state ---------- */
.state-retry {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 8px 18px;
  background: transparent;
}
.state-retry:active { opacity: 0.7; }

/* ---------- Detail page (halaman sendiri, bukan popup) ---------- */
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  margin: 0 -20px 0;
  padding-left: 20px;
  padding-right: 20px;
  background: linear-gradient(180deg, rgba(10,11,15,0.92), rgba(10,11,15,0));
}
.detail-back {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
  color: var(--ivory);
  flex-shrink: 0;
}
.detail-topbar-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  margin: 0 -20px;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  max-height: 460px;
  background-size: cover;
  background-position: center 20%;
}
.detail-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 2%, rgba(10,11,15,0.35) 55%, rgba(10,11,15,0.15) 100%),
    linear-gradient(90deg, rgba(10,11,15,0.55) 0%, transparent 50%);
}

.detail-header {
  position: relative;
  display: flex;
  gap: 18px;
  margin-top: -78px;
  padding: 0 4px 20px;
}
.detail-poster {
  flex-shrink: 0;
  width: 118px;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--bg);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }

.detail-heading { padding-top: 84px; min-width: 0; }
.detail-type-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--gold); border: 1px solid var(--gold-dim);
  border-radius: 999px; padding: 3px 10px; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 38px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.detail-tagline { color: var(--muted-2); font-size: 12.5px; font-style: italic; }

.detail-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  margin: 16px 0 18px;
}
.detail-badges span { display: flex; align-items: center; gap: 5px; }
.detail-badges .badge-rating { color: var(--gold); }

.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.genre-chip {
  font-size: 11.5px; font-family: var(--font-mono);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; color: var(--muted);
  background: var(--surface);
}

.detail-actions { display: flex; gap: 12px; margin-bottom: 26px; }

.detail-section { margin-bottom: 28px; }
.detail-section h3 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--ivory);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.detail-section h3 svg { stroke: var(--gold); }
.detail-synopsis { color: var(--muted); font-size: 14px; line-height: 1.75; }

.detail-meta-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  font-size: 13px;
}
@media (min-width: 560px) { .detail-meta-grid { grid-template-columns: 1fr 1fr; } }
.detail-meta-grid .mg-row { display: flex; gap: 6px; }
.detail-meta-grid .mg-label { color: var(--muted-2); font-family: var(--font-mono); font-size: 11.5px; min-width: 84px; }
.detail-meta-grid .mg-value { color: var(--ivory); }

.cast-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.cast-card {
  flex: 0 0 auto;
  width: 78px;
  text-align: center;
}
.cast-avatar {
  width: 66px; height: 66px; margin: 0 auto 8px;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
}
.cast-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cast-name {
  font-size: 11.5px; font-weight: 600; color: var(--ivory);
  line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cast-character {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Streaming player di halaman detail */
.player-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  aspect-ratio: 16/9;
  position: relative;
}
.player-wrap iframe { width: 100%; height: 100%; border: none; }
.player-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-family: var(--font-mono); font-size: 12px;
  background: var(--surface);
}
.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(--muted-2); }
.player-fallback .state-title { font-size: 16px; }
.player-fallback .state-sub { font-size: 12px; }
.player-fallback .state-retry { margin-top: 4px; }
.player-compat-btn {
  width: 100%;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.player-compat-btn:hover { border-color: var(--muted); color: var(--muted); }
.player-compat-btn.active {
  border-style: solid;
  border-color: #d97706;
  color: #d97706;
}
.player-compat-btn:disabled { cursor: default; opacity: .85; }

.server-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.server-tab {
  font-family: var(--font-mono); font-size: 12px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  display: flex; align-items: center; gap: 7px;
}
.server-tab.active { border-color: var(--gold); color: var(--gold); background: rgba(227,178,60,0.08); }
.server-tab .dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.server-tab.active .dot-live { background: var(--gold); }

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

/* ---------- 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(5,6,9,0.88);
  backdrop-filter: blur(2px);
}
.trailer-modal-box {
  position: relative;
  width: 100%; max-width: 860px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}
.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: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,15,0.7); border: 1px solid var(--line); color: var(--ivory);
}
.trailer-modal-close .icon { width: 16px; height: 16px; }

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