/* AlphaStream — стриминг-сервис. Тёмная кино-тема, акцент бирюза. */

:root {
  --bg: #0a0a0f;
  --bg-2: #101019;
  --bg-3: #16161f;
  --surface: #14141d;
  --surface-2: #1b1b27;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --txt: #f3f4f8;
  --txt-2: #a7abba;
  --txt-3: #6f7384;
  --accent: #2dd4bf;
  --accent-deep: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --live: #ff4d4d;
  --gold: #f5b14c;
  --shadow-card: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  --radius: 14px;
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.1px;
}

body.locked { overflow: hidden; }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input { font-family: inherit; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.92), rgba(10, 10, 15, 0.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.hdr.scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 8, 12, 0.96);
}
.hdr .wrap { display: flex; align-items: center; gap: 26px; }

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo svg { width: 30px; height: 30px; }
.logo b { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.logo b span { color: var(--accent); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 13px; border-radius: 9px;
  color: var(--txt-2); font-size: 14px; font-weight: 500;
  transition: color 0.18s, background 0.18s;
}
.nav a:hover { color: var(--txt); background: rgba(255, 255, 255, 0.05); }

.hdr-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: var(--txt-2);
  transition: color 0.18s, background 0.18s;
}
.icon-btn:hover { color: var(--txt); background: rgba(255, 255, 255, 0.06); }
.icon-btn svg { width: 20px; height: 20px; }

.fav-pill { position: relative; }
.fav-pill .count {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: none; place-items: center;
  background: var(--accent); color: #04231f;
  font-size: 10px; font-weight: 800; border-radius: 8px;
  line-height: 16px;
}
.fav-pill.has .count { display: grid; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform 0.16s var(--ease), background 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }

.btn-ghost { color: var(--txt); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-2); }

.btn-primary {
  background: var(--accent); color: #04231f;
  box-shadow: 0 8px 24px -10px rgba(45, 212, 191, 0.7);
}
.btn-primary:hover { background: #4ee0cd; box-shadow: 0 12px 30px -10px rgba(45, 212, 191, 0.85); }

.btn-block { width: 100%; padding: 13px 18px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 84vh; max-height: 760px;
  display: flex; align-items: flex-end;
  padding-bottom: 56px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 15, 0.96) 0%, rgba(10, 10, 15, 0.7) 38%, rgba(10, 10, 15, 0.15) 70%, rgba(10, 10, 15, 0.55) 100%),
    linear-gradient(0deg, var(--bg) 2%, rgba(10, 10, 15, 0) 46%);
}
.hero-inner { position: relative; z-index: 1; max-width: 600px; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin-bottom: 18px;
  background: var(--accent-soft); border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(36px, 6vw, 62px); font-weight: 800; margin-bottom: 14px; }
.hero .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-bottom: 18px; color: var(--txt-2); font-size: 14px; font-weight: 500;
}
.hero .meta .rating { color: var(--gold); font-weight: 700; }
.hero .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--txt-3); }
.hero .meta .tag {
  padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12.5px;
}
.hero p.lead { color: var(--txt-2); font-size: 16px; max-width: 520px; margin: 0 0 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Live strip ---------- */
.live-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding: 14px 0;
  overflow: hidden;
}
.live-strip .wrap { display: flex; align-items: center; gap: 18px; }
.live-label {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--txt);
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 77, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}
.live-track { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.live-track::-webkit-scrollbar { display: none; }
.live-item {
  flex-shrink: 0; display: flex; align-items: center; gap: 9px;
  padding: 7px 13px 7px 9px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; color: var(--txt-2);
  transition: border-color 0.2s, color 0.2s, transform 0.16s var(--ease);
}
.live-item:hover { border-color: var(--accent); color: var(--txt); transform: translateY(-1px); }
.live-item img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.live-item b { color: var(--txt); font-weight: 600; }
.live-item .now { color: var(--live); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 20px;
}
.section-head h2 { font-size: clamp(21px, 3vw, 27px); }
.section-head p { margin: 5px 0 0; color: var(--txt-3); font-size: 14px; }
.section-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); font-size: 14px; font-weight: 600; flex-shrink: 0;
  transition: gap 0.2s;
}
.section-link:hover { gap: 9px; }
.section-link svg { width: 15px; height: 15px; }

/* ---------- Tabs (filter) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tab {
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 13.5px; font-weight: 600;
  transition: all 0.18s;
}
.tab:hover { border-color: var(--line-2); color: var(--txt); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #04231f; }

/* ---------- Rails / carousels ---------- */
.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none; padding-bottom: 6px;
}
.rail::-webkit-scrollbar { display: none; }
.arrow {
  position: absolute; top: calc(50% - 28px);
  width: 44px; height: 44px; z-index: 4;
  display: grid; place-items: center;
  background: rgba(12, 12, 18, 0.86); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--txt); transition: opacity 0.2s, background 0.2s, transform 0.16s;
  opacity: 0; transform: translateY(-50%);
}
.arrow svg { width: 20px; height: 20px; }
.arrow.prev { left: -8px; }
.arrow.next { right: -8px; }
.arrow:hover { background: var(--accent); color: #04231f; border-color: var(--accent); }
.arrow:active { transform: translateY(-50%) scale(0.92); }
.arrow[disabled] { opacity: 0 !important; pointer-events: none; }
.rail-wrap:hover .arrow { opacity: 1; }

/* ---------- Poster card ---------- */
.card {
  position: relative; flex: 0 0 auto; width: 196px;
  scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
  transition: transform 0.28s var(--ease), box-shadow 0.28s;
  text-align: left;
}
.card.hidden { display: none; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.card .poster {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  background: linear-gradient(135deg, #14141d, #1d1d29);
}
.card .poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .poster img { transform: scale(1.07); }
.card .poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(8, 8, 12, 0.85) 0%, rgba(8, 8, 12, 0) 42%);
}
.card .rank {
  position: absolute; left: 9px; top: 9px; z-index: 2;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: rgba(10, 10, 15, 0.7); border: 1px solid var(--line-2);
  border-radius: 8px; font-size: 13px; font-weight: 800; color: var(--accent);
}
.card .quality {
  position: absolute; right: 9px; top: 9px; z-index: 2;
  padding: 3px 7px; background: rgba(10, 10, 15, 0.72);
  border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em; color: var(--txt);
}
.card .fav {
  position: absolute; right: 9px; bottom: 9px; z-index: 3;
  width: 34px; height: 34px; display: grid; place-items: center;
  background: rgba(10, 10, 15, 0.66); backdrop-filter: blur(4px);
  border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--txt); opacity: 0; transform: translateY(6px);
  transition: opacity 0.22s, transform 0.22s, color 0.2s, border-color 0.2s;
}
.card:hover .fav, .card .fav.on { opacity: 1; transform: translateY(0); }
.card .fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.card .fav.on { color: var(--accent); border-color: var(--accent); }
.card .fav.on svg { fill: var(--accent); stroke: var(--accent); }
.card .body { padding: 10px 11px 13px; }
.card .body h3 {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .body .sub {
  margin-top: 4px; display: flex; align-items: center; gap: 7px;
  color: var(--txt-3); font-size: 12px;
}
.card .body .sub .rating { color: var(--gold); font-weight: 700; }

/* wide card for sports/live */
.card.wide { width: 320px; }
.card.wide .poster { aspect-ratio: 16 / 9; }

/* ---------- Genre tiles ---------- */
.genre-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.genre {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; border: 1px solid var(--line);
  transition: transform 0.24s var(--ease), border-color 0.24s;
}
.genre:hover { transform: translateY(-4px); border-color: var(--accent); }
.genre img { width: 100%; height: 100%; object-fit: cover; opacity: 0.62; transition: opacity 0.3s, transform 0.5s var(--ease); }
.genre:hover img { opacity: 0.8; transform: scale(1.06); }
.genre::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(10, 10, 15, 0.8), rgba(10, 10, 15, 0.2));
}
.genre span {
  position: absolute; left: 15px; bottom: 13px; z-index: 2;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
}
.genre small { position: absolute; right: 13px; bottom: 15px; z-index: 2; color: var(--txt-3); font-size: 12px; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  padding: 24px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.24s, transform 0.24s var(--ease);
}
.feature:hover { border-color: var(--line-2); transform: translateY(-3px); }
.feature .ic {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--accent-soft); border-radius: 12px; color: var(--accent);
  margin-bottom: 16px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 16px; margin-bottom: 7px; }
.feature p { margin: 0; color: var(--txt-2); font-size: 13.5px; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plan {
  position: relative; padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.24s, transform 0.24s var(--ease);
}
.plan:hover { transform: translateY(-4px); border-color: var(--line-2); }
.plan.featured {
  border-color: rgba(45, 212, 191, 0.45);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.07), var(--surface) 60%);
  box-shadow: 0 24px 60px -32px rgba(45, 212, 191, 0.5);
}
.plan .ribbon {
  position: absolute; top: -11px; left: 24px;
  padding: 4px 12px; background: var(--accent); color: #04231f;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 999px;
}
.plan h3 { font-size: 18px; }
.plan .price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 5px; }
.plan .price b { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.plan .price span { color: var(--txt-3); font-size: 14px; }
.plan .note { color: var(--txt-3); font-size: 12.5px; margin-bottom: 20px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 11px; }
.plan li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--txt-2); }
.plan li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.plan li.off { color: var(--txt-3); }
.plan li.off svg { color: var(--txt-3); }

/* ---------- CTA ---------- */
.cta {
  position: relative; margin: 30px 0; padding: 56px 44px;
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 100% 0%, rgba(45, 212, 191, 0.16), transparent 55%), var(--bg-2);
  text-align: center;
}
.cta h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 12px; }
.cta p { color: var(--txt-2); font-size: 16px; max-width: 540px; margin: 0 auto 26px; }
.cta .cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta small { display: block; margin-top: 16px; color: var(--txt-3); font-size: 12.5px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 50px 0 30px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; margin-bottom: 36px; }
.footer .logo { margin-bottom: 14px; }
.footer .about { color: var(--txt-3); font-size: 13.5px; max-width: 320px; margin-bottom: 18px; }
.footer .socials { display: flex; gap: 9px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--txt-3); margin: 0 0 14px; font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--txt-2); font-size: 13.5px; transition: color 0.18s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--txt-3); font-size: 12.5px; flex-wrap: wrap;
}
.footer-bottom .pays { display: flex; gap: 8px; }
.footer-bottom .pays span {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; color: var(--txt-2);
}

/* ---------- Modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; }
.modal-root.open { display: block; }
.modal-overlay {
  position: absolute; inset: 0; background: rgba(4, 4, 8, 0.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade 0.22s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; z-index: 1;
  width: min(100% - 32px, 460px); max-height: 90vh; overflow-y: auto;
  margin: 6vh auto 0;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 18px; padding: 30px 28px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  animation: pop 0.26s var(--ease);
}
.modal.wide { width: min(100% - 32px, 560px); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; right: 14px; top: 14px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; color: var(--txt-2); z-index: 3;
  transition: color 0.18s, background 0.18s;
}
.modal-close:hover { color: var(--txt); background: rgba(255, 255, 255, 0.07); }
.modal-close svg { width: 18px; height: 18px; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--txt-2); font-size: 14px; margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--txt-2); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 12px 14px;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 11px;
  color: var(--txt); font-size: 14.5px;
  transition: border-color 0.18s, background 0.18s;
}
.field input::placeholder { color: var(--txt-3); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); background: var(--bg-2); }
.field.err input { border-color: var(--live); }
.field .msg { display: none; margin-top: 6px; font-size: 12px; color: var(--live); }
.field.err .msg { display: block; }

.plan-pick { display: grid; gap: 10px; margin-bottom: 20px; }
.plan-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 12px; cursor: pointer; transition: border-color 0.18s, background 0.18s;
  text-align: left;
}
.plan-opt:hover { border-color: var(--line-2); }
.plan-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt .pi b { font-size: 14.5px; }
.plan-opt .pi small { display: block; color: var(--txt-3); font-size: 12px; margin-top: 2px; }
.plan-opt .pp { font-size: 16px; font-weight: 800; white-space: nowrap; }
.plan-opt .pp span { font-size: 12px; color: var(--txt-3); font-weight: 500; }
.radio {
  width: 19px; height: 19px; border-radius: 50%;
  border: 2px solid var(--line-2); flex-shrink: 0; position: relative;
}
.plan-opt.sel .radio { border-color: var(--accent); }
.plan-opt.sel .radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}

.modal-success { text-align: center; padding: 14px 0 4px; }
.modal-success .check {
  width: 64px; height: 64px; margin: 0 auto 18px;
  display: grid; place-items: center;
  background: var(--accent-soft); border-radius: 50%; color: var(--accent);
}
.modal-success .check svg { width: 32px; height: 32px; }
.modal-success h2 { margin-bottom: 8px; }
.modal-success p { color: var(--txt-2); font-size: 14.5px; margin: 0 0 22px; }

.legal-body { color: var(--txt-2); font-size: 14px; line-height: 1.7; }
.legal-body h3 { font-size: 15px; color: var(--txt); margin: 20px 0 8px; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul { margin: 0 0 12px; padding-left: 18px; }
.legal-body li { margin-bottom: 6px; }

/* detail modal */
.detail-hero { position: relative; margin: -30px -28px 20px; height: 200px; overflow: hidden; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface), transparent 70%); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--txt-2); font-size: 13.5px; margin-bottom: 14px; }
.detail-meta .rating { color: var(--gold); font-weight: 700; }
.detail-meta .tag { padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12px; }
.detail-desc { color: var(--txt-2); font-size: 14px; line-height: 1.65; margin-bottom: 20px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Search overlay ---------- */
.search-root { position: fixed; inset: 0; z-index: 110; display: none; }
.search-root.open { display: block; }
.search-overlay { position: absolute; inset: 0; background: rgba(4, 4, 8, 0.86); backdrop-filter: blur(8px); animation: fade 0.2s ease; }
.search-panel {
  position: relative; z-index: 1;
  width: min(100% - 32px, 720px); margin: 9vh auto 0;
  animation: pop 0.24s var(--ease);
}
.search-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 6px 6px 6px 18px;
}
.search-box svg { width: 22px; height: 22px; color: var(--txt-3); flex-shrink: 0; }
.search-box input { flex: 1; background: none; border: none; color: var(--txt); font-size: 17px; padding: 14px 0; }
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--txt-3); }
.search-box .esc {
  padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 9px;
  color: var(--txt-3); font-size: 12px; font-weight: 600;
}
.search-hint { margin: 14px 4px; color: var(--txt-3); font-size: 13px; }
.search-results { margin-top: 8px; display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; }
.search-res {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; text-align: left; width: 100%;
  transition: border-color 0.18s, background 0.18s;
}
.search-res:hover { border-color: var(--accent); background: var(--surface-2); }
.search-res img { width: 42px; height: 60px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.search-res .info b { font-size: 14.5px; font-weight: 600; }
.search-res .info small { display: block; color: var(--txt-3); font-size: 12.5px; margin-top: 2px; }
.search-empty { padding: 30px; text-align: center; color: var(--txt-3); font-size: 14px; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 18px; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 13px; color: var(--txt); font-size: 14px; font-weight: 500;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  animation: toast-in 0.3s var(--ease);
}
.toast.out { animation: toast-out 0.3s var(--ease) forwards; }
.toast svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(14px); } }

/* ---------- Mobile menu ---------- */
.mmenu { position: fixed; inset: 0; z-index: 90; display: none; }
.mmenu.open { display: block; }
.mmenu-overlay { position: absolute; inset: 0; background: rgba(4, 4, 8, 0.7); animation: fade 0.2s ease; }
.mmenu-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(82%, 320px);
  background: var(--bg-2); border-left: 1px solid var(--line);
  padding: 22px; display: flex; flex-direction: column;
  animation: slide-in 0.26s var(--ease);
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.mmenu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.mmenu nav { display: flex; flex-direction: column; gap: 4px; }
.mmenu nav a {
  padding: 13px 14px; border-radius: 11px; font-size: 16px; font-weight: 600; color: var(--txt);
  transition: background 0.18s;
}
.mmenu nav a:hover { background: rgba(255, 255, 255, 0.05); }
.mmenu .mmenu-actions { margin-top: auto; display: grid; gap: 10px; }

/* ---------- watch.html ---------- */
.watch-main { padding-top: 24px; }
.player {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.player::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 45%, rgba(10,10,15,0.35), rgba(10,10,15,0.85)); }
.play-btn {
  position: relative; z-index: 2;
  width: 80px; height: 80px; display: grid; place-items: center;
  background: var(--accent); border-radius: 50%; color: #04231f;
  box-shadow: 0 16px 40px -10px rgba(45, 212, 191, 0.7);
  transition: transform 0.18s var(--ease);
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 34px; height: 34px; margin-left: 4px; }
.player .ptitle { position: absolute; left: 22px; bottom: 20px; z-index: 2; }
.player .ptitle b { font-size: 18px; }
.player .ptitle small { display: block; color: var(--txt-2); font-size: 13px; margin-top: 3px; }
.watch-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; margin-top: 28px; }
.watch-info h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 14px; }
.watch-info .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--txt-2); font-size: 14px; margin-bottom: 20px; }
.watch-info .meta .rating { color: var(--gold); font-weight: 700; }
.watch-info .meta .tag { padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12.5px; }
.watch-info p { color: var(--txt-2); font-size: 15px; line-height: 1.7; margin: 0 0 18px; }
.watch-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.watch-facts { display: grid; gap: 14px; }
.fact { display: flex; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.fact .k { color: var(--txt-3); font-size: 13px; min-width: 96px; }
.fact .v { color: var(--txt); font-size: 13.5px; font-weight: 500; }
.cast { display: flex; flex-wrap: wrap; gap: 8px; }
.cast span { padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--txt-2); }
.watch-rel { margin-top: 44px; }

/* ---------- 404 ---------- */
.nf { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 60px 20px; position: relative; overflow: hidden; }
.nf-bg { position: absolute; inset: 0; z-index: 0; }
.nf-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.16; }
.nf-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 40%, transparent, var(--bg)); }
.nf-inner { position: relative; z-index: 1; max-width: 520px; }
.nf .code { font-size: clamp(90px, 18vw, 170px); font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.nf h1 { font-size: clamp(24px, 4vw, 34px); margin: 8px 0 14px; }
.nf p { color: var(--txt-2); font-size: 16px; margin: 0 0 28px; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .genre-grid { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .nav { display: none; }
  .hdr-actions .hide-sm { display: none; }
  .burger { display: grid; }
  .plans { grid-template-columns: 1fr; }
  .plan.featured { order: -1; }
  .watch-grid { grid-template-columns: 1fr; }
  .cta { padding: 40px 24px; }
}
@media (max-width: 620px) {
  .genre-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; padding-bottom: 40px; }
  .card { width: 150px; }
  .card.wide { width: 270px; }
  .section { padding: 34px 0; }
  .modal { padding: 26px 20px; }
  .detail-hero { margin: -26px -20px 20px; height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
