/* BioskopKu — UI ala Netflix */
:root {
  --bg: #0b0b0f;
  --bg2: #141414;
  --card: #181820;
  --text: #eee;
  --muted: #9a9aa5;
  --accent: #e50914;
  --accent2: #ff4d55;
  --radius: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

/* ===== Topbar ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px;
  background: linear-gradient(to bottom, rgba(8,8,12,.92), rgba(8,8,12,.55) 70%, transparent);
  transition: background .3s;
}
.topbar.scrolled { background: #0b0b0fee; backdrop-filter: blur(10px); box-shadow: 0 2px 18px #0009; }
.brand {
  font-family: 'Arial Black', 'Segoe UI', sans-serif;
  font-size: 24px; font-weight: 900; letter-spacing: 1px;
  color: var(--accent); text-decoration: none; white-space: nowrap;
  text-shadow: 0 2px 12px #e5091455;
}
.brand span { color: #fff; }
.nav-links { display: flex; gap: 18px; flex: 1; }
.nav-links a { color: #e5e5e5; text-decoration: none; font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: #fff; font-weight: 600; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #00000080; border: 1px solid #ffffff2e; border-radius: 6px;
  padding: 7px 12px; min-width: 200px;
}
.search-box:focus-within { border-color: #fff; box-shadow: 0 0 0 2px #ffffff22; }
.icon-search { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search-box input {
  background: none; border: none; outline: none; color: #fff;
  font-size: 14px; width: 100%;
}
.btn-clear {
  background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer;
}
.btn-clear:hover { color: #fff; }

/* ===== Hero ===== */
.hero { position: relative; height: 88vh; min-height: 480px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 15%;
  transform: scale(1.05); animation: heroZoom 18s ease-out forwards;
  transition: opacity .6s;
}
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1.0); } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, transparent 45%),
              linear-gradient(to right, #0b0b0fd9 0%, #0b0b0f66 45%, transparent 75%);
}
.hero-body {
  position: absolute; left: 4vw; bottom: 22%; max-width: 560px; z-index: 2;
}
.hero-badge {
  display: inline-block; background: #e50914; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 2px;
  padding: 5px 10px; border-radius: 4px; margin-bottom: 14px;
}
.hero-body h1 {
  font-size: clamp(30px, 4.5vw, 56px); line-height: 1.08;
  text-shadow: 0 4px 24px #000c; margin-bottom: 10px;
}
.hero-meta { color: #cfcfcf; font-size: 14px; margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-meta .badge-playable { color: #46d369; font-weight: 700; }
.hero-desc {
  color: #ddd; font-size: 15px; line-height: 1.6; margin-bottom: 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 8px #000a;
}
.hero-actions { display: flex; gap: 12px; }
.btn {
  border: none; cursor: pointer; border-radius: 5px;
  font-size: 16px; font-weight: 700; padding: 12px 26px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s, background .2s;
}
.btn:active { transform: scale(.96); }
.btn-play { background: #fff; color: #0b0b0f; }
.btn-play:hover { background: #e50914; color: #fff; }
.btn-info { background: #666a; color: #fff; }
.btn-info:hover { background: #888a; }

.hero-dots { position: absolute; bottom: 20px; left: 4vw; display: flex; gap: 8px; z-index: 3; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; background: #ffffff55; cursor: pointer; padding: 0;
}
.hero-dots button.active { background: var(--accent); transform: scale(1.25); }

/* ===== Rows ===== */
main { padding: 30px 4vw 10px; }
.row { margin-bottom: 38px; }
.row-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.row-head h2 { font-size: 19px; font-weight: 700; }
.row-head .sub { color: var(--muted); font-size: 13px; }
.row-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 14px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.row-scroll::-webkit-scrollbar { height: 8px; }
.row-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.card {
  position: relative; flex: 0 0 auto; width: 168px; cursor: pointer;
  scroll-snap-align: start; transition: transform .25s;
}
.card:hover, .card:focus-visible { transform: scale(1.07); z-index: 5; outline: none; }
.card .poster-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: #222; aspect-ratio: 2/3; }
.card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card img.ghost { filter: brightness(.4); }
.card .play-badge {
  position: absolute; top: 8px; left: 8px;
  background: #000000b3; color: #46d369; border: 1px solid #46d36977;
  font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 4px;
}
.card .quality {
  position: absolute; bottom: 8px; right: 8px;
  background: #000000b3; color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 6px; border: 1px solid #ffffff44; border-radius: 4px;
}
.card .title {
  font-size: 12.5px; color: #ddd; margin-top: 8px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .title .yr { color: var(--muted); }

/* ===== Search results grid ===== */
.search-results { padding: 110px 4vw 40px; }
.search-results h2 { margin-bottom: 18px; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ===== Footer ===== */
.footer { padding: 40px 4vw 60px; border-top: 1px solid #ffffff14; margin-top: 30px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.footer a { color: #7ab8ff; }
.footer .muted { font-size: 11px; color: #666; }

/* ===== Modal detail ===== */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #000000c9; backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.overlay[hidden] { display: none; }
.modal-card {
  width: min(680px, 94vw); max-height: 88vh; overflow-y: auto;
  background: var(--bg2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 80px #000c; animation: pop .25s ease;
}
@keyframes pop { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-hero { position: relative; aspect-ratio: 16/9; background-size: cover; background-position: center 20%; }
.modal-hero .shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg2), transparent 60%); }
.modal-hero h3 {
  position: absolute; bottom: 14px; left: 20px; right: 20px;
  font-size: clamp(20px, 3.5vw, 30px); text-shadow: 0 2px 12px #000;
}
.modal-body { padding: 18px 22px 26px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; font-size: 13px; color: #cfcfcf; }
.modal-meta .tag { background: #ffffff14; padding: 3px 9px; border-radius: 4px; }
.modal-meta .score { color: #46d369; font-weight: 700; }
.modal-desc { color: #ccc; font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-actions .btn { font-size: 14px; padding: 10px 20px; }
.btn-watch-legal { background: #fff; color: #111; }
.btn-watch-legal:hover { background: var(--accent); color: #fff; }
.btn-trailer { background: #666a; color: #fff; }
.btn-trailer:hover { background: #888a; }
.cast { margin-top: 18px; font-size: 13px; color: var(--muted); line-height: 1.8; }

/* ===== Trailer embed ===== */
.trailer-embed {
  position: relative;
  width: 100%;
  margin: 14px 0 4px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.trailer-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Share ===== */
.share-box {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid #ffffff14;
}
.share-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; letter-spacing: .4px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-share {
  background: #ffffff14; color: #eee; font-size: 13px; padding: 9px 16px;
  border: 1px solid #ffffff22;
}
.btn-share:hover { background: #e50914; border-color: #e50914; color: #fff; }
.btn-share-hero { background: #666a; color: #fff; }
.btn-share-hero:hover { background: #888a; }

/* ===== Player ===== */
.overlay-player { background: #000000f2; }
.player-close {
  position: absolute; top: 18px; right: 22px; z-index: 5;
  background: #e50914; color: #fff; border: none; border-radius: 50%;
  width: 42px; height: 42px; font-size: 18px; cursor: pointer;
  box-shadow: 0 4px 20px #000a;
}
.player-wrap { width: min(1100px, 94vw); }
.player-wrap video {
  width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 8px;
  box-shadow: 0 20px 60px #000d; outline: none;
}
.player-title { text-align: center; margin-top: 14px; color: #ddd; font-size: 15px; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: 12px 22px; border-radius: 8px;
  border: 1px solid #ffffff22; font-size: 14px; z-index: 300;
  box-shadow: 0 8px 30px #000a; animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== Iklan (Adsterra) ===== */
.ad-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
  text-align: center;
}
.ad-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 26px auto 10px;
  padding: 0 16px;
  min-height: 250px;
}
.ad-native {
  padding: 22px 4vw 6px;
  border-top: 1px solid #1c1c26;
  margin-top: 26px;
}
.ad-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0 6px;
  padding: 0 4vw;
  min-height: 50px;
}

/* ===== Skeleton loading ===== */
.skel-row { margin-bottom: 38px; }
.skel-title { width: 180px; height: 18px; background: #222; border-radius: 4px; margin-bottom: 14px; animation: shimmer 1.4s infinite; }
.skel-strip { display: flex; gap: 10px; }
.skel-card { width: 168px; aspect-ratio: 2/3; background: #1c1c24; border-radius: 8px; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .topbar { padding: 10px 14px; gap: 12px; }
  .nav-links { display: none; }
  .brand { font-size: 20px; }
  .search-box { min-width: 0; flex: 1; }
  .hero { height: 70vh; }
  .hero-body { bottom: 16%; }
  .hero-actions .btn { font-size: 14px; padding: 10px 18px; }
  .card { width: 132px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
