/* Nontonime: neo-brutalism ala Saweria. Border tebal, bayangan keras, warna kuning. */
:root {
  --bg: #fff4d6;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #4b4538;
  --yellow: #ffc93c;
  --pink: #ff7aa8;
  --blue: #6cc5ff;
  --green: #7be0a0;
  --red: #ff5c5c;
  --on-accent: #111111;
  --b: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --r: 14px;
}
:root[data-theme="dark"] {
  --bg: #15120b;
  --surface: #211c12;
  --ink: #f6efdc;
  --muted: #c9bfa4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: 84px;
}
h1, h2, h3, .brand { font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { width: min(1200px, 100% - 28px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* tombol, chip, kotak */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 18px;
  background: var(--yellow); color: var(--on-accent);
  border: var(--b); border-radius: 12px; box-shadow: var(--shadow);
  font: 700 15px "Space Grotesk", sans-serif; cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn.pink { background: var(--pink); }
.btn.blue { background: var(--blue); }
.btn.green { background: var(--green); }
.btn.white { background: var(--surface); color: var(--ink); }
.btn.sm { min-height: 38px; padding: 4px 12px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
.btn[aria-pressed="true"], .btn.active { background: var(--ink); color: var(--bg); }
.chip {
  display: inline-block; padding: 2px 10px; background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; font: 700 12px "Space Grotesk", sans-serif;
}
.chip.y { background: var(--yellow); color: #111; } .chip.p { background: var(--pink); color: #111; }
.chip.b { background: var(--blue); color: #111; } .chip.g { background: var(--green); color: #111; }
.box { background: var(--surface); border: var(--b); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: var(--yellow); border-bottom: var(--b); }
.top .wrap { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.brand { font-size: 22px; font-weight: 800; background: #fff; color: #111; border: 3px solid #111; border-radius: 10px; padding: 2px 12px; box-shadow: 3px 3px 0 #111; transform: rotate(-2deg); }
.nav { display: none; gap: 6px; margin-left: 6px; }
.nav a { padding: 6px 12px; border: 2px solid transparent; border-radius: 10px; font: 700 14px "Space Grotesk", sans-serif; color: #111; }
.nav a:hover, .nav a.on { background: #fff; border-color: #111; box-shadow: 2px 2px 0 #111; }
.search { margin-left: auto; display: flex; flex: 1; max-width: 380px; }
.search input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; background: #fff; color: #111;
  border: 3px solid #111; border-right: 0; border-radius: 12px 0 0 12px; font: 500 15px "DM Sans", sans-serif;
}
.search button { width: 48px; border: 3px solid #111; border-radius: 0 12px 12px 0; background: var(--pink); color: #111; font-size: 18px; cursor: pointer; }
.iconbtn { width: 42px; height: 42px; border: 3px solid #111; border-radius: 12px; background: #fff; color: #111; box-shadow: 3px 3px 0 #111; font-size: 18px; cursor: pointer; }
@media (min-width: 900px) { .nav { display: flex; } body { padding-bottom: 0; } .bottom { display: none !important; } }

/* nav bawah (HP) */
.bottom { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 4px; padding: 6px; background: var(--surface); border: var(--b); border-radius: 16px; box-shadow: var(--shadow); }
.bottom a { flex: 1; min-height: 44px; display: grid; place-items: center; border-radius: 10px; font: 700 11px "Space Grotesk", sans-serif; }
.bottom a.on { background: var(--yellow); color: #111; border: 2px solid var(--ink); }

/* bagian halaman */
main { padding: 22px 0 40px; }
.sec { margin: 30px 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sec-h h2 { font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; background: var(--yellow); color: #111; display: inline-block; padding: 2px 12px; border: var(--b); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.page-h { margin-bottom: 18px; }
.page-h h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
.page-h p { margin: 4px 0 0; color: var(--muted); }

/* grid kartu */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 820px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px; overflow-x: auto; padding: 4px 8px 14px 2px; scroll-snap-type: x proximity; }
@media (min-width: 700px) { .rail { grid-auto-columns: 180px; } }
.rail > * { scroll-snap-align: start; }
.card { display: block; background: var(--surface); border: var(--b); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: transform .1s, box-shadow .1s; }
.card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.card .poster { position: relative; aspect-ratio: 2 / 3; background: var(--yellow); border-bottom: var(--b); }
.card .poster img { width: 100%; height: 100%; object-fit: cover; }
.card .tags { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card .score { position: absolute; right: 8px; bottom: 8px; }
.card .meta { padding: 10px 12px 12px; }
.card .t { font: 700 14px/1.25 "Space Grotesk", sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.card .s { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.progress { height: 8px; background: var(--bg); border-top: 2px solid var(--ink); }
.progress i { display: block; height: 100%; background: var(--pink); }

/* hero */
.hero { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border: var(--b); border-radius: 20px; box-shadow: var(--shadow-lg); background: var(--surface); }
.slide { scroll-snap-align: start; display: grid; grid-template-columns: 1fr; min-height: 380px; }
.slide .art { position: relative; min-height: 220px; border-bottom: var(--b); background: var(--pink); }
.slide .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .txt { padding: 20px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.slide h2 { font-size: clamp(24px, 4.5vw, 40px); font-weight: 800; }
.slide p { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (min-width: 800px) { .slide { grid-template-columns: 1.1fr 1fr; } .slide .art { border-bottom: 0; border-left: var(--b); order: 2; } }
.dots { text-align: center; margin-top: 12px; color: var(--muted); font: 700 12px "Space Grotesk", sans-serif; }

/* detail */
.detail { display: grid; gap: 22px; }
@media (min-width: 800px) { .detail { grid-template-columns: 280px 1fr; align-items: start; } }
.detail .poster { border: var(--b); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; aspect-ratio: 2 / 3; background: var(--yellow); max-width: 280px; }
.detail .poster img { width: 100%; height: 100%; object-fit: cover; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; margin: 0; }
.info dt { font-weight: 700; } .info dd { margin: 0; color: var(--muted); }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.eps a { min-height: 48px; display: grid; place-items: center; background: var(--surface); border: var(--b); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); font: 800 16px "Space Grotesk", sans-serif; }
.eps a:hover { background: var(--yellow); color: #111; }
.eps a.cur { background: var(--pink); color: #111; }

/* pemutar */
.player { background: #000; border: var(--b); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; aspect-ratio: 16 / 9; position: relative; }
.player video, .player iframe { width: 100%; height: 100%; border: 0; background: #000; }
.player .msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: #fff; font-weight: 700; }
.servers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.qgroup { margin-top: 14px; } .qgroup h3 { font-size: 15px; }
.subbox { margin-top: 18px; background: var(--blue); color: #111; }
.subbox p { margin: 4px 0 10px; font-size: 14px; }
.dl a { display: inline-block; margin: 4px 6px 0 0; }

/* jadwal, filter */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 8px 12px 2px; }
.tabs .btn { flex: 0 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { padding: 6px 14px; background: var(--surface); border: var(--b); border-radius: 999px; font: 700 14px "Space Grotesk", sans-serif; box-shadow: 3px 3px 0 var(--ink); }
.chips a:hover, .chips a.on { background: var(--yellow); color: #111; }
.filters { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr auto; } }
.filters input, .filters select, .field { height: 46px; padding: 0 12px; background: var(--surface); color: var(--ink); border: var(--b); border-radius: 12px; font: 500 15px "DM Sans", sans-serif; width: 100%; }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.empty { text-align: center; padding: 40px 18px; }
.empty h2 { font-size: 24px; margin-bottom: 6px; }

footer { border-top: var(--b); background: var(--surface); padding: 22px 0 30px; margin-top: 30px; font-size: 14px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* akun */
.avatar { width: 42px; height: 42px; padding: 0; border: 3px solid #111; border-radius: 50%; background: var(--pink); box-shadow: 3px 3px 0 #111; overflow: hidden; cursor: pointer; display: grid; place-items: center; font: 800 16px "Space Grotesk", sans-serif; color: #111; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.dlg { border: var(--b); border-radius: 18px; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); padding: 22px; width: min(420px, 92vw); }
.dlg::backdrop { background: rgba(17, 17, 17, .6); }
.dlg h2 { font-size: 24px; margin-bottom: 6px; }
.dlg p { margin: 0; color: var(--muted); font-size: 14.5px; }
.me-banner { position: relative; aspect-ratio: 3 / 1; min-height: 120px; background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, #ffd966 14px 28px); border: var(--b); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.me-banner img { width: 100%; height: 100%; object-fit: cover; }
.me-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: -44px 16px 0; position: relative; }
.me-avatar { width: 96px; height: 96px; border: var(--b); border-radius: 50%; background: var(--pink); box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; font: 800 36px "Space Grotesk", sans-serif; color: #111; flex: none; }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-name { flex: 1; min-width: 200px; padding-top: 48px; }
.me-name h2 { font-size: 26px; font-weight: 800; }
.me-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.note { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }

/* pengaturan subtitle */
.subset { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.subset label { display: grid; gap: 4px; font: 700 13px "Space Grotesk", sans-serif; }
.subset select { height: 42px; padding: 0 10px; border: 3px solid #111; border-radius: 10px; background: #fff; color: #111; font: 500 14px "DM Sans", sans-serif; }
video.s1::cue { font-size: 14px; } video.s2::cue { font-size: 19px; } video.s3::cue { font-size: 25px; } video.s4::cue { font-size: 33px; }
video.bg0::cue { background: transparent; text-shadow: 0 0 4px #000, 0 0 6px #000, 1px 1px 2px #000; }
