/* ============================================================
   DramaKu — Streaming Platform Theme (dark, ala Netflix/Viu)
   ============================================================ */
:root {
  --bg: #0b0a16;
  --bg-2: #121022;
  --bg-3: #191630;
  --card: rgba(255, 255, 255, 0.045);
  --card-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --ink: #f4f2ff;
  --muted: #a39fc6;
  --muted-2: #6f6a94;
  --grad: linear-gradient(135deg, #7c3aed 0%, #ec4899 55%, #f97316 100%);
  --grad-soft: linear-gradient(135deg, #a78bfa, #f472b6);
  --grad-red: linear-gradient(135deg, #ef4444, #f97316);
  --danger: #f43f5e;
  --ok: #22c55e;
  --gold: #fbbf24;
  --rad: 16px;
  --rad-sm: 10px;
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
body::before, body::after {
  content: ""; position: fixed; z-index: -1; width: 60vw; height: 60vw;
  border-radius: 50%; filter: blur(120px); opacity: 0.3; pointer-events: none;
}
body::before { top: -20vw; left: -15vw; background: radial-gradient(circle, #7c3aed 0%, transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
body::after { bottom: -25vw; right: -15vw; background: radial-gradient(circle, #ec4899 0%, transparent 70%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(6vw,4vw) scale(1.15); } }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: var(--ink); }

.container { width: min(1240px, 94%); margin-inline: auto; }
.muted { color: var(--muted); }
.muted2 { color: var(--muted-2); }

/* ---------------- header ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(11, 10, 22, 0.78);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; }
.logo-badge {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 0.8rem; box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}
.logo em { font-style: normal; background: var(--grad-soft); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { display: flex; gap: 4px; list-style: none; }
.topnav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.92rem;
  transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--ink); background: var(--card-strong); }
.topnav a.active { color: #fff; background: rgba(124, 58, 237, 0.25); }
.topbar-search { display: flex; align-items: center; gap: 8px; margin-left: auto; background: var(--card-strong); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; min-width: 180px; }
.topbar-search svg { flex: none; color: var(--muted); }
.topbar-search input { background: none; border: none; outline: none; width: 100%; font-size: 0.9rem; }
.topbar-search input::placeholder { color: var(--muted-2); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--card);
  color: var(--muted); display: grid; place-items: center; transition: all .2s;
}
.icon-btn:hover { color: #fff; background: var(--card-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px;
  padding: 11px 22px; font-weight: 700; font-size: 0.95rem; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(0.97); }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35); }
.btn-grad:hover { box-shadow: 0 8px 26px rgba(236, 72, 153, 0.5); }
.btn-ghost { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.16); }
.btn-danger { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.4); color: var(--danger); }
.btn-danger:hover { background: rgba(244, 63, 94, 0.25); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------------- hero carousel ---------------- */
.hero { position: relative; border-radius: 22px; overflow: hidden; margin-top: 22px; height: clamp(360px, 58vh, 540px); background: var(--bg-2); border: 1px solid var(--border); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); transition: transform 6s ease; }
.hero-slide.active .bg { transform: scale(1); }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,10,22,0.92) 0%, rgba(11,10,22,0.55) 45%, transparent 75%), linear-gradient(0deg, rgba(11,10,22,0.9) 0%, transparent 45%); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 46px; max-width: 640px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; width: fit-content; background: rgba(236,72,153,0.18); border: 1px solid rgba(236,72,153,0.45); color: #f9a8d4; font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; border-radius: 999px; padding: 5px 13px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); line-height: 1.12; letter-spacing: -1px; margin-bottom: 10px; }
.hero p { color: rgba(244,242,255,0.85); max-width: 520px; margin-bottom: 22px; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-dots { position: absolute; right: 26px; bottom: 22px; z-index: 3; display: flex; gap: 8px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 99px; border: none; background: rgba(255,255,255,0.35); transition: all .3s; padding: 0; }
.hero-dots button.active { width: 26px; background: var(--grad-soft); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(11,10,22,0.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow.prev { left: 16px; } .hero-arrow.next { right: 16px; }

/* ---------------- sections & rows ---------------- */
.section { margin-top: 44px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title { font-size: 1.45rem; letter-spacing: -0.5px; }
.section-sub { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.row-scroll { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-nav { display: flex; gap: 8px; }
.row-nav button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--muted); display: grid; place-items: center; transition: all .2s; }
.row-nav button:hover { color: #fff; background: var(--card-strong); }

/* ---------------- cards ---------------- */
.card { display: flex; flex-direction: column; width: 168px; flex: 0 0 168px; scroll-snap-align: start; min-width: 0; }
.card-poster { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 2/3; background: var(--bg-2); border: 1px solid rgba(255,255,255,0.06); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover .card-poster { transform: translateY(-5px) scale(1.02); box-shadow: 0 16px 34px rgba(0,0,0,0.5); border-color: rgba(167,139,250,0.5); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; }
.card-badge { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(11,10,22,0.88); border: 1px solid rgba(255,255,255,0.16); }
.card-badge.ongoing { color: #fbbf24; }
.card-badge.completed { color: #86efac; }
.card-rating { position: absolute; bottom: 8px; right: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 800; background: rgba(11,10,22,0.9); border: 1px solid rgba(251,191,36,0.4); color: var(--gold); padding: 3px 9px; border-radius: 999px; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,0.14); }
.card-progress i { display: block; height: 100%; background: var(--grad-soft); }
.card-fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(11,10,22,0.75); color: #fff; display: grid; place-items: center; opacity: 0; transition: all .2s; }
.card:hover .card-fav { opacity: 1; }
.card-fav.on { opacity: 1; color: var(--danger); border-color: rgba(244,63,94,0.6); }
.card-fav svg { width: 15px; height: 15px; }
.card-info { padding: 10px 2px 0; min-width: 0; flex: 1 0 auto; }
.card-title { display: block; font-weight: 700; font-size: 0.92rem; line-height: 1.35; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.card-meta { color: var(--muted-2); font-size: 0.78rem; margin-top: 1px; }
.card-genres { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.card-genres span { font-size: 0.66rem; font-weight: 700; color: var(--muted); background: var(--card-strong); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }

/* ---------------- grid ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px; }

/* ---------------- strip banner (iklan) ---------------- */
.strip-banner { position: relative; border-radius: 18px; overflow: hidden; margin-top: 44px; border: 1px solid var(--border); cursor: pointer; }
.strip-banner .bg { height: 150px; background-size: cover; background-position: center; position: relative; }
.strip-banner .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,10,22,0.88), rgba(11,10,22,0.25)); }
.strip-banner .txt { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 30px; z-index: 2; }
.strip-banner .tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #f9a8d4; margin-bottom: 4px; }
.strip-banner h3 { font-size: 1.25rem; }
.strip-banner p { color: var(--muted); font-size: 0.9rem; }

/* ---------------- footer ---------------- */
footer { margin-top: 70px; border-top: 1px solid var(--border); background: rgba(11,10,22,0.6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 44px 0 26px; }
.footer-grid h4 { font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; transition: color .2s; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { color: var(--muted); font-size: 0.92rem; margin-top: 10px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted-2); font-size: 0.84rem; }
.disclaimer { color: var(--muted-2); font-size: 0.78rem; padding-bottom: 26px; }

/* ---------------- detail page ---------------- */
.detail-hero { position: relative; margin-top: 22px; border-radius: 22px; overflow: hidden; height: clamp(300px, 42vh, 420px); border: 1px solid var(--border); }
.detail-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 2%, rgba(11,10,22,0.35) 60%), linear-gradient(90deg, rgba(11,10,22,0.5), transparent 70%); }
.detail-body { position: relative; z-index: 2; display: flex; gap: 30px; margin-top: -150px; align-items: flex-end; }
.detail-poster { width: 200px; flex: 0 0 200px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 24px 50px rgba(0,0,0,0.6); aspect-ratio: 2/3; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; padding-bottom: 6px; }
.detail-info h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: -1px; line-height: 1.15; }
.detail-original { color: var(--muted-2); font-size: 0.95rem; margin-bottom: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--muted); background: var(--card-strong); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; }
.chip.star { color: var(--gold); border-color: rgba(251,191,36,0.35); }
.chip.flag { font-size: 0.95rem; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-synopsis { max-width: 780px; color: rgba(244,242,255,0.82); }
.detail-cast { margin-top: 18px; }
.detail-cast h4, .detail-synopsis h4 { font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.cast-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cast-chip { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; font-size: 0.85rem; font-weight: 600; }

/* ---------------- episodes ---------------- */
.eps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.eps-card { position: relative; display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 13px 15px; transition: all .2s; overflow: hidden; }
.eps-card:hover { background: var(--card-strong); border-color: rgba(167,139,250,0.55); transform: translateY(-2px); }
.eps-card .num { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; background: rgba(124,58,237,0.2); border: 1px solid rgba(124,58,237,0.4); display: grid; place-items: center; font-weight: 800; color: #c4b5fd; }
.eps-card .info { flex: 1; min-width: 0; }
.eps-card .info b { display: block; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eps-card .info span { color: var(--muted-2); font-size: 0.78rem; }
.eps-card .play-ic { color: var(--muted); transition: all .2s; }
.eps-card:hover .play-ic { color: #fff; }
.eps-card.done .num { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.45); color: #86efac; }
.eps-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad-soft); width: 0; }

/* ---------------- watch page ---------------- */
.watch-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 22px; margin-top: 22px; }
.watch-stage { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: #000; position: relative; }
.watch-stage video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }
.watch-stage iframe { width: 100%; display: block; aspect-ratio: 16/9; border: 0; background: #000; }
.watch-stage.theater video, .watch-stage.theater iframe { aspect-ratio: auto; max-height: calc(100vh - 120px); }
.watch-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; background: var(--bg-2); border-top: 1px solid var(--border); }
.watch-tools .tt { font-weight: 800; font-size: 1.05rem; }
.watch-tools .tt small { color: var(--muted-2); font-weight: 600; font-size: 0.8rem; }
.watch-tools .spacer { flex: 1; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; transition: all .2s; }
.mini-btn:hover { color: #fff; background: var(--card-strong); }
.mini-btn.on { color: #fff; background: rgba(124,58,237,0.35); border-color: rgba(167,139,250,0.6); }
.watch-info { padding: 18px 20px; background: var(--bg-2); border-top: 1px solid var(--border); }
.watch-info h2 { font-size: 1.3rem; letter-spacing: -0.4px; }
.watch-info .muted { font-size: 0.9rem; }
.watch-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.watch-side .side-head { display: flex; align-items: center; justify-content: space-between; }
.watch-side .side-head b { font-size: 0.95rem; }
.eps-list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.eps-list .eps-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; transition: all .2s; }
.eps-list .eps-item:hover { background: var(--card-strong); }
.eps-list .eps-item.active { border-color: rgba(167,139,250,0.7); background: rgba(124,58,237,0.18); }
.eps-list .eps-item .n { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: rgba(124,58,237,0.22); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; color: #c4b5fd; }
.eps-list .eps-item .t { flex: 1; min-width: 0; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eps-list .eps-item .d { color: var(--muted-2); font-size: 0.72rem; }
.eps-list .eps-item.done .n { background: rgba(34,197,94,0.2); color: #86efac; }
.eps-list .eps-item .bar { position: relative; }
.nextup { position: absolute; z-index: 5; right: 16px; bottom: 16px; background: rgba(11,10,22,0.92); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; width: 300px; backdrop-filter: blur(10px); animation: slideup .4s ease; }
@keyframes slideup { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.nextup .lbl { font-size: 0.72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #f9a8d4; }
.nextup h4 { margin: 4px 0 10px; font-size: 0.98rem; }
.nextup .row { display: flex; gap: 8px; }
.nextup .count { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,0.1); font-weight: 800; font-size: 0.9rem; }

/* ---------------- explore / search ---------------- */
.page-head { margin-top: 30px; }
.page-head h1 { font-size: 1.9rem; letter-spacing: -1px; }
.page-head p { color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; align-items: center; }
.filters select { background: var(--card-strong); border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; font-size: 0.88rem; outline: none; cursor: pointer; }
.filters select option { background: var(--bg-2); }
.chip-btn { border: 1px solid var(--border); background: var(--card); color: var(--muted); border-radius: 999px; padding: 8px 16px; font-size: 0.85rem; font-weight: 700; transition: all .2s; }
.chip-btn:hover { color: #fff; background: var(--card-strong); }
.chip-btn.on { background: rgba(124,58,237,0.3); border-color: rgba(167,139,250,0.6); color: #fff; }
.result-count { color: var(--muted-2); font-size: 0.9rem; margin-bottom: 18px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted-2); }
.empty-state .big { font-size: 2.6rem; margin-bottom: 10px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination button { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--card); color: var(--muted); font-weight: 700; }
.pagination button.on { background: var(--grad); color: #fff; border-color: transparent; }
.pagination button:disabled { opacity: 0.35; }

/* ---------------- admin ---------------- */
.admin-body { background: var(--bg); }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { background: rgba(18,16,34,0.9); border-right: 1px solid var(--border); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .logo { margin: 0 8px 22px; }
.admin-nav { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 0.92rem; transition: all .2s; }
.admin-nav a:hover { background: var(--card-strong); color: #fff; }
.admin-nav a.active { background: rgba(124,58,237,0.25); color: #fff; }
.admin-nav a .ic { width: 20px; text-align: center; }
.admin-side .side-foot { margin-top: 26px; padding: 12px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--muted-2); }
.admin-main { padding: 28px 32px 60px; min-width: 0; }
.admin-main h1 { font-size: 1.6rem; letter-spacing: -0.6px; margin-bottom: 4px; }
.admin-main .sub { color: var(--muted); margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.stat-card .lbl { color: var(--muted-2); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.stat-card .val { font-size: 1.7rem; font-weight: 800; letter-spacing: -1px; margin-top: 4px; }
.stat-card .sub2 { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.stat-card.grad { background: linear-gradient(135deg, rgba(124,58,237,0.35), rgba(236,72,153,0.3)); border-color: rgba(167,139,250,0.4); }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 24px; }
.panel h3 { font-size: 1.02rem; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel h3 .act { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-2.cols { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .grid-2, .grid-2.cols { grid-template-columns: 1fr; } }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbl th { text-align: left; color: var(--muted-2); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,0.02); }
.tbl .thumb { width: 42px; height: 60px; border-radius: 7px; object-fit: cover; border: 1px solid var(--border); }
.tbl .row-act { display: flex; gap: 6px; justify-content: flex-end; }
.mini { padding: 5px 11px; font-size: 0.76rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--muted); font-weight: 700; transition: all .2s; cursor: pointer; }
.mini:hover { color: #fff; background: var(--card-strong); }
.mini.danger { color: var(--danger); border-color: rgba(244,63,94,0.35); }
.mini.danger:hover { background: rgba(244,63,94,0.15); }
.mini.ok { color: #86efac; border-color: rgba(34,197,94,0.35); }
.mini.ok:hover { background: rgba(34,197,94,0.12); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.pill.green { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.pill.amber { background: rgba(251,191,36,0.15); color: #fcd34d; border: 1px solid rgba(251,191,36,0.3); }
.pill.purple { background: rgba(124,58,237,0.18); color: #c4b5fd; border: 1px solid rgba(124,58,237,0.4); }
.pill.gray { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.fld input, .fld select, .fld textarea {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px 13px;
  font-size: 0.92rem; outline: none; transition: border-color .2s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: rgba(167,139,250,0.7); }
.fld textarea { resize: vertical; min-height: 84px; }
.fld input[type="file"] { padding: 8px; }
.fld .hint { font-size: 0.74rem; color: var(--muted-2); }
.fld .hint.ok { color: #86efac; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.check-row input { accent-color: #8b5cf6; width: 17px; height: 17px; }

.upload-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-box .preview { width: 46px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); background: var(--bg-2); display: grid; place-items: center; color: var(--muted-2); font-size: 0.7rem; overflow: hidden; }
.upload-box .preview.vid { width: 74px; height: 46px; }
.upload-box .meta { flex: 1; min-width: 140px; font-size: 0.8rem; color: var(--muted-2); }
.upload-box .meta b { color: var(--ink); font-weight: 700; }
.up-progress { height: 5px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 6px; }
.up-progress i { display: block; height: 100%; width: 0; background: var(--grad-soft); transition: width .3s; }

.modal-back { position: fixed; inset: 0; background: rgba(5,4,12,0.7); backdrop-filter: blur(4px); z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px; padding: 26px; width: min(480px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.modal h3 { margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bar-chart .bar i { width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: var(--grad); min-height: 3px; transition: height .4s; opacity: 0.85; }
.bar-chart .bar span { font-size: 0.66rem; color: var(--muted-2); }
.bar-chart .bar:hover i { opacity: 1; }
.bar-chart .bar .tip { font-size: 0.66rem; color: var(--muted); font-weight: 700; }
.donut-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.legend .li { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 11px; height: 11px; border-radius: 4px; }
.legend b { margin-left: auto; }

.toast { position: fixed; bottom: 24px; right: 24px; z-index: 120; background: var(--bg-2); border: 1px solid var(--border); border-left: 4px solid var(--grad-soft); border-radius: 12px; padding: 13px 18px; font-size: 0.9rem; font-weight: 600; box-shadow: 0 16px 40px rgba(0,0,0,0.5); animation: slideup .3s ease; max-width: 340px; }
.toast.err { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------------- login ---------------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); background: var(--bg-2); border: 1px solid var(--border); border-radius: 20px; padding: 34px; box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.login-card .logo { font-size: 1.4rem; margin-bottom: 6px; }
.login-card h2 { font-size: 1.3rem; margin: 14px 0 4px; }
.login-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.login-card .fld { margin-bottom: 16px; }
.login-note { margin-top: 16px; font-size: 0.78rem; color: var(--muted-2); text-align: center; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .topnav { display: none; }
  .topbar-search { min-width: 0; flex: 1; }
  .detail-body { flex-direction: column; align-items: center; text-align: center; margin-top: -120px; }
  .detail-info { text-align: center; }
  .detail-actions, .chips, .cast-chips { justify-content: center; }
  .watch-wrap { grid-template-columns: 1fr; }
  .watch-side .eps-list { max-height: 300px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { padding: 26px; }
  .hero-arrow { display: none; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
  .card { width: 132px; flex: 0 0 132px; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 20px 16px 50px; }
}

/* ============================================================
   Komentar & Request (halaman drama publik)
   ============================================================ */
.comm-form { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 22px; }
.comm-form h4 { margin-bottom: 12px; font-size: 0.98rem; }
.comm-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.inp { flex: 1; min-width: 180px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 10px 13px; outline: none; color: var(--ink); font: inherit; }
.inp:focus { border-color: rgba(167, 139, 250, 0.7); }
textarea.inp { width: 100%; resize: vertical; margin-bottom: 10px; }
.stars-input { display: flex; gap: 2px; align-items: center; }
.stars-input .star { font-size: 1.3rem; color: #4b4668; cursor: pointer; transition: color .15s; user-select: none; }
.stars-input .star.on, .stars-input .star:hover { color: #fbbf24; }
.comm-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.comm-item .comm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comm-item .comm-head b { font-size: 0.95rem; }
.comm-item .comm-date { margin-left: auto; font-size: 0.76rem; color: var(--muted); }
.comm-item .comm-stars { color: #fbbf24; font-size: 0.82rem; margin: 2px 0 8px; letter-spacing: 2px; }
.comm-item .comm-stars .off { color: #4b4668; }
.comm-item p { color: var(--muted); font-size: 0.92rem; }

/* ============================================================
   Admin dashboard: chart bulanan, peta, item
   ============================================================ */
.h3row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav .mini { padding: 6px 12px; }
.month-nav .mini:disabled { opacity: 0.35; cursor: not-allowed; }
.month-nav .mLabel { font-size: 0.85rem; font-weight: 700; color: var(--muted); min-width: 110px; text-align: center; }
.month-chart { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding: 14px 2px 0; }
.month-chart .dbar { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; position: relative; }
.month-chart .dbar .dbar-v { width: 45%; max-width: 14px; border-radius: 5px 5px 2px 2px; background: var(--grad); opacity: 0.9; min-height: 2px; }
.month-chart .dbar .dbar-p { width: 30%; max-width: 9px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #22d3ee, #0891b2); opacity: 0.85; min-height: 2px; }
.month-chart .dbar:hover .dbar-v { opacity: 1; }
.month-chart .dbar span { position: absolute; bottom: -18px; font-size: 0.6rem; color: var(--muted-2); }
.month-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; font-size: 0.8rem; color: var(--muted); }
.month-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.month-legend .lg-v { background: var(--grad); }
.month-legend .lg-p { background: #22d3ee; }
.month-legend .ml-tot b { color: var(--ink); }

.geo-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.map-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: radial-gradient(600px 300px at 30% 20%, rgba(124, 58, 237, 0.25), transparent 70%), var(--bg); min-height: 420px; isolation: isolate; z-index: 0; }
.map-wrap img { width: 100%; display: block; }
.map-dots { position: absolute; inset: 0; }
.map-dot { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(251, 113, 133, 0.95), rgba(236, 72, 153, 0.7)); box-shadow: 0 0 10px rgba(236, 72, 153, 0.8); border: 1.5px solid rgba(255, 255, 255, 0.75); animation: mappulse 2s infinite; }
@keyframes mappulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.4; } }
/* leaflet (peta interaktif) */
.map-wrap .leaflet-container { background: #0b0a16; font-family: var(--font); width: 100%; height: 100%; }
.map-wrap .leaflet-tile-pane { filter: saturate(1.1); }
.leaflet-tooltip { background: #171430; border: 1px solid rgba(167, 139, 250, 0.45); color: #f4f2ff; border-radius: 9px; padding: 7px 11px; font-size: 0.78rem; font-weight: 600; line-height: 1.45; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55); }
.leaflet-tooltip-top:before { border-top-color: #171430; }
.leaflet-bar a { background: #171430 !important; color: #f4f2ff !important; border-color: rgba(255, 255, 255, 0.12) !important; }
.leaflet-bar a:hover { background: #221c44 !important; }
.leaflet-control-attribution { background: rgba(11, 10, 22, 0.65) !important; color: #6f6a92 !important; font-size: 0.6rem !important; }
.leaflet-control-attribution a { color: #8b7fd4 !important; }
.map-scale { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.72rem; color: var(--muted-2); }
.map-scale i { flex: 1; height: 8px; border-radius: 6px; background: linear-gradient(90deg, rgba(124, 58, 237, 0.45), #ec4899, #f43f5e); }
.geo-legend h4 { font-size: 0.78rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.prov { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 0.84rem; }
.prov span { width: 155px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prov i { flex: 1; height: 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; display: block; }
.prov i b { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.prov em { font-style: normal; color: var(--muted); width: 40px; text-align: right; font-weight: 700; }

td.rank { font-weight: 900; color: var(--muted-2); width: 30px; }
.popbar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); margin-top: 6px; overflow: hidden; max-width: 220px; }
.popbar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }

.mini-item { padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.mini-item:last-child { border-bottom: none; }
.mini-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mini-head b { font-size: 0.9rem; }
.mini-head span { font-size: 0.74rem; color: var(--muted); }
.mini-item p { color: var(--muted); font-size: 0.86rem; margin-top: 3px; }

.pill.purple { background: rgba(124, 58, 237, 0.15); color: #c4b5fd; border: 1px solid rgba(124, 58, 237, 0.3); }
.pill.new { background: rgba(251, 191, 36, 0.15); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.3); }
.pill.done { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.3); }

@media (max-width: 860px) {
  .geo-wrap { grid-template-columns: 1fr; }
}

/* filter chip aktif (dipakai view request admin) */
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(236, 72, 153, 0.35); }

/* ---------------- popup banner iklan ---------------- */
.popup-banner { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
/* PENTING: display:grid di atas menimpa atribut [hidden] (UA style), sehingga
   elemen yang "disembunyikan" masih tampil/memblokir klik. Aturan ini memastikan
   [hidden] benar-benar menyembunyikan overlay (termasuk saat masih kosong). */
.popup-banner[hidden] { display: none !important; }
.popup-back { position: absolute; inset: 0; background: rgba(5, 4, 12, 0.78); backdrop-filter: blur(5px); animation: fadeIn .25s ease; }
.popup-card { position: relative; width: min(440px, 100%); border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65); animation: slideup .35s ease; }
.popup-card a { display: block; }
.popup-card img { width: 100%; display: block; max-height: 70vh; object-fit: cover; }
.popup-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: rgba(11, 10, 22, 0.72); color: #fff; font-size: 0.95rem; cursor: pointer; display: grid; place-items: center; transition: all .2s; }
.popup-close:hover { background: var(--danger); border-color: transparent; }
.popup-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; background: linear-gradient(transparent, rgba(5, 4, 12, 0.92)); font-weight: 800; font-size: 1rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- banner iklan watch (di atas layar film) ---------------- */
.watch-ads { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.watch-ad { position: relative; width: 100%; max-width: 720px; margin-inline: auto; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--card); }
.watch-ad a { display: block; }
.watch-ad img { display: block; width: 100%; height: auto; max-height: 110px; object-fit: contain; background: #000; transition: transform .25s ease; }
.watch-ad a:hover img { transform: scale(1.02); }
.watch-ad .ad-tag { position: absolute; top: 6px; left: 8px; font-size: 0.62rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.85); background: rgba(5,4,12,.55); border: 1px solid rgba(255,255,255,.2); padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
