/* Template v1 — tampilan streaming drama pendek (dark-first), data dari DracinAPI. */
:root {
  --s-sunken: #050607;
  --s0: #090a0d;
  --s1: #141518;
  --s2: #1e1f23;
  --s3: #282a2f;
  --s4: #34353b;
  --line-subtle: #24252a;
  --line: #34353b;
  --line-strong: #4d4f57;
  --t1: #f6f7f9;
  --t2: #bbbdc6;
  --t3: #8f929b;
  --accent: #e10037;
  --accent-500: #f6364c;
  --accent-700: #bb002b;
  --accent-ink: #ff6d71;
  --accent-tint: #4d1b1d;
  --gold: #edc56e;
  --success: #5bcc80;
  --danger: #ff645f;
  --warning: #edb417;
  --warning-tint: #33280a;
  --r1: 6px;
  --r2: 10px;
  --r3: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --max-w: 1320px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --s-sunken: #e9ebf0;
  --s0: #f6f7fa;
  --s1: #ffffff;
  --s2: #f0f2f6;
  --s3: #e5e8ee;
  --s4: #d9dde6;
  --line-subtle: #e6e8ee;
  --line: #d6dae2;
  --line-strong: #b9bfcb;
  --t1: #0f1422;
  --t2: #3c4356;
  --t3: #6b7284;
  --accent-ink: #c40030;
  --accent-tint: #ffe3e6;
  --shadow: 0 10px 30px rgba(20, 30, 60, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.tv1 {
  margin: 0;
  min-width: 320px;
  background: var(--s0);
  color: var(--t1);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--t3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--s0) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-subtle);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  color: #fff;
  font-size: 1rem;
}
.brand-name { font-size: 1.05rem; }
.global-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 520px;
  height: 40px;
  padding: 0 4px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--s2);
}
.global-search:focus-within { border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(225, 0, 55, .18); }
.global-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--t1);
  font: inherit;
  font-size: .9rem;
  outline: 0;
}
.global-search-input::placeholder { color: var(--t3); }
.global-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.global-search-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.global-search-btn:hover { background: var(--accent-500); }
.menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.menu-link, .menu-dropdown > summary {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r2);
  color: var(--t2);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  user-select: none;
}
.menu-dropdown > summary::-webkit-details-marker { display: none; }
.menu-dropdown > summary::after { content: ""; margin-left: 6px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
.menu-link:hover, .menu-dropdown > summary:hover, .menu-link.is-active { background: var(--s2); color: var(--t1); }
.menu-link.is-active { color: var(--accent-ink); }
.menu-link-ghost { border: 1px solid var(--line); }
.menu-dropdown { position: relative; }
.menu-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 300;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 2px;
  min-width: 280px;
  max-height: 60vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: var(--s4);
  box-shadow: var(--shadow);
}
.menu-dropdown-item { padding: 8px 10px; border-radius: var(--r1); color: var(--t1); font-size: .85rem; }
.menu-dropdown-item:hover { background: var(--s3); }
.menu-dropdown-item.is-active { color: var(--accent-ink); font-weight: 700; }
.theme-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--t2);
  cursor: pointer;
}
.theme-btn:hover { background: var(--s2); color: var(--t1); }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

/* ---------- Provider bar ---------- */
.provider-bar { border-top: 1px solid var(--line-subtle); background: var(--s1); }
.provider-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.provider-bar-inner::-webkit-scrollbar { display: none; }
.provider-combo { margin: 0; flex: 0 0 auto; }
.provider-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--s2);
  font-size: .82rem;
  color: var(--t2);
}
.provider-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); flex: 0 0 auto; }
.provider-dot.is-online { background: var(--success); box-shadow: 0 0 0 3px rgba(91, 204, 128, .2); }
.provider-dot.is-offline { background: var(--danger); }
.provider-select {
  height: 28px;
  padding: 0 24px 0 8px;
  border: 0;
  border-radius: 999px;
  background: var(--s3) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23bbbdc6' stroke-width='1.6'/></svg>") no-repeat right 9px center;
  color: var(--t1);
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}
.provider-count { flex: 0 0 auto; color: var(--t3); font-size: .78rem; white-space: nowrap; }
.provider-chips { display: flex; gap: 6px; margin-left: auto; }
.chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--t2);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: var(--t1); }
.chip.is-active { background: var(--accent-tint); border-color: transparent; color: var(--accent-ink); }

/* ---------- Notice ---------- */
.notice-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(237, 180, 23, .35);
  border-radius: var(--r2);
  background: var(--warning-tint);
  color: var(--warning);
  font-size: .82rem;
}
.notice-bar a { text-decoration: underline; }

/* ---------- Hero (Netflix-style rail) ---------- */
.hero { position: relative; margin: 20px 0 32px; }
.hero-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 16px * (var(--hero-cols) - 1)) / var(--hero-cols));
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0;
  scrollbar-width: none;
  --hero-cols: 1.15;
}
.hero-track::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .hero-track { --hero-cols: 2; } }
@media (min-width: 1024px) { .hero-track { --hero-cols: 3; } }
.hero-card {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  max-height: min(70vh, 640px);
  overflow: hidden;
  border-radius: var(--r3);
  background: var(--s1);
  isolation: isolate;
  container-type: inline-size;
}
.hero-card .poster, .hero-card .poster-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-pane {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 38% 18px 18px;
  background: linear-gradient(to top, rgba(5, 6, 7, .96) 0%, rgba(5, 6, 7, .94) 42%, rgba(5, 6, 7, .55) 70%, transparent 100%);
  color: #f6f7f9;
}
.hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 1.8cqi + .6rem, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.hero-facts span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.hero-facts .fact-ep { background: var(--accent); }
.hero-desc {
  margin: 0 0 14px;
  color: #d4d6dd;
  font-size: .84rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-acts { display: flex; gap: 8px; }
.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(20, 21, 24, .85);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}
.hero-nav:hover { background: var(--accent); border-color: var(--accent); }
.hero-prev { left: -8px; }
.hero-next { right: -8px; }
@media (max-width: 639px) { .hero-nav { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-500); }
.btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--t1); }
.btn-outline:hover { background: var(--s2); }
.btn-sm { height: 34px; padding: 0 14px; font-size: .8rem; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }

/* ---------- Sections / toolbar / pager ---------- */
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.section-title small { margin-left: 8px; color: var(--t3); font-size: .8rem; font-weight: 500; }
.eyebrow { margin: 0 0 4px; color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 16px; }
.pager { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--t3); }
.pager-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--t1);
  font-weight: 600;
}
.pager-link:hover { background: var(--s2); }
.pager-link.disabled { opacity: .4; pointer-events: none; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; } }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--r3);
  background: var(--s1);
  isolation: isolate;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: var(--line); box-shadow: var(--shadow); }
.card:hover .poster, .card:hover .poster-fallback { transform: scale(1.06); }
.card-link-overlay { position: absolute; inset: 0; z-index: 1; }
.poster-wrap { position: relative; z-index: 2; aspect-ratio: 3 / 4; overflow: hidden; background: var(--s2); pointer-events: none; }
.poster { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.poster-fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 14px;
  background:
    radial-gradient(120% 80% at 80% 0%, hsl(var(--hue) 70% 45% / .75), transparent 60%),
    linear-gradient(160deg, hsl(var(--hue) 60% 22%), hsl(calc(var(--hue) + 40) 55% 12%));
  color: #fff;
  transition: transform .35s ease;
}
.poster-fallback-mark { font-size: 2.4rem; font-weight: 900; letter-spacing: -.04em; opacity: .9; line-height: 1; }
.poster-fallback-title { margin-top: 6px; font-size: .74rem; font-weight: 600; opacity: .8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: var(--r1);
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
}
.rating-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 3px 7px;
  border-radius: var(--r1);
  background: rgba(5, 6, 7, .7);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 800;
}
.poster-tags { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.movie-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(5, 6, 7, .72);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
  pointer-events: auto;
}
.movie-tag:hover { background: var(--accent); }
.card .body { position: relative; z-index: 2; padding: 10px 10px 12px; pointer-events: none; }
.card .title {
  margin: 0;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.movie-meta-line { margin-top: 4px; color: var(--t3); font-size: .72rem; }
.empty-state { padding: 48px 16px; text-align: center; color: var(--t3); border: 1px dashed var(--line); border-radius: var(--r3); }
.empty-state h2 { margin: 0 0 6px; color: var(--t1); font-size: 1.1rem; }

/* ---------- Detail page ---------- */
.detail { display: grid; grid-template-columns: 1fr; gap: 24px; margin: 24px 0 40px; }
@media (min-width: 820px) { .detail { grid-template-columns: 280px 1fr; } }
.detail-poster { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r3); background: var(--s2); }
.detail-poster .poster, .detail-poster .poster-fallback { width: 100%; height: 100%; }
.detail-title { margin: 0 0 10px; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.detail-meta span { padding: 4px 10px; border-radius: 999px; background: var(--s2); color: var(--t2); font-size: .76rem; font-weight: 600; }
.detail-meta .is-accent { background: var(--accent-tint); color: var(--accent-ink); }
.detail-synopsis { color: var(--t2); font-size: .94rem; max-width: 70ch; }
.detail-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.episode-btn {
  position: relative;
  display: grid;
  place-items: center;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--s1);
  color: var(--t1);
  font-size: .86rem;
  font-weight: 700;
}
.episode-btn:hover { border-color: var(--accent-500); color: var(--accent-ink); }
.episode-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.episode-btn.is-locked { color: var(--t3); }
.episode-btn.is-locked::after { content: "🔒"; position: absolute; top: 3px; right: 5px; font-size: .6rem; }

/* ---------- Watch page ---------- */
.watch { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 20px 0 40px; }
@media (min-width: 1024px) { .watch { grid-template-columns: minmax(0, 1fr) 340px; } }
.player-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: 78vh;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--r3);
  background: #000;
}
@media (min-width: 640px) { .player-wrap { aspect-ratio: 16 / 9; max-height: none; } }
.player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-locked { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--t2); background: var(--s1); }
.watch-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.watch-title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.watch-title small { display: block; color: var(--t3); font-size: .8rem; font-weight: 500; }
.watch-side { padding: 16px; border: 1px solid var(--line-subtle); border-radius: var(--r3); background: var(--s1); }
.watch-side h3 { margin: 0 0 12px; font-size: .95rem; }
.watch-side .episode-grid { max-height: 60vh; overflow: auto; padding-right: 4px; }
.player-note { margin-top: 10px; color: var(--t3); font-size: .78rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; padding: 24px 0 32px; border-top: 1px solid var(--line-subtle); color: var(--t2); font-size: .84rem; }
.site-footer p { margin: 0 0 4px; }

/* ---------- Responsive topbar ---------- */
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; }
  .brand-name { display: none; }
  .global-search { order: 3; flex-basis: 100%; max-width: none; }
  .menu-dropdown-panel { right: auto; left: 0; }
}
@media (max-width: 560px) {
  .provider-chips { display: none; }
}

/* ---------- Mobile menu (hamburger) ---------- */
.menu-burger { display: none; }
@media (max-width: 860px) {
  .topbar-inner { position: relative; }
  .menu-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    order: 2; margin-left: auto; width: 40px; height: 40px; padding: 0 9px;
    border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer;
  }
  .menu-burger span { display: block; height: 2px; border-radius: 2px; background: var(--t1); transition: transform .2s ease, opacity .2s ease; }
  html.menu-open .menu-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  html.menu-open .menu-burger span:nth-child(2) { opacity: 0; }
  html.menu-open .menu-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    margin: 4px 0 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r3); background: var(--s1);
  }
  html.menu-open .menu { display: flex; }
  .menu-link, .menu-dropdown > summary { height: 44px; padding: 0 14px; font-size: .95rem; }
  .menu-dropdown > summary { justify-content: space-between; }
  .menu-dropdown > summary::after { margin-left: auto; }
  .menu-dropdown-panel {
    position: static; min-width: 0; max-height: none; grid-template-columns: 1fr;
    margin: 2px 0 6px 10px; padding: 4px 0 4px 10px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: transparent; box-shadow: none;
  }
  .menu-dropdown-item { padding: 10px 12px; font-size: .9rem; }
  .theme-btn { align-self: flex-start; margin: 6px 0 0 12px; }
}

/* ---------- Clickable posters ---------- */
.card-play {
  position: absolute; left: 50%; top: 50%; z-index: 4; display: grid; place-items: center;
  width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: rgba(5, 6, 7, .72); color: #fff; opacity: 0; transform: scale(.85);
  transition: opacity .18s ease, transform .18s ease, background .18s ease; pointer-events: auto;
}
.card:hover .card-play, .detail-poster:hover .card-play, .card:focus-within .card-play { opacity: 1; transform: scale(1); }
.card-play:hover { background: var(--accent); }
@media (hover: none) { .card-play { opacity: 1; transform: none; width: 40px; height: 40px; margin: -20px 0 0 -20px; } }
.hero-poster-link { position: absolute; inset: 0; z-index: 1; display: block; }
.hero-title a { color: inherit; text-decoration: none; }
.hero-title a:hover { color: var(--accent-ink); }
.detail-poster { position: relative; }
.detail-poster-link { position: relative; display: block; }

/* ---------- Lazy sections ---------- */
.card { content-visibility: auto; contain-intrinsic-size: 220px 360px; }
.lazy-slot { min-height: 320px; margin: 28px 0; }
.lazy-skeleton { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .lazy-skeleton { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .lazy-skeleton { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .lazy-skeleton { grid-template-columns: repeat(6, 1fr); gap: 16px; } }
.lazy-skeleton span { display: block; aspect-ratio: 3 / 4; border-radius: var(--r3); background: linear-gradient(100deg, var(--s1) 30%, var(--s2) 50%, var(--s1) 70%); background-size: 200% 100%; animation: tv1-shimmer 1.3s infinite linear; }
@keyframes tv1-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.section-more { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- Player controls ---------- */
.player-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line-subtle); border-radius: var(--r2); background: var(--s1); }
.player-bar-info, .player-bar-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.player-chip { padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; }
.player-chip-ghost { background: var(--s2); color: var(--t2); }
.player-ctl { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--s2); color: var(--t1); font-size: .8rem; font-weight: 700; }
.player-ctl-ico { font-size: .66rem; letter-spacing: .04em; color: var(--t3); }
.player-ctl select { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; outline: none; cursor: pointer; }
.player-ctl select option { color: #000; }
[data-theme="dark"] .player-ctl select option { color: #fff; background: #111; }
.player-ctl-btn { padding: 0 10px; cursor: pointer; font-size: 1rem; }
.player-ctl-btn:hover { border-color: var(--accent-500); }
.player-error { margin-top: 8px; padding: 10px 12px; border-radius: var(--r2); background: rgba(220, 60, 60, .12); color: var(--t1); font-size: .84rem; }
.player-error a { color: var(--accent-ink); font-weight: 700; }
.player-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; background: rgba(0, 0, 0, .25); }
.player-loading[hidden] { display: none; }
.player-loading span { width: 42px; height: 42px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: tv1-spin .8s linear infinite; }
@keyframes tv1-spin { to { transform: rotate(360deg); } }
.player-wrap video::cue { background: rgba(0, 0, 0, .65); font-size: 1.05em; }

/* Branding instance & pratinjau */
.brand-logo { height: 34px; max-width: 170px; object-fit: contain; display: block; }
.preview-bar { display: flex; justify-content: center; gap: 14px; align-items: center; padding: 6px 12px; background: #b45309; color: #fff; font-size: .8rem; }
.preview-bar-exit { color: #fff; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-links a { color: var(--t1); }
.footer-links a:hover { text-decoration: underline; }
.genre-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.genre-tile { display: grid; place-items: center; padding: 26px 12px; border-radius: var(--r2, 12px); background: var(--s2); color: var(--t1); font-weight: 700; border: 1px solid var(--line-subtle); }
.genre-tile:hover { background: var(--s3, var(--s2)); border-color: var(--accent-500); }

/* Watermark logo instance di atas video */
.player-wm { position: absolute; z-index: 3; pointer-events: none; display: flex; padding: 10px 12px; }
.player-wm img { height: var(--wm-h, clamp(28px, 6vw, 56px)); width: auto; max-width: 40vw; object-fit: contain; filter: drop-shadow(0 1px 4px rgba(0,0,0,.7)); }
.player-wm[data-size="small"] { --wm-h: clamp(20px, 4vw, 36px); }
.player-wm[data-size="medium"] { --wm-h: clamp(28px, 6vw, 56px); }
.player-wm[data-size="large"] { --wm-h: clamp(40px, 9vw, 84px); }
.player-wm[data-size="xlarge"] { --wm-h: clamp(56px, 13vw, 120px); }
.player-wm[data-pos="top-center"] { top: 0; left: 50%; transform: translateX(-50%); }
.player-wm[data-pos="top-left"] { top: 0; left: 0; }
.player-wm[data-pos="top-right"] { top: 0; right: 0; }
.player-wm[data-pos="bottom-left"] { bottom: 44px; left: 0; }
.player-wm[data-pos="bottom-right"] { bottom: 44px; right: 0; }
.player-wrap:fullscreen .player-wm img, .player-wrap:-webkit-full-screen .player-wm img { height: calc(var(--wm-h, 56px) * 1.4); }

/* Footer instance */
.footer-grid { display: grid; gap: 24px; grid-template-columns: minmax(220px, 1.4fr) auto auto; align-items: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 16px; } }
.footer-brand p { margin: 10px 0 0; color: var(--t2); max-width: 46ch; }
.footer-about { font-size: .8rem; line-height: 1.55; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--t1); font-size: .86rem; }
.footer-links a:hover { color: var(--accent-ink); }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }
.social-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); color: var(--t1); font-size: .8rem; font-weight: 600; }
.social-btn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc, var(--accent)); }
.social-btn:hover { border-color: var(--sc, var(--accent)); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line-subtle); font-size: .78rem; color: var(--t2); }

/* ---------- Bersama v1/v2/v3: tab bawah mobile, konten SEO, proteksi, fullscreen palsu ---------- */
.mtabs { display: none; }
@media (max-width: 860px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mtabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--s0) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-subtle, var(--line)); }
  .mtab { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; color: var(--t3); font-size: .66rem; font-weight: 700; letter-spacing: .02em; }
  .mtab.is-active { color: var(--accent); }
  .mtab.is-active svg { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 50%, transparent)); }
  .mtab:active { background: var(--s1); }
  html.devtools-open .mtabs { display: none; }
}
.seo-content { position: relative; margin: 36px 0 10px; padding: 22px 22px 56px; border: 1px solid var(--line-subtle, var(--line)); border-radius: var(--r3); background: var(--s1); color: var(--t2); font-size: .92rem; line-height: 1.75; }
.seo-content-body { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.seo-content.is-open .seo-content-body { max-height: none; -webkit-mask-image: none; mask-image: none; }
.seo-content h2 { margin: 0 0 10px; color: var(--t1); font-size: 1.25rem; line-height: 1.3; }
.seo-content h3 { margin: 20px 0 6px; color: var(--t1); font-size: 1.02rem; }
.seo-content p { margin: 0 0 10px; }
.seo-content ul { margin: 0 0 10px; padding-left: 20px; }
.seo-content li { margin: 4px 0; }
.seo-content strong { color: var(--t1); }
.seo-content a { color: var(--accent-ink, var(--accent)); text-decoration: underline; }
.seo-toggle { position: absolute; left: 22px; bottom: 16px; height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--s2); color: var(--t1); font-size: .8rem; font-weight: 700; cursor: pointer; }
.seo-toggle:hover { border-color: var(--accent); color: var(--accent-ink, var(--accent)); }
.src-guard { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 20px; text-align: center; background: color-mix(in srgb, var(--s0) 96%, transparent); backdrop-filter: blur(10px); color: var(--t1); }
.src-guard[hidden] { display: none; }
.src-guard strong { display: block; font-size: 1.3rem; margin-bottom: 6px; } .src-guard p { margin: 0; color: var(--t3); }
html.devtools-open body > *:not(.src-guard) { filter: blur(6px); pointer-events: none; user-select: none; }
.player-wrap.is-fake-fs { position: fixed; inset: 0; z-index: 9000; width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border-radius: 0; background: #000; }
html.fake-fs { overflow: hidden; }
html.fake-fs .mtabs, html.fake-fs .preview-bar { display: none; }
.player-wrap.is-fake-fs .player-wm img, .player-wrap:fullscreen .player-wm img { height: calc(var(--wm-h, 56px) * 1.4); }
.player-wrap.is-fake-fs .player-wm[data-pos^="bottom"] { bottom: 60px; }
.poster-fallback { user-select: none; }

/* mobile tweaks */
@media (max-width: 560px) {
  .grid { gap: 10px; }
  .card .title { font-size: .84rem; }
  .section-title { font-size: 1.1rem; }
  .hero-pane { padding: 12px; }
  .hero-title { font-size: 1.15rem; }
  .btn { min-height: 42px; }
}

.seo-page-text { margin: 28px 0 8px; padding: 16px 18px; border: 1px solid var(--line-subtle, var(--line)); border-radius: var(--r3); background: var(--s1); color: var(--t2); font-size: .88rem; line-height: 1.7; }
.seo-page-text p { margin: 0 0 8px; } .seo-page-text strong { color: var(--t1); } .seo-page-text a { color: var(--accent-ink, var(--accent)); text-decoration: underline; }
.seo-kws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.seo-kw { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; color: var(--t3) !important; text-decoration: none !important; }
.seo-kw:hover { color: var(--accent) !important; border-color: var(--accent); }

.prov-links { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line-subtle, var(--line)); font-size: .74rem; }
.prov-links-title { color: var(--t3); margin-right: 4px; }
.prov-link { color: var(--t3); padding: 2px 8px; border: 1px solid var(--line-subtle, var(--line)); border-radius: 999px; text-decoration: none; }
.prov-link:hover, .prov-link.is-active { color: var(--accent); border-color: var(--accent); }

/* fullscreen: tombol besar di atas video + wrapper memenuhi layar */
.player-fs-big { position: absolute; top: 10px; right: 10px; z-index: 4; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; opacity: .85; transition: opacity .2s, transform .2s; }
.player-fs-big:hover { opacity: 1; transform: scale(1.06); background: rgba(0,0,0,.75); }
.player-wrap.is-fs .player-fs-big svg path { d: path("M3 8V3h5M21 8V3h-5M3 16v5h5M21 16v5h-5"); }
.player-wrap:fullscreen, .player-wrap:-webkit-full-screen { width: 100vw !important; height: 100vh !important; max-height: none !important; aspect-ratio: auto !important; border-radius: 0 !important; background: #000; }
.player-wrap:fullscreen video, .player-wrap:-webkit-full-screen video, .player-wrap.is-fake-fs video { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) { .player-fs-big { width: 38px; height: 38px; top: 8px; right: 8px; } }
