:root {
  --bg: #070709;
  --ink: #f5f5f7;
  --muted: #b5b5be;
  --line: rgba(255,255,255,.14);
  --purple: #7c3aed;
  --purple-2: #a855f7;
  --nav-h: 64px;
  --hint-h: 42px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #000; }
body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #000;
}
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.phone {
  width: min(100%, 480px);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding: 12px 0 calc(var(--nav-h) + var(--hint-h) + 28px);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 14px 10px;
  background: linear-gradient(#070709 70%, rgba(7,7,9,0));
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}
.mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.mark i {
  display: block;
  width: 4px;
  border-radius: 3px;
  background: #ff4d8d;
}
.mark i:nth-child(1) { height: 10px; }
.mark i:nth-child(2) { height: 16px; background: #a855f7; }
.mark i:nth-child(3) { height: 13px; background: #38bdf8; }
.word { font-weight: 800; font-size: 22px; letter-spacing: -.04em; }
.word sup { font-size: 10px; margin-left: 1px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: center;
}
.icon-btn span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }
.login {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #7c3aed, #c026d3);
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
}
.lang-switch { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 8px; }
.lang-switch a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}
.lang-switch a.on { background: var(--purple); border-color: transparent; }
.menu-sheet {
  margin: 0 14px 10px;
  background: #16161a;
  border-radius: 16px;
  padding: 8px;
  display: grid;
  gap: 4px;
}
.menu-sheet button {
  text-align: left;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
}
.menu-sheet button:active { background: #2a2a30; }

.hero { padding: 0 0 8px; }
.hero-frame { position: relative; }
.hero-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 42px;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
  position: relative;
  flex: 0 0 78%;
  scroll-snap-align: center;
  border-radius: 22px;
  overflow: hidden;
  background: #141418;
  aspect-ratio: 2 / 3;
}
.poster-hit {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #141418;
}
.poster-hit img, .poster-fallback { width: 100%; height: 100%; object-fit: cover; }
.poster-fallback { display: block; background: linear-gradient(160deg, #2a1848, #120810); }
.play-pill {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  border: 0;
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.arrow {
  position: absolute;
  top: 46%;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.arrow.prev { left: 8px; }
.arrow.next { right: 8px; }
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 14px 16px 0;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid #3a3a42;
  background: transparent;
  color: #eee;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 7px 12px;
}
.chip.on { background: var(--purple); border-color: transparent; }
#heroTitle {
  margin: 14px 16px 8px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 800;
}
.synopsis {
  margin: 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.series {
  display: block;
  margin: 16px auto 8px;
  border: 0;
  background: #242428;
  color: #fff;
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 800;
}

.rail { padding: 18px 0 4px; content-visibility: auto; contain-intrinsic-size: auto 300px; }
.rail h2 { margin: 0 16px 12px; font-size: 26px; letter-spacing: -.03em; }
.rail-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px 8px;
}
.rail-row::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 42%; min-width: 0; }
.tile .poster-hit {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}
.tile p {
  margin: 8px 2px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f59e0b;
  color: #1a1204;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 8px;
}
.tile.ranked { flex-basis: 48%; position: relative; padding-left: 28px; }
.rank {
  pointer-events: none;
  position: absolute;
  left: 0;
  bottom: 46px;
  font-size: 64px;
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.06em;
  color: #fff;
  text-shadow: 0 6px 16px rgba(0,0,0,.45);
}

.picker { padding: 18px 14px; }
.picker-card {
  background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
  border-radius: 28px;
  padding: 22px 16px 16px;
  overflow: hidden;
}
.picker-card h2 { margin: 0 8px 8px; font-size: 32px; line-height: 1.05; letter-spacing: -.03em; }
.picker-card > p { margin: 0 8px 12px; color: rgba(255,255,255,.86); }
.pick-stack { position: relative; height: 280px; }
.pick-card {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 168px;
  transform: translateX(-50%) rotate(0deg);
}
.pick-card[hidden] { display: none !important; }
.pick-card .poster-hit { border-radius: 16px; overflow: hidden; aspect-ratio: 2 / 3; box-shadow: 0 16px 30px rgba(0,0,0,.28); }
.pick-card p {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  margin: 0;
  display: grid;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.pick-card p span { font-size: 13px; font-weight: 600; }
.pick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pick-actions button {
  border-radius: 14px;
  border: 0;
  padding: 12px 8px;
  font-weight: 800;
}
#pickNo { background: rgba(20,10,40,.45); color: #fff; }
#pickYes { background: linear-gradient(90deg, #c4b5fd, #e9d5ff); color: #3b0764; }
.foot { margin: 8px 18px 0; color: #8d8d96; font-size: 13px; line-height: 1.4; }

.hint {
  position: fixed;
  left: 50%;
  bottom: var(--nav-h);
  transform: translateX(-50%);
  width: min(100%, 480px);
  z-index: 6;
  border: 0;
  background: #111114;
  color: #fff;
  text-align: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: var(--nav-h);
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0c0c0e;
  border-top: 1px solid #222;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  border: 0;
  background: transparent;
  color: #9a9aa3;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
}
.nav-btn.on { color: #d8b4fe; }

.player {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #120c10;
  display: grid;
  grid-template-rows: auto 1fr;
}
.player-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 12px;
}
.player-top button {
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}
#playerEps { justify-self: end; }
.stage {
  position: relative;
  margin: 0 12px 16px;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
}
#playerVideo { width: 100%; height: 100%; object-fit: cover; background: #000; }
.stage-play {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.92);
  color: #111;
}
.stage-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 78px;
  display: grid;
  gap: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.stage-meta strong { font-size: 20px; }
.stage-meta em { font-style: normal; color: #eee; }
.stage-meta small { color: #ddd; }
.stage-tools {
  position: absolute;
  right: 10px;
  bottom: 28px;
  display: grid;
  gap: 8px;
}
.stage-tools button, .stage-meta span {
  font-size: 12px;
}
.stage-tools button {
  border: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  border-radius: 999px;
  padding: 7px 10px;
}
.progress { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 3px; background: rgba(255,255,255,.28); border-radius: 99px; }
.progress i { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; }
.ep-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72%;
  background: #161616;
  border-radius: 22px 22px 0 0;
  padding: 16px 14px 20px;
  overflow: auto;
}
.ep-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ep-head strong { display: block; font-size: 18px; }
.ep-head span { color: #aaa; font-size: 13px; }
#epClose {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #2a2a2e;
  color: #fff;
  font-size: 22px;
}
.ep-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.ep-grid button {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid #3a2458;
  background: #1c1424;
  color: #fff;
  font-weight: 800;
  position: relative;
}
.ep-grid button.on { background: var(--purple); border-color: transparent; }
.ep-grid button.lock::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 8px;
  height: 6px;
  transform: translateX(-50%);
  border: 1.5px solid #eab308;
  border-radius: 2px;
}

.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.dl-card {
  width: min(100%, 340px);
  background: #16141c;
  color: #fff;
  border-radius: 22px;
  padding: 28px 20px 20px;
  text-align: center;
  position: relative;
}
.dl-card h2 { margin: 8px 0 14px; font-size: 22px; line-height: 1.25; }
.dl-lead { margin: 0; color: #d8b4fe; font-weight: 700; }
.dl-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
}
.dl-shot img { width: 100%; border-radius: 12px; max-height: 280px; object-fit: contain; }
.dl-mark {
  width: 64px;
  height: 64px;
  margin: 8px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2a2138;
}
.dl-accept {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px;
  background: linear-gradient(90deg, #7c3aed, #c026d3);
  color: #fff;
  font-weight: 800;
}
.dl-frame { position: absolute; width: 0; height: 0; border: 0; }
