/* Otakufy Web — gaya Netflix: gelap #141414, aksen merah, kartu poster. */
:root {
  --bg: #141414;
  --bg2: #181818;
  --card: #232323;
  --text: #ffffff;
  --muted: #a3a3a3;
  --faint: #6d6d6e;
  --accent: #e50914;
  --accent-dark: #b20710;
  --pill: rgba(109, 109, 110, 0.7);
  --radius: 8px;
  --nav-h: 68px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: #3a3a3a var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* ── Navigasi ─────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 200;
  display: flex; align-items: center; gap: 28px; padding: 0 3.5vw;
  background: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,0));
  transition: background .35s ease;
}
.nav.solid { background: #141414; }
.wordmark {
  color: var(--accent); font-weight: 900; font-size: 27px; letter-spacing: .5px;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif; text-transform: uppercase;
  white-space: nowrap; cursor: pointer; user-select: none;
}
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; min-width: 0; }
.nav-links a {
  font-size: 14px; color: #e5e5e5; padding: 7px 13px; border-radius: 999px; white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--muted); }
.nav-links a.on { background: #333; color: #fff; font-weight: 700; }
.nav-links a.on:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.icon-btn {
  background: none; border: 0; color: #fff; padding: 6px; display: grid; place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.75);
  border: 1px solid #fff; padding: 6px 10px; width: 0; opacity: 0; overflow: hidden;
  transition: width .3s ease, opacity .3s ease; pointer-events: none;
}
.search-box.open { width: min(270px, 42vw); opacity: 1; pointer-events: auto; }
.search-box input {
  background: none; border: 0; outline: 0; color: #fff; font-size: 14px; width: 100%;
}
.search-box input::placeholder { color: var(--muted); }
.avatar-wrap { position: relative; }
.avatar {
  width: 34px; height: 34px; border-radius: 6px; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 16px; display: grid; place-items: center; border: 0;
}
.menu-drop {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px;
  background: rgba(0,0,0,.92); border: 1px solid #333; border-radius: 6px; padding: 8px 0;
  display: none; box-shadow: 0 12px 32px rgba(0,0,0,.6);
}
.menu-drop.open { display: block; }
.menu-drop .who { padding: 8px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid #2a2a2a; margin-bottom: 6px; }
.menu-drop button, .menu-drop a {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: #fff;
  font-size: 13.5px; padding: 9px 16px;
}
.menu-drop button:hover, .menu-drop a:hover { text-decoration: underline; }

/* ── Hero ─────────────────────────────────── */
.hero {
  position: relative; margin: calc(var(--nav-h) + 10px) 3.5vw 8px; border-radius: 18px;
  overflow: hidden; min-height: min(74vh, 560px); display: flex; align-items: flex-end;
  background: #000;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(77deg, rgba(0,0,0,.88) 8%, rgba(0,0,0,.45) 45%, transparent 75%),
              linear-gradient(0deg, rgba(20,20,20,.92), transparent 45%);
}
.hero-inner { position: relative; padding: 0 4% 5.5%; max-width: 640px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  letter-spacing: 2.5px; color: #e5e5e5; text-transform: uppercase; margin-bottom: 12px;
}
.hero-kicker b { color: var(--accent); font-size: 17px; letter-spacing: 0; }
.hero-title {
  font-size: clamp(30px, 4.6vw, 58px); font-weight: 900; line-height: 1.04;
  text-shadow: 0 3px 18px rgba(0,0,0,.65); margin-bottom: 14px;
}
.hero-meta { font-size: 14.5px; font-weight: 700; color: #e5e5e5; margin-bottom: 12px; display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.hero-meta .dot { color: var(--faint); }
.hero-meta .match { color: #46d369; }
.hero-meta .box { border: 1px solid #777; padding: 1px 6px; font-size: 12px; color: #ddd; }
.hero-desc {
  font-size: 15.5px; line-height: 1.45; color: #f2f2f2; max-width: 560px; margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-play {
  background: #fff; color: #000; border: 0; border-radius: 999px; font-size: 16.5px; font-weight: 800;
  padding: 11px 26px; display: inline-flex; align-items: center; gap: 9px; transition: background .2s;
}
.btn-play:hover { background: rgba(255,255,255,.78); }
.btn-play svg { width: 21px; height: 21px; }
.btn-info {
  background: var(--pill); color: #fff; border: 0; border-radius: 999px; font-size: 16.5px; font-weight: 700;
  padding: 11px 24px; display: inline-flex; align-items: center; gap: 9px; transition: background .2s;
}
.btn-info:hover { background: rgba(109,109,110,.45); }
.btn-info svg { width: 21px; height: 21px; }

/* ── Baris & kartu ────────────────────────── */
.rows { padding: 6px 0 30px; }
.row { margin: 26px 0 6px; }
.row-head {
  display: flex; align-items: baseline; gap: 14px; padding: 0 3.5vw; margin-bottom: 10px;
}
.row-title { font-size: 18px; font-weight: 700; }
.row-more { font-size: 12.5px; color: #54b9e5; opacity: 0; transition: opacity .2s; cursor: pointer; background: none; border: 0; }
.row:hover .row-more { opacity: 1; }
.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 9px; overflow-x: auto; padding: 6px 3.5vw 14px; scroll-behavior: smooth;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.rail::-webkit-scrollbar { display: none; }
.chev {
  position: absolute; top: 6px; bottom: 14px; width: 3.2vw; min-width: 34px; z-index: 5;
  background: rgba(20,20,20,.55); border: 0; color: #fff; font-size: 22px; opacity: 0;
  transition: opacity .2s, transform .2s; display: grid; place-items: center;
}
.rail-wrap:hover .chev { opacity: 1; }
.chev:hover { transform: scale(1.08); background: rgba(20,20,20,.8); }
.chev.left { left: 0; border-radius: 0 8px 8px 0; }
.chev.right { right: 0; border-radius: 8px 0 0 8px; }

.card {
  position: relative; flex: 0 0 auto; width: 158px; scroll-snap-align: start;
  border-radius: var(--radius); cursor: pointer; transition: transform .25s ease, box-shadow .25s ease;
  background: var(--bg2);
}
.card:hover { transform: scale(1.06); z-index: 4; box-shadow: 0 14px 34px rgba(0,0,0,.65); }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); background: #222; }
.card .c-title {
  font-size: 13px; font-weight: 600; line-height: 1.3; padding: 7px 3px 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .c-meta { font-size: 11.5px; color: var(--muted); padding: 0 3px 6px; display: flex; gap: 6px; }
.card .badge-new {
  position: absolute; left: 0; bottom: 54px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 2.5px 7px; border-radius: 0 4px 4px 0;
}
.card .prog {
  position: absolute; left: 0; right: 0; bottom: 46px; height: 3.5px; background: rgba(255,255,255,.3);
}
.card .prog i { display: block; height: 100%; background: var(--accent); }

/* Top 10 */
.card10 { display: flex; align-items: flex-end; flex: 0 0 auto; scroll-snap-align: start; cursor: pointer; }
.card10 .rank {
  font-size: 148px; font-weight: 900; line-height: .78; color: transparent;
  -webkit-text-stroke: 4px #595959; margin-right: -16px; z-index: 0; user-select: none;
  font-family: "Arial Black", sans-serif;
}
.card10 img {
  width: 132px; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); z-index: 1;
  transition: transform .25s ease;
}
.card10:hover img { transform: scale(1.05); }

/* Grid halaman (genre/jadwal/hasil cari) */
.page { padding: calc(var(--nav-h) + 26px) 3.5vw 40px; }
.page h1 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  background: #2a2a2a; color: #e5e5e5; border: 1px solid #3a3a3a; border-radius: 999px;
  padding: 7px 15px; font-size: 13.5px;
}
.chip.on { background: #fff; color: #000; font-weight: 700; border-color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; }
.grid .card { width: auto; }
.empty-note { color: var(--muted); font-size: 15px; padding: 26px 0; }
.sched-item {
  display: flex; gap: 14px; align-items: center; background: var(--bg2); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 9px; cursor: pointer;
}
.sched-item img { width: 46px; height: 64px; object-fit: cover; border-radius: 6px; }
.sched-item .s-t { font-weight: 700; font-size: 15px; }
.sched-item .s-m { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sched-item .s-time { margin-left: auto; color: #46d369; font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ── Modal detail ─────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.72);
  display: none; overflow-y: auto; padding: 28px 12px 50px;
}
.overlay.open { display: block; }
.sheet {
  max-width: 860px; margin: 0 auto; background: var(--bg2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.8); animation: rise .25s ease;
}
@keyframes rise { from { transform: translateY(16px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-hero { position: relative; aspect-ratio: 16/8.2; background: #000; }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet-hero .shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg2), transparent 55%); }
.sheet-hero .x {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  background: #181818; color: #fff; border: 0; font-size: 17px; z-index: 3;
}
.sheet-hero .sh-in { position: absolute; left: 40px; right: 40px; bottom: 22px; }
.sheet-hero h2 { font-size: clamp(24px, 3.4vw, 40px); font-weight: 900; text-shadow: 0 3px 14px rgba(0,0,0,.7); margin-bottom: 14px; }
.sheet-body { padding: 8px 40px 34px; }
.meta-line { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; font-size: 14px; font-weight: 600; margin: 10px 0 6px; }
.meta-line .match { color: #46d369; font-weight: 800; }
.meta-line .box { border: 1px solid #777; padding: 0 6px; font-size: 12px; }
.meta-line .dim, .dim { color: var(--muted); }
.syn { font-size: 14.5px; line-height: 1.55; color: #e8e8e8; margin: 12px 0 4px; }
.kv { font-size: 13px; color: var(--muted); margin-top: 8px; }
.kv b { color: #ddd; font-weight: 600; }
.btn-ghost {
  background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.5);
  width: 42px; height: 42px; border-radius: 50%; font-size: 19px; display: inline-grid; place-items: center;
  transition: border-color .2s, background .2s; vertical-align: middle;
}
.btn-ghost:hover { border-color: #fff; }
.btn-ghost.on { background: #fff; color: #000; border-color: #fff; }
.ep-head { font-size: 19px; font-weight: 800; margin: 26px 0 12px; display: flex; justify-content: space-between; align-items: center; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ep-btn {
  background: #2c2c2c; color: #fff; border: 1px solid #3d3d3d; border-radius: 8px;
  padding: 11px 4px; font-size: 14px; font-weight: 700; transition: background .15s, border-color .15s;
}
.ep-btn:hover { background: #3d3d3d; border-color: #666; }
.ep-btn.played { border-color: var(--accent); }

/* Musim & seri terkait */
.rel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rel-card {
  display: flex; gap: 12px; align-items: center; background: #242424; border: 1px solid #383838;
  border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: border-color .2s, background .2s;
}
.rel-card:hover { border-color: #6d6d6d; background: #2c2c2c; }
.rel-card img { width: 46px; height: 62px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.rel-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rel-label { font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.rel-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Player ───────────────────────────────── */
.watch { padding-top: var(--nav-h); }
.player-wrap { background: #000; }
.player-box { max-width: 1180px; margin: 0 auto; position: relative; }
video { width: 100%; aspect-ratio: 16/9; background: #000; display: block; }
video::cue { background: rgba(0,0,0,.55); color: #fff; text-shadow: 0 1px 3px #000; }
.watch-info { max-width: 1180px; margin: 0 auto; padding: 20px 3.5vw 44px; }
.watch-info h1 { font-size: clamp(21px, 2.6vw, 30px); font-weight: 900; }
.watch-info .w-sub { color: var(--muted); font-size: 14.5px; margin-top: 5px; }
.watch-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; align-items: center; }
.select {
  background: #242424; color: #fff; border: 1px solid #454545; border-radius: 8px;
  padding: 9px 12px; font-size: 14px; outline: 0;
}
.btn-dark {
  background: #242424; color: #fff; border: 1px solid #454545; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 700;
}
.btn-dark:hover { background: #333; }
.btn-dark:disabled { opacity: .4; cursor: default; }

/* ── Login ────────────────────────────────── */
.login-body {
  min-height: 100vh; position: relative; display: flex; flex-direction: column;
  background: #000 url("") center/cover no-repeat;
}
.login-bg { position: fixed; inset: 0; z-index: 0; }
.login-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.login-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.login-top { position: relative; z-index: 2; padding: 22px 3.5vw; display: flex; justify-content: space-between; align-items: center; }
.lang-btn {
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid #777; border-radius: 6px;
  padding: 7px 14px; font-size: 13.5px; font-weight: 600;
}
.login-card {
  position: relative; z-index: 2; background: rgba(0,0,0,.78); border-radius: 8px;
  max-width: 450px; width: calc(100% - 32px); margin: 4vh auto 30px; padding: 52px 62px 44px;
}
.login-card h1 { font-size: 31px; font-weight: 800; margin-bottom: 8px; }
.login-card .sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field input {
  width: 100%; background: #333; border: 1px solid #444; border-radius: 6px; color: #fff;
  font-size: 16px; padding: 15px 16px; outline: 0; transition: border-color .2s, background .2s;
}
.field input:focus { border-color: #888; background: #454545; }
.btn-red {
  width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  font-size: 16.5px; font-weight: 800; padding: 14px; margin-top: 8px; transition: background .2s;
}
.btn-red:hover { background: var(--accent-dark); }
.login-err {
  display: none; background: #e87c03; color: #fff; border-radius: 6px;
  padding: 11px 14px; font-size: 14px; margin-bottom: 16px; line-height: 1.45;
}
.login-err.show { display: block; }
.login-foot { position: relative; z-index: 2; text-align: center; color: #999; font-size: 13px; padding: 16px; margin-top: auto; }

/* ── Akun modal & toast ───────────────────── */
.mini-sheet { max-width: 520px; }
.mini-body { padding: 26px 30px 30px; }
.mini-body h2 { font-size: 21px; font-weight: 800; margin-bottom: 16px; padding-right: 30px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #2c2c2c; font-size: 14.5px; }
.user-row .tag { background: #333; color: #ccc; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.user-row .sp { flex: 1; }
.btn-small { background: #333; color: #fff; border: 1px solid #4a4a4a; border-radius: 6px; padding: 7px 13px; font-size: 13px; font-weight: 700; }
.btn-small.danger { background: transparent; border-color: #7a2b2e; color: #ff6b6b; }
.add-form { display: grid; gap: 9px; margin-top: 18px; }
.add-form input { background: #2b2b2b; border: 1px solid #444; border-radius: 6px; color: #fff; padding: 11px 13px; font-size: 14.5px; outline: 0; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 500;
  background: #fff; color: #000; font-size: 14px; font-weight: 600; padding: 11px 20px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.spinner {
  width: 52px; height: 52px; border-radius: 50%; border: 4px solid #333; border-top-color: var(--accent);
  margin: 90px auto; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.footer { padding: 26px 3.5vw 34px; color: #808080; font-size: 13px; border-top: 1px solid #262626; margin-top: 10px; }

@media (max-width: 720px) {
  .nav { gap: 12px; padding: 0 4vw; }
  .wordmark { font-size: 21px; }
  .nav-links a { padding: 6px 8px; font-size: 13px; }
  .nav-links a.hide-m { display: none; }
  .hero { margin-left: 0; margin-right: 0; border-radius: 0; min-height: 62vh; }
  .hero-inner { padding: 0 5% 7%; }
  .card { width: 118px; }
  .card10 .rank { font-size: 104px; }
  .card10 img { width: 98px; }
  .sheet-body { padding: 6px 20px 28px; }
  .sheet-hero .sh-in { left: 20px; right: 20px; }
  .login-card { padding: 38px 26px 34px; }
}
