/* Nova — private, ad-free streaming. Dark glass UI. */
:root {
  --bg: #070709;
  --bg-soft: #0b0b0f;
  --surface: #101015;
  --surface-2: #16161d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f6f8;
  --muted: #9b9ba6;
  --muted-2: #6f6f7a;
  --accent: #ff2d4b;
  --accent-2: #ff7a45;
  --accent-soft: rgba(255, 45, 75, 0.14);
  --ok: #3ddc97;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  --topbar: 68px;
  --sans: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a33; border-radius: 99px; border: 3px solid var(--bg); }
.no-bar::-webkit-scrollbar { display: none; }
.no-bar { scrollbar-width: none; }

/* ---------------- boot ---------------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 22px; justify-items: center; background: var(--bg); z-index: 5; }
.boot-logo .nova-mark { width: 64px; height: 64px; }
.boot-logo { animation: pulse 1.4s ease-in-out infinite; }
.boot-bar { width: 120px; height: 3px; border-radius: 9px; background: #1c1c22; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 9px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.06); opacity: 1; } }

/* ---------------- brand ---------------- */
.nova-mark {
  display: inline-block; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, transparent 9%),
              linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative; flex: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 20px rgba(255,45,75,.35);
}
.nova-mark::after {
  content: ""; position: absolute; inset: 22%;
  background: #0a0a0d; clip-path: polygon(8% 0, 100% 50%, 8% 100%);
  border-radius: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 17px; }
.brand b { background: linear-gradient(90deg, #fff, #ffd8cf); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- top bar ---------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: calc(var(--topbar) + var(--safe-t));
  padding: var(--safe-t) clamp(14px, 4vw, 44px) 0;
  display: flex; align-items: center; gap: 26px; z-index: 40;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { background: rgba(8,8,11,.78); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); border-bottom-color: var(--line); }
.topbar .brand { margin-right: 6px; }
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; }
.nav-links a {
  padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-links a.active { color: var(--text); background: rgba(255,255,255,.09); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s; color: var(--text);
}
.icon-btn:hover { background: rgba(255,255,255,.1); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.small { width: 36px; height: 36px; }
.icon-btn.small svg { width: 16px; height: 16px; }

/* search overlay */
.search-layer {
  position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center;
  padding: calc(var(--topbar) + var(--safe-t) + 10px) 16px 40px;
  background: rgba(4,4,7,.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.search-panel { width: 100%; max-width: 720px; }
.search-field {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.search-field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-field input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--text);
  font: 600 16px/1 var(--sans); min-width: 0;
}
.search-field input::placeholder { color: var(--muted-2); }
.search-suggest { margin-top: 14px; display: grid; gap: 2px; }
.suggest-row {
  display: flex; align-items: center; gap: 12px; padding: 9px; border-radius: 12px;
  cursor: pointer; background: none; border: 0; text-align: left; width: 100%;
}
.suggest-row:hover, .suggest-row:focus-visible { background: rgba(255,255,255,.06); outline: 0; }
.suggest-row img { width: 38px; height: 56px; object-fit: cover; border-radius: 7px; background: #1b1b22; }
.suggest-row .t { font-weight: 700; font-size: 14px; }
.suggest-row .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 2px 0; }
.chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.chip.active { background: var(--accent-soft); color: #ffb3bf; border-color: rgba(255,45,75,.5); }
.chip.ghost { background: transparent; }

/* ---------------- layout ---------------- */
main { min-height: 100vh; padding-bottom: calc(40px + var(--safe-b)); }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px); }
.page { padding-top: calc(var(--topbar) + var(--safe-t) + 12px); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 18px 0 20px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; margin: 0; letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 14px; gap: 12px; }
.section-title h2 { font-size: clamp(18px, 2vw, 22px); font-weight: 800; margin: 0; letter-spacing: -.01em; }
.section-title a, .section-title button { font-size: 13px; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.section-title a:hover { color: var(--text); }
.section-title .count { color: var(--muted-2); font-weight: 600; margin-left: 8px; font-size: 13px; }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: min(76vh, 720px); display: flex; align-items: flex-end; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.02); transition: opacity .6s ease; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,7,9,.96) 0%, rgba(7,7,9,.7) 34%, rgba(7,7,9,.1) 68%, rgba(7,7,9,.35) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 46%);
}
.hero-inner { width: 100%; padding: 0 clamp(16px, 4vw, 44px) clamp(34px, 6vh, 64px); max-width: 1480px; margin: 0 auto; }
.hero-copy { max-width: 640px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: #ffc3cb; background: var(--accent-soft);
  border: 1px solid rgba(255,45,75,.32); padding: 6px 11px; border-radius: 999px; margin-bottom: 14px;
}
.hero-title { font-size: clamp(34px, 6vw, 62px); line-height: 1.02; letter-spacing: -.035em; font-weight: 900; margin: 0 0 14px; text-shadow: 0 10px 40px rgba(0,0,0,.5); }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: #d3d3da; font-weight: 600; margin-bottom: 14px; }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #6f6f7a; }
.hero-meta .rate { display: inline-flex; align-items: center; gap: 5px; color: #ffd66b; }
.hero-meta .rate svg { width: 13px; height: 13px; }
.hero-ov { color: #c8c8d0; font-size: clamp(13.5px, 1.2vw, 15px); line-height: 1.7; max-width: 560px; margin: 0 0 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-dots { display: flex; gap: 6px; margin-top: 26px; }
.hero-dots button { width: 22px; height: 3px; border-radius: 99px; border: 0; background: rgba(255,255,255,.22); cursor: pointer; padding: 0; transition: .25s; }
.hero-dots button.active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 34px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, opacity .15s;
  white-space: nowrap; text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: #fff; color: #0a0a0c; }
.btn.primary:hover { background: #ececf0; }
.btn.accent { background: linear-gradient(135deg, var(--accent), #ff4d6d); color: #fff; box-shadow: 0 8px 28px rgba(255,45,75,.28); }
.btn.accent:hover { filter: brightness(1.06); }
.btn.glass { background: rgba(255,255,255,.1); color: var(--text); border-color: rgba(255,255,255,.12); backdrop-filter: blur(12px); }
.btn.glass:hover { background: rgba(255,255,255,.16); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--line-strong); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.on { color: #ffb3bf; border-color: rgba(255,45,75,.45); background: var(--accent-soft); }

/* ---------------- cards / rows ---------------- */
.row-scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 0 8px; scroll-padding-left: 4px; }
.row-scroller::-webkit-scrollbar { display: none; }
.row-scroller { scrollbar-width: none; }
.card { flex: 0 0 auto; width: clamp(124px, 13.4vw, 186px); scroll-snap-align: start; position: relative; }
.card-poster { position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: #14141a; border: 1px solid var(--line); transition: transform .22s ease, border-color .22s, box-shadow .22s; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .3s; }
.card:hover .card-poster { transform: translateY(-3px); border-color: rgba(255,255,255,.22); box-shadow: 0 14px 34px rgba(0,0,0,.55); }
.card:hover .card-poster img { transform: scale(1.04); }
.card-poster .badge { position: absolute; left: 8px; top: 8px; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 4px 7px; border-radius: 7px; background: rgba(8,8,11,.72); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.12); }
.card-poster .rate { position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 800; background: rgba(8,8,11,.78); padding: 3px 7px; border-radius: 8px; color: #ffd66b; display: flex; align-items: center; gap: 4px; }
.card-poster .rate svg { width: 11px; height: 11px; }
.card-poster .hover-layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 55%); transition: opacity .2s; }
.card:hover .hover-layer { opacity: 1; }
.play-fab { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.95); color: #0a0a0c; display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.play-fab svg { width: 18px; height: 18px; margin-left: 2px; }
.card-title { font-size: 13px; font-weight: 700; margin-top: 9px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.card-progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; border-radius: 9px; background: rgba(255,255,255,.3); overflow: hidden; }
.card-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(124px, 13vw, 176px), 1fr)); gap: clamp(14px, 1.6vw, 22px) clamp(10px, 1.2vw, 16px); }
.grid .card { width: auto; }

/* skeleton */
.sk { background: linear-gradient(100deg, #121218 20%, #1b1b23 36%, #121218 52%); background-size: 220% 100%; animation: shimmer 1.2s linear infinite; border-radius: 14px; }
@keyframes shimmer { to { background-position: -120% 0; } }
.sk-card { aspect-ratio: 2/3; }
.sk-line { height: 12px; border-radius: 6px; margin-top: 9px; }

/* ---------------- details ---------------- */
.detail-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; isolation: isolate; }
.detail-hero .hero-bg::after {
  background:
    linear-gradient(90deg, rgba(7,7,9,.97) 0%, rgba(7,7,9,.78) 40%, rgba(7,7,9,.25) 100%),
    linear-gradient(0deg, var(--bg) 3%, transparent 60%);
}
.detail-inner { padding-top: calc(var(--topbar) + 40px); padding-bottom: clamp(26px, 5vh, 56px); width: 100%; }
.detail-row { display: flex; gap: clamp(18px, 3vw, 40px); align-items: flex-end; }
.detail-poster { width: clamp(130px, 17vw, 240px); aspect-ratio: 2/3; border-radius: 18px; overflow: hidden; flex: none; border: 1px solid var(--line-strong); box-shadow: var(--shadow); background: #13131a; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy { min-width: 0; flex: 1; }
.detail-copy h1 { font-size: clamp(28px, 4.6vw, 54px); font-weight: 900; line-height: 1.03; letter-spacing: -.03em; margin: 0 0 10px; }
.tagline { color: #ffb3bf; font-style: italic; font-size: 14px; margin: 0 0 10px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: #cfcfd6; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.meta-line .pill { border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 7px; font-size: 11px; letter-spacing: .04em; color: #d7d7dd; }
.meta-line .rate { color: #ffd66b; display: inline-flex; align-items: center; gap: 5px; }
.meta-line .rate svg { width: 13px; height: 13px; }
.genre-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.genre { font-size: 12px; font-weight: 600; color: #c9c9d2; background: rgba(255,255,255,.06); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.detail-overview { color: #c6c6cf; line-height: 1.75; font-size: 14.5px; max-width: 760px; margin: 0 0 20px; }
.detail-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 12px 0 6px; }
.fact { border-top: 1px solid var(--line); padding-top: 11px; }
.fact .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); font-weight: 800; }
.fact .v { margin-top: 5px; font-size: 13.5px; font-weight: 600; color: #e6e6ea; line-height: 1.5; }
.cast-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.cast { width: 108px; flex: none; }
.cast .ph { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; background: #15151c; border: 1px solid var(--line); }
.cast .ph img { width: 100%; height: 100%; object-fit: cover; }
.cast .n { font-size: 12.5px; font-weight: 700; margin-top: 8px; line-height: 1.3; }
.cast .r { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }

/* episodes */
.season-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.select {
  appearance: none; background: var(--surface-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b9ba6' stroke-width='2.5'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 14px center;
  border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 10px 38px 10px 16px;
  font: 600 13px var(--sans); cursor: pointer; outline: 0;
}
.episodes { display: grid; gap: 10px; }
.ep {
  display: flex; gap: 14px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.03);
  border: 1px solid transparent; cursor: pointer; transition: .16s; text-align: left; width: 100%;
}
.ep:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
.ep.current { border-color: rgba(255,45,75,.4); background: var(--accent-soft); }
.ep-thumb { width: clamp(110px, 16vw, 168px); aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #14141b; flex: none; position: relative; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-thumb .num { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 800; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 6px; }
.ep-body { min-width: 0; flex: 1; padding: 2px 0; }
.ep-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ep-name { font-size: 14px; font-weight: 700; line-height: 1.35; }
.ep-dur { font-size: 11.5px; color: var(--muted); flex: none; }
.ep-ov { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-progress { height: 3px; background: rgba(255,255,255,.12); border-radius: 9px; margin-top: 8px; overflow: hidden; }
.ep-progress i { display: block; height: 100%; background: var(--accent); }

/* ---------------- watch ---------------- */
.watch-page { background: radial-gradient(1200px 600px at 50% -200px, rgba(255,45,75,.1), transparent 70%), var(--bg); min-height: 100vh; }
.watch-shell { max-width: 1600px; margin: 0 auto; padding: calc(var(--topbar) + var(--safe-t) + 10px) clamp(10px, 3vw, 32px) 60px; }
.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.watch-main { min-width: 0; }
.watch-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 16px 2px 8px; }
.watch-title-row h1 { font-size: clamp(19px, 2.3vw, 27px); font-weight: 800; margin: 0; letter-spacing: -.01em; line-height: 1.2; }
.watch-title-row .sub { color: var(--muted); font-size: 13px; margin-top: 4px; font-weight: 600; }
.watch-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.watch-aside { position: sticky; top: calc(var(--topbar) + var(--safe-t) + 10px); }
.panel { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aside-list { display: grid; gap: 6px; max-height: min(66vh, 720px); overflow-y: auto; }
.aside-list .ep { padding: 10px 8px; }
.aside-list .ep-thumb { width: 86px; }
.aside-list .ep-name { font-size: 12.5px; }
.aside-list .ep-ov { display: none; }

/* player */
.player-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.06); }
.player { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; user-select: none; -webkit-user-select: none; }
.player.idle { cursor: none; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .p-loading {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 9px;
  text-align: center; padding: 24px; pointer-events: none;
  background: radial-gradient(600px 300px at 50% 45%, rgba(255,45,75,.08), transparent 70%), rgba(4,4,7,.55);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.player:not(.loading) .p-loading, .player.error .p-loading { display: none; }
.pl-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.16); border-top-color: var(--accent); animation: spin .8s linear infinite; margin-bottom: 4px; }
.pl-t { font-size: 14px; font-weight: 800; }
.pl-s { font-size: 11.5px; color: #b7b7c2; max-width: 300px; line-height: 1.5; }
@keyframes spin { to { transform: rotate(360deg); } }
.player .p-error { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 20px; background: rgba(0,0,0,.72); }
.player.error .p-error { display: grid; }
.p-error h4 { margin: 0 0 6px; font-size: 15px; }
.p-error p { margin: 0; font-size: 12.5px; color: var(--muted); max-width: 320px; line-height: 1.6; }

.controls {
  position: absolute; inset: auto 0 0 0; padding: 42px 14px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.45) 55%, transparent);
  display: flex; flex-direction: column; gap: 6px; transition: opacity .2s ease, transform .2s ease;
  z-index: 3;
}
.player.idle .controls { opacity: 0; transform: translateY(6px); pointer-events: none; }
.controls-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 2px; }
.now-playing { display: flex; align-items: center; gap: 10px; min-width: 0; }
.now-playing .np-back { flex: none; }
.now-playing .np-text { min-width: 0; }
.now-playing .np-t { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing .np-s { font-size: 11px; color: #b5b5c0; font-weight: 600; }
.controls-row { display: flex; align-items: center; gap: 4px; }
.ctl { width: 38px; height: 38px; border: 0; background: none; color: #fff; border-radius: 10px; display: grid; place-items: center; cursor: pointer; transition: background .15s; flex: none; }
.ctl:hover { background: rgba(255,255,255,.13); }
.ctl svg { width: 20px; height: 20px; }
.ctl.big { width: 42px; height: 42px; }
.ctl.big svg { width: 26px; height: 26px; }
.ctl.spacer { margin-left: auto; }
.time { font-size: 11.5px; font-weight: 700; color: #d9d9e2; font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap; }
.scrub { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub-track { position: relative; height: 4px; width: 100%; background: rgba(255,255,255,.24); border-radius: 99px; overflow: visible; }
.scrub-buffer { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.34); border-radius: 99px; width: 0; }
.scrub-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; width: 0; }
.scrub-knob { position: absolute; top: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; transform: translateY(-50%) scale(0); transition: transform .15s; box-shadow: 0 0 0 4px rgba(255,45,75,.24); }
.scrub:hover .scrub-knob, .scrub.dragging .scrub-knob { transform: translateY(-50%) scale(1); }
.scrub-tip { position: absolute; bottom: 20px; transform: translateX(-50%); background: rgba(10,10,14,.92); border: 1px solid var(--line); padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .12s; }
.scrub:hover .scrub-tip, .scrub.dragging .scrub-tip { opacity: 1; }
.vol-wrap { display: flex; align-items: center; }
.vol-slider { width: 0; overflow: hidden; transition: width .18s; display: flex; align-items: center; }
.vol-wrap:hover .vol-slider, .vol-wrap:focus-within .vol-slider { width: 76px; }
.vol-slider input { width: 70px; margin: 0 4px; accent-color: var(--accent); }
.badge-live { font-size: 10px; font-weight: 800; background: rgba(255,255,255,.14); padding: 3px 6px; border-radius: 5px; }
.skip-intro {
  position: absolute; right: 16px; bottom: 92px; background: rgba(12,12,16,.85); border: 1px solid rgba(255,255,255,.24);
  color: #fff; font-size: 12.5px; font-weight: 700; padding: 10px 16px; border-radius: 10px; cursor: pointer; backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: .2s;
}
.skip-intro.show { opacity: 1; pointer-events: auto; }
.next-card {
  position: absolute; right: 16px; bottom: 92px; width: 280px; background: rgba(10,10,14,.92); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 12px; backdrop-filter: blur(16px); display: none; gap: 10px; z-index: 4;
}
.next-card.show { display: flex; }
.next-card img { width: 92px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #16161d; }
.next-card .nc-t { font-size: 10px; letter-spacing: .1em; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.next-card .nc-n { font-size: 12.5px; font-weight: 700; margin-top: 3px; line-height: 1.3; }
.next-card .nc-a { display: flex; gap: 6px; margin-top: 8px; }
.next-card .nc-a button { font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.1); cursor: pointer; color: #fff; }
.next-card .nc-a button.p { background: #fff; color: #000; border-color: #fff; }
.mobile-back { display: none; }

/* menus inside player */
.p-menu {
  position: absolute; right: 14px; bottom: 76px; width: 290px; max-height: 62%; overflow: auto;
  background: rgba(12,12,17,.96); border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px;
  backdrop-filter: blur(20px); z-index: 6; box-shadow: var(--shadow); display: none;
}
.p-menu.show { display: block; animation: pop .14s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }
.p-menu h5 { margin: 6px 10px 8px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.p-menu .opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 9px; font-size: 13px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; color: #e8e8ee; }
.p-menu .opt:hover { background: rgba(255,255,255,.08); }
.p-menu .opt.active { color: #ffb3bf; background: var(--accent-soft); }
.p-menu .opt small { color: var(--muted); font-size: 11px; }
.p-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.speed-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 6px 8px; }
.speed-row button { font-size: 11.5px; padding: 5px 9px; border-radius: 7px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.speed-row button.active { color: #fff; background: var(--accent-soft); border-color: rgba(255,45,75,.4); }
.center-flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.center-flash span { background: rgba(0,0,0,.55); border-radius: 999px; padding: 10px 16px; font-size: 15px; font-weight: 800; opacity: 0; transition: opacity .2s; }
.center-flash span.show { opacity: 1; }

/* ---------------- live sports ---------------- */
.live-hero { padding: 8px 0 4px; }
.live-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0 14px; }
.live-head h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; margin: 0; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff2d4b; box-shadow: 0 0 0 5px rgba(255,45,75,.15); animation: livePulse 1.8s infinite; display: inline-block; }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.live-meta { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.live-filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; margin-bottom: 12px; scrollbar-width: none; }
.live-filters::-webkit-scrollbar { display: none; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.match-card { display: block; background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)); border: 1px solid var(--line); border-radius: 16px; padding: 14px; transition: .18s; position: relative; overflow: hidden; }
.match-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.07); transform: translateY(-1px); }
.match-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.match-league { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.match-badge { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.08); color: #d9d9e2; border: 1px solid var(--line); }
.match-badge.live { background: rgba(255,45,75,.16); border-color: rgba(255,45,75,.45); color: #ffb3bf; }
.match-badge.live::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #ff2d4b; margin-right: 5px; vertical-align: middle; animation: livePulse 1.8s infinite; }
.match-teams { display: grid; gap: 10px; }
.match-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.match-team img { width: 30px; height: 30px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.match-team span { font-size: 14px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.match-bottom .watch { color: #0a0a0c; background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 11px; font-weight: 800; }
.live-section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.live-section-title h2 { font-size: 16px; font-weight: 800; margin: 0; letter-spacing: .02em; }
.live-section-title span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.live-player-shell { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.live-player-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-watch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 16px 2px 10px; flex-wrap: wrap; }
.live-watch-head h1 { font-size: clamp(19px, 2.4vw, 27px); margin: 0; font-weight: 800; }
.live-watch-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.server-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 18px; }
.server-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #dedee5; border-radius: 999px; padding: 8px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.server-chip:hover { background: rgba(255,255,255,.08); border-color: var(--line-strong); }
.server-chip.active { background: var(--accent-soft); border-color: rgba(255,45,75,.45); color: #ffb3bf; }
.server-chip .st { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.server-chip .st.off { background: #6f6f7a; }
.live-teams { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.live-teams .t { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14px; }
.live-teams img { width: 38px; height: 38px; object-fit: contain; }
.live-teams .at { color: var(--muted-2); font-size: 12px; font-weight: 800; letter-spacing: .1em; }

/* ---------------- downloads / settings / misc ---------------- */
.dl-item { display: flex; gap: 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); align-items: center; }
.dl-item img { width: 54px; height: 78px; border-radius: 8px; object-fit: cover; background: #15151c; flex: none; }
.dl-body { flex: 1; min-width: 0; }
.dl-body .t { font-size: 14px; font-weight: 700; }
.dl-body .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dl-bar { height: 4px; background: rgba(255,255,255,.12); border-radius: 9px; overflow: hidden; margin-top: 8px; }
.dl-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.dl-actions { display: flex; gap: 6px; flex: none; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting .l { font-size: 14px; font-weight: 600; }
.setting .h { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.switch { width: 46px; height: 27px; border-radius: 99px; background: #2a2a34; border: 0; position: relative; cursor: pointer; flex: none; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch.on::after { transform: translateX(19px); }
.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.2); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.empty .ic svg { width: 24px; height: 24px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }
.empty p { margin: 0 auto 18px; max-width: 380px; font-size: 13.5px; line-height: 1.7; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.16); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }
.load-more { display: grid; place-items: center; padding: 28px 0; }

/* toasts + modal */
.toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(18,18,24,.95); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 16px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow); backdrop-filter: blur(14px); animation: toastIn .22s ease;
  max-width: min(92vw, 420px); text-align: center;
}
.toast.err { border-color: rgba(255,80,80,.5); }
.toast.ok { border-color: rgba(61,220,151,.45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(4,4,7,.78); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 20px; animation: fade .16s; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); max-height: 86vh; overflow: auto; }
.modal h3 { margin: 0 0 6px; font-size: 19px; }
.modal p { color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }

/* mobile nav */
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .watch-grid { grid-template-columns: 1fr; }
  .watch-aside { position: static; }
  .aside-list { max-height: 420px; }
  .hero { min-height: min(72vh, 620px); }
  .mobile-back { display: inline-grid; }
  .topbar { gap: 10px; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --topbar: 58px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 15px; }
  .brand .nova-mark { width: 26px; height: 26px; }
  .top-actions .hide-sm { display: none; }
  main { padding-bottom: calc(86px + var(--safe-b)); }
  body.watch-mode main { padding-bottom: calc(10px + var(--safe-b)); }
  .hero { min-height: 74vh; align-items: flex-end; }
  .hero-bg img { object-position: center top; }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 4%, rgba(7,7,9,.35) 52%, rgba(7,7,9,.15) 100%); }
  .hero-inner { padding-bottom: 22px; }
  .hero-title { font-size: clamp(30px, 9vw, 42px); }
  .hero-ov { -webkit-line-clamp: 2; font-size: 13px; }
  .hero-actions .btn { flex: 1; padding: 0 14px; }
  .btn { height: 44px; }
  .row-scroller { gap: 10px; margin: 0 calc(-1 * clamp(16px, 4vw, 44px)); padding-left: clamp(16px, 4vw, 44px); padding-right: clamp(16px, 4vw, 44px); }
  .card { width: 124px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
  .detail-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .detail-poster { width: 104px; }
  .detail-hero { min-height: 56vh; }
  .section-title { margin-top: 26px; }
  .mobile-nav {
    display: block; position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 45;
    background: rgba(14,14,19,.9); border: 1px solid var(--line-strong); border-radius: 22px;
    backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 14px 40px rgba(0,0,0,.5); padding: 6px;
  }
  .mobile-nav-in { display: flex; justify-content: space-between; }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px;
    border-radius: 15px; color: var(--muted); font-size: 10px; font-weight: 700;
  }
  .mobile-nav a svg { width: 21px; height: 21px; }
  .mobile-nav a.active { color: #fff; background: rgba(255,255,255,.09); }
  .mobile-nav a.active svg { color: #ff6b82; }
  body.watch-mode .mobile-nav { display: none; }
  .watch-shell { padding-left: 0; padding-right: 0; padding-top: calc(var(--topbar) + var(--safe-t)); }
  .player-wrap { border-radius: 0; border-left: 0; border-right: 0; }
  .watch-title-row, .watch-tools, .watch-main > .panel { margin-left: 14px; margin-right: 14px; }
  .watch-grid { gap: 14px; }
  .watch-main > .panel, .watch-aside { margin: 0 14px; }
  .watch-title-row { margin-top: 12px; }
  .watch-title-row h1 { font-size: 18px; }
  .p-menu { width: min(88vw, 300px); right: 10px; bottom: 70px; }
  .next-card { width: 236px; right: 10px; bottom: 84px; }
  .next-card img { width: 74px; }
  .floating-back { position: fixed; top: calc(var(--safe-t) + 12px); left: 12px; z-index: 50; }
  .ep-thumb { width: 96px; }
  .controls-row [data-act="back10"], .controls-row [data-act="fwd10"], .controls-row [data-act="pip"] { display: none; }
  .live-grid { grid-template-columns: 1fr; }
  .match-team img { width: 26px; height: 26px; }
  .live-player-shell { border-radius: 0; border-left: 0; border-right: 0; }
  .controls-row .time { padding: 0 2px; font-size: 11px; }
  .controls { padding: 34px 8px 8px; }
  .ctl { width: 36px; height: 36px; }
  .ctl.big { width: 40px; height: 40px; }
  .cast { width: 92px; } .cast .ph { width: 92px; height: 92px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .toasts { bottom: calc(96px + var(--safe-b)); }
  .search-layer { padding-top: calc(var(--topbar) + var(--safe-t) + 6px); }
}

/* landscape phone player */
@media (max-height: 520px) and (orientation: landscape) {
  .watch-shell { padding-top: calc(var(--safe-t) + 6px); }
  .topbar { display: none; }
  .watch-title-row, .watch-tools, .watch-main > .panel, .watch-aside { display: none; }
  .watch-grid { display: block; }
  .player-wrap { border-radius: 0; }
  .player { height: calc(100vh - var(--safe-t)); aspect-ratio: auto; }
}

body.ios .vol-wrap { display: none; }
body.ios .scrub { height: 22px; }

/* accent variants */
body[data-accent="orange"] { --accent: #ff7a18; --accent-2: #ffb347; --accent-soft: rgba(255,122,24,.14); }
body[data-accent="violet"] { --accent: #8b5cf6; --accent-2: #d946ef; --accent-soft: rgba(139,92,246,.16); }
body[data-accent="teal"] { --accent: #14b8a6; --accent-2: #22d3ee; --accent-soft: rgba(20,184,166,.15); }
body[data-accent="rose"] { --accent: #f43f5e; --accent-2: #fb7185; --accent-soft: rgba(244,63,94,.15); }

.hide { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
