:root {
  --bg: #080808;
  --bg-2: #111111;
  --line: rgba(255,255,255,.12);
  --text: #f4f1ea;
  --muted: #a39e94;
  --amber: #e4c48a;
  --amber-2: #c4a574;
  --danger: #e85d4c;
  --card: #161616;
  --shadow: 0 30px 80px rgba(0,0,0,.45);
  --serif: "Libre Baskerville", "Iowan Old Style", Palatino, serif;
  --sans: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 72px; padding: 0 40px;
  background: linear-gradient(180deg, rgba(8,8,8,.92), rgba(8,8,8,.72) 70%, transparent);
  backdrop-filter: blur(16px);
}
.brand {
  font-family: var(--serif);
  letter-spacing: .18em;
  font-size: 15px;
  font-weight: 400;
}
.brand i { color: var(--amber); font-style: normal; }
.nav-links { display: flex; gap: 22px; color: var(--muted); font-size: 14px; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-search { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-search input, .filters input, .filters select {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  min-width: 220px;
}
.nav-search button, .btn, .btn-ghost {
  border: 0; cursor: pointer; border-radius: 999px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--text); color: #111; padding: 12px 22px; font-weight: 600;
}
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text);
  border: 1px solid var(--line) !important;
  padding: 12px 22px;
}
.btn-amber { background: var(--amber); color: #1a140c; }
.nav-search button {
  background: transparent; border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px;
}
.menu-btn { display: none; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 12px; }
.drawer {
  display: none; position: fixed; inset: 72px 0 0 0; z-index: 30;
  background: rgba(8,8,8,.96); padding: 24px;
}
.drawer.open { display: grid; align-content: start; gap: 18px; }
.drawer a { font-size: 28px; font-family: var(--serif); }

.hero {
  min-height: 78vh;
  margin-top: -72px;
  padding: 18vh 7vw 8vh;
  background-size: cover;
  background-position: center right;
  display: flex; align-items: flex-end;
}
.hero-copy { max-width: 640px; }
.kicker {
  color: var(--amber);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: 12px;
}
h1, h2, .serif { font-family: var(--serif); font-weight: 400; }
.hero h1 { font-size: clamp(52px, 7vw, 92px); line-height: .92; margin: 12px 0 18px; }
.hero p { font-size: 18px; color: #ddd7cc; max-width: 460px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.tags span, .chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}
.hero-actions, .title-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 18px; margin: 8px 0 4px; color: var(--muted); font-size: 14px; }
.hero-stats b { color: var(--amber); font-weight: 600; }
.dots { display: flex; gap: 8px; margin-top: 28px; }
.dots button {
  width: 28px; height: 3px; border: 0; padding: 0; border-radius: 99px;
  background: rgba(255,255,255,.28); cursor: pointer;
}
.dots button.on { background: var(--text); }

.genres { display: flex; gap: 10px; overflow-x: auto; padding: 8px 40px 0; }
.genres a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}
.genres a:hover { color: var(--text); border-color: rgba(255,255,255,.4); }

.card { position: relative; }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(8,8,8,.72); color: var(--amber);
  border: 1px solid rgba(228,196,138,.35);
  border-radius: 999px; padding: 3px 8px; font-size: 11px; letter-spacing: .04em;
}
.card-poster { position: relative; }
.progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15);
}
.progress i { display: block; height: 100%; background: var(--amber); width: 0; }

.top10 { display: grid; gap: 10px; }
.rank {
  display: grid; grid-template-columns: 42px 54px 1fr auto; gap: 12px; align-items: center;
  padding: 8px; border-radius: 12px;
}
.rank:hover { background: #141414; }
.rank b { font-family: var(--serif); font-size: 28px; color: var(--amber); font-weight: 400; }
.rank img { width: 54px; height: 72px; object-fit: cover; border-radius: 8px; }
.rank small { color: var(--muted); }

.resume {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 40px 10px; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: 16px;
  background: #121212;
}
.resume span { color: var(--muted); }

.section { padding: 28px 40px 8px; }
.section h2 { font-size: 28px; margin: 0 0 16px; }
.split {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.row {
  display: flex;
  gap: 14px;
  padding-bottom: 12px;
}
.row .card { flex: 1 1 0; min-width: 0; }
.row::-webkit-scrollbar { height: 0; }
.card { scroll-snap-align: start; }
.card-poster {
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  background: #1b1b1b;
  box-shadow: var(--shadow);
}
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover img { transform: scale(1.04); }
.card-meta { padding: 10px 2px 4px; }
.card-meta strong { display: block; font-size: 14px; font-weight: 560; }
.card-meta span { color: var(--muted); font-size: 12px; }

.page { padding: 28px 40px 80px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 48px; margin: 0; }
.filters { display: flex; gap: 10px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.empty { color: var(--muted); }

.title {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  padding: 20px 7vw 40px;
}
.title-poster {
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.title-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.title-copy h1 { font-size: clamp(42px, 5vw, 72px); margin: 8px 0 10px; line-height: .95; }
.muted { color: var(--muted); }
.synopsis { font-size: 17px; line-height: 1.65; max-width: 640px; }
.ep-list { display: grid; gap: 8px; margin-top: 28px; }
.ep {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: #121212; border: 1px solid transparent;
}
.ep:hover { border-color: var(--line); }
.ep.locked { color: var(--muted); }
.ep em { font-style: normal; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.watch {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: calc(100vh - 72px);
}
.stage { padding: 24px 32px 48px; }
.player-wrap {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
  border: 1px solid var(--line);
}
video { width: 100%; height: 100%; background: #000; }
.player-note {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 28px;
  background:
    linear-gradient(180deg, transparent, rgba(0,0,0,.78)),
    url("posters/hero-price.jpg") center/cover;
}
.player-note div {
  max-width: 520px;
  background: rgba(8,8,8,.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.watch-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; }
.rail { border-left: 1px solid var(--line); padding: 24px 18px; overflow: auto; }
.rail a {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 14px;
}
.rail a.on { background: #1c1c1c; color: var(--text); }
.rail a.locked { opacity: .7; }
.disabled { pointer-events: none; opacity: .35; }

.premium {
  min-height: calc(100vh - 72px);
  display: grid; place-items: center;
  padding: 40px 20px 80px;
}
.premium-card {
  width: min(560px, 100%);
  background: #111;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.premium-card h1 { font-size: 42px; margin: 8px 0 12px; }
.plans { display: grid; gap: 10px; margin: 22px 0; }
.plan {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
}
.plan strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }

.footer {
  padding: 48px 40px 32px;
  color: var(--muted);
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr;
  gap: 28px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  font-size: 13px;
  line-height: 1.7;
}
.footer h3 { margin: 0 0 8px; color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.footer a { display: inline; }
.footer .fine { margin-top: 14px; font-size: 12px; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: start; }
.contact-form { display: grid; gap: 12px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: 64px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(8,8,8,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}
.tabbar a.on { color: var(--text); }
.tabbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.footer strong { color: var(--text); font-weight: 500; }
.footer a:hover { color: var(--text); }

.legal { max-width: 720px; }
.legal h1 { font-size: 56px; margin: 8px 0 12px; }
.legal h2 { font-size: 26px; margin: 32px 0 8px; }
.legal p { color: #d9d3c8; line-height: 1.7; }
.account-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.panel {
  background: #111; border: 1px solid var(--line); border-radius: 18px; padding: 24px;
}
.panel h2 { margin-top: 0; }

@media (max-width: 900px) {
  body { padding-bottom: 76px; }
  .nav { padding: 0 16px; gap: 14px; }
  .nav-links, .nav-search { display: none; }
  .menu-btn { display: none; }
  .tabbar { display: flex; }
  .hero, .section, .page, .footer, .genres { padding-left: 16px; padding-right: 16px; }
  .title, .watch, .account-grid, .contact-grid, .footer { grid-template-columns: 1fr; }
  .split { display: block; }
  .title { padding: 12px 16px 40px; }
  .rail { border-left: 0; border-top: 1px solid var(--line); }
  .resume { margin: 0 16px; }
  .hero h1 { font-size: 48px; }
  .footer { padding-bottom: 28px; }
  body[data-page="watch"] { padding-bottom: 0; background: #000; }
  body[data-page="watch"] .nav, body[data-page="watch"] .tabbar { display: none; }
  body[data-page="watch"] .watch { display: block; min-height: 100vh; min-height: 100dvh; }
  body[data-page="watch"] .stage { padding: 0; }
  body[data-page="watch"] .player-wrap {
    width: min(100vw, calc(100dvh * 9 / 16));
    height: 100dvh;
    margin: 0 auto;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
  }
  body[data-page="watch"] .player-note { background-position: center top; }
  body[data-page="watch"] .watch-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
    margin: 0; padding: 18px 16px 22px;
    background: linear-gradient(transparent, rgba(0,0,0,.82));
  }
  body[data-page="watch"] .watch-bar h1 { font-size: 26px; }
  body[data-page="watch"] .rail {
    display: flex; gap: 8px; overflow-x: auto;
    border: 0; padding: 0 16px 16px;
    position: absolute; left: 0; right: 0; bottom: 92px; z-index: 5;
  }
  body[data-page="watch"] .rail a { flex: 0 0 auto; background: rgba(0,0,0,.45); }
  .phone-back {
    display: inline-flex; position: absolute; top: 14px; left: 14px; z-index: 6;
    color: #fff; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px; padding: 8px 12px; font-size: 13px;
  }
}
