/* Tema ala Netflix: hitam pekat, merah #E50914, baris poster horizontal, hero besar. Tanpa font eksternal (CSP). */
:root {
  --bg-0: #000; --bg-1: #141414; --bg-2: #1f1f1f; --bg-3: #2b2b2b; --bg-4: #3a3a3a;
  --border: #333; --border-hi: #4d4d4d;
  --fg-0: #fff; --fg-1: #e5e5e5; --fg-2: #a3a3a3; --fg-3: #737373;
  --red: #e50914; --red-hi: #f6121d; --danger: #ff4d4d;
  --radius-sm: 4px; --radius: 6px; --radius-lg: 10px;
  --top-h: 60px; --nav-h: 62px; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --pad: 16px;
  color-scheme: dark;
}
@media (min-width: 900px) { :root { --top-h: 68px; --pad: 4vw; } }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + var(--safe-t)); }
html, body { margin: 0; padding: 0; background: var(--bg-1); color: var(--fg-0); font-family: "Netflix Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
#app { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
@media (min-width: 900px) { #app { padding-bottom: 0; } }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ico { flex-shrink: 0; display: block; }
[data-icon] { display: inline-flex; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }

/* ---- Topbar ---- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 110; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) var(--pad) 0; display: flex; align-items: center; gap: 28px; background: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,0) 100%); transition: background-color .3s; }
.topbar.scrolled { background: var(--bg-1); box-shadow: 0 2px 12px rgba(0,0,0,.6); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--red); font-weight: 900; letter-spacing: .02em; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--red); color: #fff; font-size: 15px; font-weight: 900; }
.brand-name { font-size: 20px; text-transform: uppercase; letter-spacing: .06em; }
.nav-list { display: none; gap: 20px; flex: 1; }
@media (min-width: 900px) { .nav-list { display: flex; } }
.nav-item { color: var(--fg-1); text-decoration: none; font-size: 14px; transition: color .2s; }
.nav-item:hover { color: var(--fg-2); }
.nav-item.active { color: #fff; font-weight: 700; }
.topbar-support { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
.topbar-support:hover { background: rgba(255,255,255,.22); }
.topbar-support .ico { width: 16px; height: 16px; }
@media (max-width: 899px) { .topbar-support-text { display: none; } .topbar-support { padding: 8px; } }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(20,20,20,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding-bottom: var(--safe-b); z-index: 100; }
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: var(--nav-h); color: var(--fg-2); text-decoration: none; font-size: 11px; font-weight: 500; }
.bottom-nav-item .ico { width: 22px; height: 22px; }
.bottom-nav-item.active { color: #fff; }
.bottom-nav-item.active .ico { color: var(--red); }

/* ---- Layout ---- */
.main { min-width: 0; padding: calc(var(--top-h) + var(--safe-t) + 12px) var(--pad) 32px; }
.main.has-hero { padding-top: 0; }
.view { max-width: 1600px; margin: 0 auto; }
h1, h2, h3 { margin: 0 0 14px; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; color: var(--fg-1); }
p { margin: 0 0 12px; line-height: 1.6; color: var(--fg-1); }
@media (min-width: 900px) { h1 { font-size: 36px; } h2 { font-size: 22px; } }
a { color: #fff; }

/* ---- Hero ---- */
.hero { position: relative; margin: 0 calc(var(--pad) * -1); min-height: min(76vh, 620px); display: flex; align-items: flex-end; overflow: hidden; background: var(--bg-0); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.55) saturate(1.2); transform: scale(1.25); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20,20,20,.92) 0%, rgba(20,20,20,.35) 55%, rgba(20,20,20,.1) 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; z-index: 1; background: linear-gradient(180deg, transparent, var(--bg-1)); }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1600px; margin: 0 auto; padding: calc(var(--top-h) + var(--safe-t) + 30px) var(--pad) 56px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero-copy { max-width: 560px; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-1); }
.hero-tag::before { content: ""; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }
.hero-title { font-size: clamp(30px, 6vw, 56px); font-weight: 900; line-height: 1.05; margin-bottom: 14px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.hero-synopsis { color: var(--fg-1); font-size: clamp(14px, 1.6vw, 17px); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 20px; text-shadow: 0 1px 6px rgba(0,0,0,.7); min-height: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-poster { display: none; width: 230px; aspect-ratio: 2/3; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.7); flex-shrink: 0; background: var(--bg-2); }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) { .hero-poster { display: block; } }
.hero-skeleton { min-height: min(60vh, 460px); margin: 0 calc(var(--pad) * -1); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); border: 0; background: rgba(109,109,110,.7); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .2s, transform .1s; }
.btn:hover { background: rgba(109,109,110,.45); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); }
.btn-primary:hover { background: var(--red-hi); }
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255,255,255,.75); }
.btn-ghost { background: transparent; border: 1px solid var(--border-hi); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn[disabled] { opacity: .55; cursor: default; }

/* ---- Rows & cards ---- */
.section { margin-bottom: 28px; }
.section-head { margin-bottom: 10px; }
.row { margin: 0 calc(var(--pad) * -1) 26px; padding: 0 var(--pad); }
.main.has-hero .row:first-of-type { margin-top: -34px; position: relative; z-index: 3; }
.row-wrap { position: relative; margin: 0 calc(var(--pad) * -1); }
.row-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--pad); scrollbar-width: none; padding: 6px var(--pad) 14px; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .card { flex: 0 0 auto; width: 132px; scroll-snap-align: start; }
@media (min-width: 600px) { .row-track .card { width: 160px; } }
@media (min-width: 1100px) { .row-track .card { width: 190px; } }
.row-arrow { display: none; position: absolute; top: 6px; bottom: 14px; z-index: 5; width: var(--pad); min-width: 44px; border: 0; background: rgba(20,20,20,.7); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s; align-items: center; justify-content: center; }
.row-arrow-prev { left: 0; } .row-arrow-next { right: 0; }
@media (hover: hover) and (min-width: 900px) { .row-arrow { display: flex; } .row-wrap:hover .row-arrow { opacity: 1; } .row-arrow:hover { background: rgba(20,20,20,.9); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px 8px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 10px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); } }
.card { display: block; text-decoration: none; color: inherit; min-width: 0; transition: transform .25s ease, z-index 0s .25s; position: relative; }
.card-poster { position: relative; aspect-ratio: 2/3; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.6)); opacity: 0; transition: opacity .25s; }
.card-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.55); border: 2px solid #fff; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.card-badge { position: absolute; z-index: 2; top: 6px; left: 6px; max-width: calc(100% - 12px); padding: 2px 7px; border-radius: 3px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body { padding: 8px 2px 0; }
.card-title { font-size: 13px; font-weight: 600; margin: 0; color: var(--fg-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) {
  .card:hover { transform: scale(1.07); z-index: 4; transition: transform .25s ease, z-index 0s; }
  .card:hover .card-poster { box-shadow: 0 10px 30px rgba(0,0,0,.8); }
  .card:hover .card-poster::after, .card:hover .card-play { opacity: 1; transform: none; }
  .card:hover .card-title { color: #fff; }
}
.collection-card { position: relative; }
.row-track .collection-card { flex: 0 0 auto; width: 132px; scroll-snap-align: start; }
.row-track .collection-card .card { width: 100%; }
@media (min-width: 600px) { .row-track .collection-card { width: 160px; } }
@media (min-width: 1100px) { .row-track .collection-card { width: 190px; } }
.state-top { padding-top: 140px; }
.remove-btn { position: absolute; z-index: 6; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.75); color: #fff; border: 1px solid var(--border-hi); cursor: pointer; display: grid; place-items: center; padding: 0; }
.remove-btn:hover { background: var(--red); border-color: var(--red); }
.poster-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); color: var(--fg-3); font-size: 44px; font-weight: 800; }

/* ---- Search / tabs / directory ---- */
.search-bar { margin-bottom: 24px; }
.search-input { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-hi); background: var(--bg-2); color: #fff; font: inherit; font-size: 16px; }
.search-input:focus { outline: none; border-color: #fff; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 20px; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--fg-2); font: inherit; font-size: 15px; font-weight: 600; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: #fff; } .tab.active { color: #fff; border-bottom-color: var(--red); }
.more-wrap { display: flex; justify-content: center; padding: 24px 0 8px; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.letter { min-width: 34px; padding: 6px 8px; border: 1px solid var(--border-hi); background: var(--bg-2); color: var(--fg-1); border-radius: var(--radius-sm); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.letter:hover { border-color: #fff; } .letter.active { background: var(--red); border-color: var(--red); color: #fff; }
.az-list { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 24px; }
.az-list li { break-inside: avoid; }
.az-list a { display: block; padding: 8px 4px; color: var(--fg-1); text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--border); }
.az-list a:hover { color: #fff; background: var(--bg-2); }

/* ---- States ---- */
.state { text-align: center; padding: 48px 16px; color: var(--fg-1); }
.state-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.state-msg { font-size: 14px; color: var(--fg-2); margin-bottom: 16px; }
.error-state { display: grid; justify-items: center; gap: 4px; padding: 32px 16px; text-align: center; background: var(--bg-2); border-left: 4px solid var(--red); border-radius: var(--radius); }
.error-state h3 { color: #fff; margin: 8px 0 4px; } .error-ico { color: var(--red); }
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { aspect-ratio: 2/3; border-radius: var(--radius); }
.skeleton-line { height: 12px; margin-top: 8px; border-radius: 4px; }

/* ---- Notice (katalog belum lengkap) ---- */
.notice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 24px; border-radius: var(--radius); background: var(--bg-2); border-left: 4px solid var(--red); }
.notice-ico { color: var(--red); }
.notice-text { flex: 1 1 260px; font-size: 14px; color: var(--fg-1); line-height: 1.5; }
.notice-text strong { color: #fff; }
.notice-btn { padding: 8px 14px; font-size: 13px; }
.notice-compact { padding: 10px 14px; }

/* ---- Detail ---- */
.detail-hero { position: relative; margin: 0 calc(var(--pad) * -1) 28px; overflow: hidden; background: var(--bg-0); }
.detail-hero .hero-bg { filter: blur(34px) brightness(.4) saturate(1.2); }
.detail-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(180deg, transparent, var(--bg-1)); z-index: 1; }
.detail { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 1600px; margin: 0 auto; padding: calc(var(--top-h) + var(--safe-t) + 20px) var(--pad) 36px; }
@media (min-width: 900px) { .detail { grid-template-columns: 280px minmax(0, 1fr); gap: 40px; } }
.detail-info { min-width: 0; }
.detail-poster { width: 100%; max-width: 220px; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 2/3; background: var(--bg-2); box-shadow: 0 16px 40px rgba(0,0,0,.7); }
@media (min-width: 900px) { .detail-poster { max-width: 280px; } }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info h1 { font-size: clamp(26px, 4.5vw, 44px); font-weight: 900; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.tag { padding: 3px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-hi); color: var(--fg-1); font-size: 12px; font-weight: 600; }
.tag-hot { background: var(--red); border-color: var(--red); color: #fff; }
.tag-score { color: #46d369; border-color: transparent; font-weight: 800; font-size: 14px; padding-left: 0; }
.synopsis { line-height: 1.7; color: var(--fg-1); max-width: 760px; white-space: pre-line; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px; max-width: 760px; margin: 14px 0 0; }
.fact dt { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; } .fact dd { margin: 2px 0 0; font-size: 14px; color: var(--fg-1); }
.episodes { max-width: 1000px; min-width: 0; }
.episodes h2 { display: flex; align-items: center; gap: 10px; }
.ep-count { font-size: 13px; color: var(--fg-3); font-weight: 600; }
.episode-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--border); }
.episode-item a { display: flex; align-items: center; gap: 16px; padding: 14px 10px; border-bottom: 1px solid var(--border); color: var(--fg-1); text-decoration: none; font-size: 15px; }
.episode-item a:hover { background: var(--bg-2); color: #fff; }
.ep-num { min-width: 34px; font-size: 22px; font-weight: 300; color: var(--fg-2); text-align: center; }
.ep-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-state { color: #46d369; display: inline-flex; }
.episode-item a.watched { color: var(--fg-3); } .episode-item a.watched .ep-num { color: var(--fg-3); }
.episode-item a.current { background: var(--bg-3); box-shadow: inset 4px 0 0 var(--red); color: #fff; font-weight: 700; }
.episode-panel .episode-list { max-height: 320px; overflow-y: auto; }

/* ---- Watch ---- */
.watch-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.watch-head h1 { font-size: 20px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (min-width: 900px) { .watch-head h1 { font-size: 26px; } }
.player-wrap { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; display: grid; place-items: center; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.player-wrap iframe { width: 100%; height: 100%; border: 0; }
.player-status { color: var(--fg-2); padding: 24px; }
.server-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; } .server-bar:empty { display: none; }
.server-btn { padding: 8px 14px; font-size: 13px; }
.tools-bar { align-items: center; } .tools-label { color: var(--fg-2); font-size: 13px; }
.watch-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

/* ---- Social ---- */
.social-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; } .social-head h2 { margin: 0; }
.like-btn { min-width: 84px; } .like-btn.btn-primary .ico { fill: currentColor; }
.comment-form { display: grid; gap: 8px; margin-bottom: 20px; }
.comment-name { font-size: 14px; padding: 10px 12px; max-width: 280px; } .comment-input { font-size: 14px; padding: 10px 12px; resize: vertical; }
.comment-actions { display: flex; align-items: center; gap: 12px; } .comment-msg { margin: 0; color: var(--danger); }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.comment, .comment-empty { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-2); }
.comment-empty { color: var(--fg-2); text-align: center; }
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; font-size: 14px; } .comment-time { color: var(--fg-3); font-size: 12px; }
.comment-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }

/* ---- Developer / support ---- */
.profile { max-width: 600px; margin: 0 auto; text-align: center; padding: 8px 0 32px; }
.avatar, .avatar-fallback { width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 18px; display: block; border: 3px solid var(--red); }
.avatar { object-fit: cover; background: var(--bg-2); }
.avatar-fallback { display: grid; place-items: center; background: var(--red); font-size: 44px; font-weight: 900; color: #fff; }
.profile-name { font-size: 30px; font-weight: 900; margin-bottom: 4px; } .profile-alias { color: var(--fg-2); margin-bottom: 26px; }
.support-card { text-align: left; padding: 20px; margin-bottom: 18px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #2a0b0d, var(--bg-2) 60%); border: 1px solid #5a1217; }
.support-card h2 { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 8px; } .support-card h2 .ico { color: var(--red); }
.support-card p { font-size: 14px; color: var(--fg-1); }
.support-card .btn { width: 100%; padding: 14px 18px; font-size: 16px; margin-top: 6px; }
.support-points { margin: 4px 0 14px; padding-left: 18px; color: var(--fg-1); font-size: 14px; line-height: 1.7; }
.social-list { list-style: none; padding: 0; margin: 0 0 28px; }
.social-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-2); color: #fff; text-decoration: none; margin-bottom: 8px; text-align: left; border: 1px solid transparent; }
.social-link:hover { background: var(--bg-3); border-color: var(--border-hi); }
.social-link .ico { color: var(--red); }
.social-label { font-weight: 700; } .social-handle { color: var(--fg-2); font-size: 13px; }
.social-go { margin-left: auto; color: var(--fg-3); }
.copyright { color: var(--fg-3); font-size: 13px; padding-top: 22px; border-top: 1px solid var(--border); }
.site-foot { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--fg-3); font-size: 12px; text-align: center; line-height: 1.6; }
.site-foot a { color: var(--fg-2); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
