:root {
  --bg: #0a0a0b;
  --bg2: #141416;
  --line: #232326;
  --fg: #f5f5f7;
  --mut: #9a9aa3;
  --accent: #e50914;
  --r: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Navbar */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 16px 40px; background: rgba(10, 10, 11, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: background 0.3s; }
.brand { font-weight: 800; letter-spacing: 1px; font-size: 20px; color: var(--accent); }
.brand img { height: 32px; }
.nav nav { display: flex; gap: 24px; flex: 1; }
.nav nav a { color: var(--mut); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav nav a:hover, .nav nav a.active { color: #fff; }
.search input { background: var(--bg2); border: 1px solid var(--line); color: #fff; padding: 10px 16px; border-radius: 20px; width: 240px; outline: none; transition: all 0.3s; font-size: 14px; }
.search input:focus { border-color: var(--accent); width: 280px; background: #1a1a1c; }

/* Container */
.container { padding: 0 40px 80px; max-width: 1600px; margin: 0 auto; }

/* Hero */
.hero { position: relative; min-height: 75vh; display: flex; align-items: flex-end; background-size: cover; background-position: center 20%; margin: 0 -40px 40px; padding: 0 40px; border-radius: 0 0 20px 20px; overflow: hidden; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 5%, rgba(10,10,11,0.4) 40%, transparent 100%); z-index: 1; }
.hero-inner { position: relative; z-index: 2; padding: 60px 0; max-width: 650px; }
.badge { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; padding: 4px 10px; border-radius: 4px; margin-bottom: 16px; text-transform: uppercase; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin-bottom: 16px; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.meta { color: var(--mut); font-size: 15px; margin-bottom: 16px; font-weight: 500; }
.syn { color: #cfcfd4; margin-bottom: 28px; max-width: 550px; font-size: 16px; line-height: 1.6; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.actions { display: flex; gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border-radius: var(--r); font-weight: 600; font-size: 15px; border: none; cursor: pointer; transition: transform 0.2s, background 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #f6121d; box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4); }
.btn.ghost { background: rgba(255, 255, 255, 0.15); color: #fff; backdrop-filter: blur(5px); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.25); }
.empty-hero { align-items: center; justify-content: center; text-align: center; min-height: 40vh; background: var(--bg2); }
.empty-hero .hero-inner { padding: 40px; }

/* Rows & Grid */
.row { margin-bottom: 48px; }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.row h2 { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 20px; }
.see-all { font-size: 14px; color: var(--mut); transition: color 0.2s; }
.see-all:hover { color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }

/* Cards */
.card { background: var(--bg2); border-radius: var(--r); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; position: relative; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.7); z-index: 2; }
.card-img-wrap { aspect-ratio: 2/3; width: 100%; position: relative; background: #1a1a1c; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover img { transform: scale(1.05); }
.poster-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--mut); font-size: 13px; }
.card-body { padding: 12px 16px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body span { font-size: 13px; color: var(--mut); }

/* Filters & Pagination */
.page-title { font-size: 32px; margin: 40px 0 24px; font-weight: 800; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; background: var(--bg2); padding: 16px; border-radius: var(--r); border: 1px solid var(--line); }
.filters select { background: var(--bg); color: #fff; border: 1px solid var(--line); padding: 10px 16px; border-radius: 6px; outline: none; font-size: 14px; cursor: pointer; transition: border 0.2s; }
.filters select:focus { border-color: var(--accent); }
.empty { color: var(--mut); padding: 80px 0; text-align: center; font-size: 16px; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.pager a { padding: 10px 16px; background: var(--bg2); border-radius: 6px; font-size: 14px; color: var(--mut); border: 1px solid transparent; transition: all 0.2s; }
.pager a:hover { border-color: var(--line); color: #fff; }
.pager a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 60px 40px 30px; margin-top: 80px; color: var(--mut); font-size: 14px; background: var(--bg2); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; max-width: 1600px; margin-left: auto; margin-right: auto; }
.foot-cols strong { color: #fff; display: block; margin-bottom: 12px; font-size: 16px; }
.foot-cols a { display: block; margin-bottom: 8px; transition: color 0.2s; }
.foot-cols a:hover { color: #fff; }
.foot-cols p { line-height: 1.6; }
.copy { text-align: center; padding-top: 24px; border-top: 1px solid var(--line); max-width: 1600px; margin: 0 auto; }

/* Responsive */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; gap: 16px; }
  .nav nav { display: none; }
  .search input { width: 160px; }
  .search input:focus { width: 200px; }
  .container { padding: 0 20px 60px; }
  .hero { margin: 0 -20px 30px; padding: 0 20px; min-height: 60vh; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
  .foot { padding: 40px 20px 20px; }
}/* --- Halaman Detail --- */
.detail-layout { display: grid; grid-template-columns: 300px 1fr; gap: 40px; margin-top: 40px; align-items: start; }
.detail-poster { border-radius: var(--r); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); aspect-ratio: 2/3; background: var(--bg2); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 40px; font-weight: 800; margin-bottom: 16px; line-height: 1.1; }
.meta-badges { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 14px; color: var(--mut); }
.badge { background: rgba(255,255,255,0.1); border: 1px solid var(--line); padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; color: #fff; }
.genres { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.genre-pill { background: var(--bg2); border: 1px solid var(--line); padding: 6px 14px; border-radius: 20px; font-size: 13px; color: var(--fg); transition: border 0.2s; }
.genre-pill:hover { border-color: var(--accent); }
.synopsis { font-size: 16px; line-height: 1.7; color: #cfcfd4; margin-bottom: 32px; max-width: 800px; }
.btn-large { padding: 16px 40px; font-size: 18px; border-radius: 8px; }

/* --- Halaman Player --- */
.player-container { max-width: 1200px; margin: 40px auto; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--mut); font-size: 15px; transition: color 0.2s; }
.back-link:hover { color: var(--fg); }
.video-wrapper { background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.8); aspect-ratio: 16/9; }
.video-wrapper video { width: 100%; height: 100%; display: block; }
.player-details { margin-top: 30px; }
.player-details h1 { font-size: 32px; margin-bottom: 10px; }
.player-details .meta { font-size: 15px; color: var(--mut); margin-bottom: 20px; }

@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-poster { max-width: 250px; margin: 0 auto; }
  .detail-info h1 { font-size: 28px; text-align: center; }
  .meta-badges, .genres { justify-content: center; }
  .synopsis { text-align: center; font-size: 14px; }
  .btn-large { width: 100%; text-align: center; }
}