@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #090a0f;
  --surface: #11121a;
  --muted: #9293a3;
  --text: #f7f6fb;
  --pink: #ff3158;
  --violet: #9c67ff;
  --line: rgba(255,255,255,.09);
  font-family: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}
.splash-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  background: #090a0f;
  opacity: 1;
  transition: opacity .45s ease, visibility .45s ease;
}
.splash-screen.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.splash-content { display: flex; align-items: center; flex-direction: column; }
.splash-logo { width: 52px; height: 52px; filter: drop-shadow(0 0 18px rgba(194,74,255,.3)); }
.splash-brand { margin-top: 12px; color: #fff; font: 700 30px/1 'Space Grotesk', sans-serif; letter-spacing: -1.6px; }
.splash-brand span { color: var(--pink); text-shadow: 0 0 18px rgba(255,49,88,.58); }
.splash-spinner {
  width: 30px;
  height: 30px;
  margin-top: 32px;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: splash-spin .8s linear infinite;
}
.splash-content p { margin: 15px 0 0; color: #9293a3; font-size: 12px; }
@keyframes splash-spin { to { transform: rotate(360deg); } }
button, input, select { font: inherit; }
button { color: inherit; }
.ambient {
  position: fixed;
  z-index: -1;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(115px);
  opacity: .14;
  pointer-events: none;
  animation: ambient-drift 24s ease-in-out infinite alternate;
}
.ambient-one { top: -24rem; left: 16%; background: #763cff; }
.ambient-two { top: 37rem; right: -25rem; background: #ff3158; animation-delay: -9s; }
@keyframes ambient-drift {
  0% { transform: translate3d(-4%, 0, 0) scale(.9); }
  100% { transform: translate3d(9%, 8%, 0) scale(1.14); }
}
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  height: 82px;
  align-items: center;
  gap: 48px;
  padding: 0 clamp(24px, 6.4vw, 104px);
  border-bottom: 1px solid rgba(255,255,255,.035);
  background: rgba(9,10,15,.72);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #fff;
  font: 700 27px/1 'Space Grotesk', sans-serif;
  letter-spacing: -1.6px;
  text-decoration: none;
}
.brand-mark { width: 37px; height: 37px; flex: 0 0 auto; filter: drop-shadow(0 0 13px rgba(194,74,255,.22)); }
.brand-word { color: #fff; }
.brand-word > span { color: var(--pink); text-shadow: 0 0 18px rgba(255,49,88,.58); }
.main-nav { display: flex; align-items: center; gap: 30px; }
.nav-link {
  position: relative;
  padding: 9px 0;
  border: 0;
  color: #a7a7b3;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  transition: color .2s ease;
}
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  position: absolute;
  right: 0;
  bottom: -19px;
  left: 0;
  height: 2px;
  border-radius: 3px;
  background: var(--pink);
  box-shadow: 0 0 12px rgba(255,49,88,.8);
  content: '';
}
.search-form {
  display: flex;
  width: min(250px, 28vw);
  height: 39px;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  transition: border-color .2s, background .2s;
}
.search-form:focus-within { border-color: rgba(166,115,255,.75); background: rgba(255,255,255,.055); }
.search-form svg { width: 17px; fill: none; stroke: #9293a3; stroke-width: 1.7; flex: 0 0 auto; }
.search-form input { width: 100%; min-width: 0; border: 0; outline: 0; color: #fff; background: transparent; font-size: 12px; }
.search-form input::placeholder { color: #81818e; }
.clear-search { padding: 0; border: 0; color: #aaa; background: transparent; cursor: pointer; font-size: 19px; }
main { width: min(1320px, calc(100% - 2 * clamp(24px, 6.4vw, 104px))); margin: 0 auto; }
.hero {
  position: relative;
  display: flex;
  min-height: 440px;
  align-items: center;
  overflow: hidden;
  margin-top: 30px;
  padding: 54px 7%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  isolation: isolate;
  background: linear-gradient(110deg, #17111e 0%, #17121e 47%, #14101c 100%);
  box-shadow: 0 20px 70px rgba(0,0,0,.24);
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 74% 50%, rgba(128,49,183,.22), transparent 38%), linear-gradient(90deg, rgba(10,9,15,.25), transparent 65%);
  content: '';
}
.hero-copy { position: relative; z-index: 2; width: min(510px, 57%); }
.eyebrow {
  margin: 0 0 15px;
  color: #b6a4ce;
  font: 600 10px/1.5 'Space Grotesk', sans-serif;
  letter-spacing: 2px;
}
.live-dot { display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.hero h1 {
  margin: 0;
  font: 600 clamp(42px, 5.3vw, 72px)/.99 'Space Grotesk', sans-serif;
  letter-spacing: -4px;
}
.hero h1 span { color: #d3a9ff; text-shadow: 0 0 35px rgba(163,91,255,.34); }
.hero-description { max-width: 370px; margin: 18px 0 25px; color: #aaa6b5; font-size: 14px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 18px; }
.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: linear-gradient(105deg, #ff3158, #e84391); box-shadow: 0 7px 22px rgba(255,49,88,.23); }
.button-primary:hover { box-shadow: 0 9px 28px rgba(255,49,88,.39); }
.button svg { width: 15px; fill: currentColor; }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.06); }
.hero-caption { color: #787483; font: 600 8px 'Space Grotesk', sans-serif; letter-spacing: 1.3px; }
.hero-art { position: absolute; z-index: 1; top: -15%; right: 2%; width: 51%; height: 130%; overflow: hidden; opacity: .9; }
.hero-art::before, .hero-art::after { position: absolute; top: 50%; left: 53%; border: 1px solid rgba(213,169,255,.15); border-radius: 50%; content: ''; transform: translate(-50%,-50%) rotate(-24deg); }
.hero-art::before { width: 90%; height: 59%; box-shadow: 0 0 55px rgba(165,87,255,.08), inset 0 0 50px rgba(165,87,255,.04); }
.hero-art::after { width: 68%; height: 43%; border-color: rgba(255,90,145,.2); transform: translate(-50%,-50%) rotate(27deg); }
.hero-glow { position: absolute; top: 50%; left: 52%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,49,88,.32), rgba(122,50,201,.24) 35%, transparent 69%); filter: blur(20px); transform: translate(-50%,-50%); animation: glow-pulse 7s ease-in-out infinite alternate; }
@keyframes glow-pulse { from { opacity: .56; transform: translate(-50%,-50%) scale(.91); } to { opacity: 1; transform: translate(-50%,-50%) scale(1.08); } }
.hero-sigil { position: absolute; top: 50%; left: 52%; color: rgba(255,255,255,.13); font: 700 clamp(80px, 13vw, 180px)/1 'Space Grotesk', sans-serif; letter-spacing: -18px; text-shadow: 0 0 70px rgba(205,145,255,.3); transform: translate(-55%,-52%) rotate(-8deg); }
.hero-sigil span { color: rgba(255,76,120,.2); }
.hero-index { position: absolute; right: 30px; bottom: 25px; display: flex; align-items: center; gap: 9px; color: #77727f; font: 10px 'Space Grotesk', sans-serif; }
.hero-index span { color: #f2eaf8; }
.hero-index i { width: 28px; height: 1px; background: #ff4774; }
.catalogue-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 62px 0 23px; }
.catalogue-heading .eyebrow { margin-bottom: 8px; color: #a783cf; }
.catalogue-heading h2 { margin: 0; font: 600 clamp(21px, 2.4vw, 29px)/1.2 'Space Grotesk', sans-serif; letter-spacing: -.8px; }
.catalogue-heading h2 span { color: var(--pink); }
.catalogue-count { padding-bottom: 5px; color: #777785; font: 600 9px 'Space Grotesk', sans-serif; letter-spacing: 1.3px; }
.notice { margin: 0 0 24px; padding: 12px 15px; border: 1px solid rgba(172,121,255,.19); border-radius: 8px; color: #c3b9d1; background: rgba(131,81,181,.09); font-size: 12px; line-height: 1.6; }
.notice[hidden], [hidden] { display: none !important; }
.catalogue { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 29px 18px; padding-bottom: 70px; }
.media-card { min-width: 0; animation: card-in .42s both; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.64 / 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  cursor: pointer;
  background: var(--card-bg, linear-gradient(135deg,#242039,#422339));
  isolation: isolate;
  text-align: left;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s, box-shadow .28s;
}
.poster::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgba(8,8,13,.83), transparent 75%), radial-gradient(ellipse at 72% 20%, rgba(255,255,255,.16), transparent 42%); content: ''; transition: opacity .3s; }
.poster::after { position: absolute; z-index: -1; top: 12%; right: 7%; width: 42%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 35px rgba(255,255,255,.06); content: ''; }
.poster:hover, .poster:focus-visible { z-index: 2; border-color: rgba(217,150,255,.65); box-shadow: 0 12px 30px rgba(127,53,183,.24), 0 0 20px rgba(255,49,88,.12); transform: scale(1.035); }
.poster:hover::before { opacity: .82; }
.poster-wordmark { position: absolute; top: 16%; left: 9%; max-width: 72%; color: rgba(255,255,255,.87); font: 700 clamp(14px, 2vw, 25px)/.95 'Space Grotesk', sans-serif; letter-spacing: -1.2px; text-shadow: 0 2px 15px rgba(0,0,0,.5); }
.poster-play { position: absolute; top: 50%; left: 50%; display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid rgba(255,255,255,.56); border-radius: 50%; background: rgba(12,10,17,.4); opacity: 0; transform: translate(-50%,-35%) scale(.8); transition: opacity .2s, transform .2s; backdrop-filter: blur(10px); }
.poster-play svg { width: 13px; margin-left: 2px; fill: white; }
.poster:hover .poster-play, .poster:focus-visible .poster-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.card-title { overflow: hidden; color: #ecebf2; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.card-year { flex: 0 0 auto; color: #888895; font-size: 10px; }
.card-subtitle { overflow: hidden; margin-top: 4px; color: #8d8c99; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.episode-controls { display: flex; align-items: center; gap: 8px; }
.episode-controls input { width: 58px; }
.footer { display: flex; min-height: 75px; align-items: center; justify-content: space-between; gap: 16px; padding: 15px clamp(24px, 6.4vw, 104px); border-top: 1px solid var(--line); color: #777681; }
.brand-small { font-size: 19px; }
.brand-small .brand-mark { width: 30px; height: 30px; }
.footer p { margin: 0; font-size: 11px; }
.footer > span { font: 600 8px 'Space Grotesk', sans-serif; letter-spacing: 1.1px; }
.skeleton { aspect-ratio: 1.64/1; border-radius: 9px; background: linear-gradient(100deg,#181820 20%,#24232e 40%,#181820 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { grid-column: 1/-1; padding: 35px 20px; border: 1px dashed var(--line); border-radius: 9px; color: #aaa8b5; font-size: 13px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

.player-topbar { justify-content: space-between; }
.back-button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #e6e3ec;
  background: rgba(255,255,255,.035);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.back-button:hover { border-color: rgba(198,133,255,.5); background: rgba(255,255,255,.08); }
.back-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.watch-page { width: min(1320px, calc(100% - 2 * clamp(24px, 6.4vw, 104px))); margin: 0 auto; padding: 46px 0 62px; }
.watch-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.watch-heading .eyebrow { margin-bottom: 8px; }
.watch-heading h1 { margin: 0; font: 600 clamp(25px, 3.2vw, 39px)/1.12 'Space Grotesk', sans-serif; letter-spacing: -1.2px; }
.watch-subtitle { margin: 8px 0 0; color: #9997a5; font-size: 12px; }
.source-status { display: flex; align-items: center; gap: 9px; padding-bottom: 5px; color: #b5a1cb; font-size: 11px; }
.status-indicator { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #c39bff; box-shadow: 0 0 12px rgba(186,134,255,.75); animation: status-pulse 1.5s ease-in-out infinite; }
.source-status.is-error .status-indicator { background: var(--pink); box-shadow: 0 0 12px rgba(255,49,88,.7); animation: none; }
@keyframes status-pulse { 50% { opacity: .35; } }
.cinema-frame { position: relative; width: 100%; aspect-ratio: 16/9; min-height: 280px; max-height: min(72vh, 760px); overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: #030306; box-shadow: 0 25px 90px rgba(0,0,0,.5), 0 0 70px rgba(112,53,153,.08); }
.cinema-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #030306; }
.cinema-empty { position: absolute; z-index: 1; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 20px; background: radial-gradient(ellipse at 50% 46%, rgba(114,59,157,.19), rgba(11,10,16,.91) 67%); text-align: center; }
.cinema-empty[hidden], .episode-controls[hidden] { display: none; }
.cinema-mark { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 17px; border: 1px solid rgba(206,160,255,.33); border-radius: 17px; background: rgba(158,91,216,.12); box-shadow: 0 0 34px rgba(165,88,255,.18); }
.cinema-mark svg { width: 25px; fill: #e7c9ff; }
.cinema-title { margin: 0; color: #f3edf9; font: 600 17px 'Space Grotesk', sans-serif; }
.cinema-description { max-width: 440px; margin: 9px 0 0; color: #a9a4b1; font-size: 12px; line-height: 1.6; }
.cinema-empty.is-error .cinema-mark { border-color: rgba(255,49,88,.4); background: rgba(255,49,88,.1); }
.loader-bars { display: flex; height: 20px; align-items: center; gap: 4px; margin-top: 18px; }
.loader-bars i { width: 3px; height: 7px; border-radius: 3px; background: #c698ff; animation: sound-bars .7s ease-in-out infinite alternate; }
.loader-bars i:nth-child(2), .loader-bars i:nth-child(4) { animation-delay: .18s; }
.loader-bars i:nth-child(3) { animation-delay: .36s; }
.loader-bars i:nth-child(5) { animation-delay: .52s; }
@keyframes sound-bars { to { height: 18px; opacity: .45; } }
.watch-toolbar { display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.source-note { display: flex; min-width: 0; flex: 1 1 180px; align-items: center; gap: 8px; color: #9995a4; font-size: 11px; }
.source-note > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-controls { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.source-controls { display: flex; align-items: center; gap: 8px; color: #aaa6b4; font-size: 11px; }
.source-controls select { min-width: 120px; max-width: min(250px, 31vw); height: 34px; padding: 0 30px 0 9px; border: 1px solid var(--line); border-radius: 6px; color: #eee; background: #171620; font-size: 11px; }
.source-controls select:disabled { color: #777481; opacity: .7; }
.source-controls select:focus-visible { outline: 2px solid rgba(198,133,255,.65); outline-offset: 2px; }
.episode-controls select { max-width: min(250px, 31vw); height: 34px; padding: 0 30px 0 9px; border: 1px solid var(--line); border-radius: 6px; color: #eee; background: #171620; font-size: 11px; }
.episode-controls select:disabled { color: #777481; opacity: .7; }
.episode-controls select:focus-visible { outline: 2px solid rgba(198,133,255,.65); outline-offset: 2px; }
.episode-controls .button { min-height: 34px; }
.episode-controls .button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.player-help { margin: 16px 0 0; color: #8d8897; font-size: 11px; line-height: 1.6; }
.watch-footer { margin-top: auto; }
body[data-page="player"] { display: flex; min-height: 100vh; flex-direction: column; }
body[data-page="player"] .footer { margin-top: auto; }

@media (max-width: 760px) {
  .topbar { height: 70px; gap: 22px; padding: 0 22px; }
  .main-nav { gap: 17px; }
  .nav-link { font-size: 12px; }
  .nav-link.is-active::after { bottom: -14px; }
  .search-form { width: 39px; justify-content: center; padding: 0; border-color: transparent; background: transparent; }
  .search-form:focus-within { position: absolute; right: 22px; left: 22px; width: auto; justify-content: start; padding: 0 12px; border-color: rgba(166,115,255,.75); background: #11121a; }
  .search-form input { width: 0; opacity: 0; }
  .search-form:focus-within input { width: 100%; opacity: 1; }
  .search-form .clear-search { display: none; }
  main { width: calc(100% - 40px); }
  .hero { min-height: 390px; margin-top: 20px; padding: 42px 7%; }
  .hero-art { right: -12%; width: 65%; opacity: .55; }
  .hero-copy { width: 78%; }
  .hero h1 { letter-spacing: -2.7px; }
  .catalogue-heading { margin-top: 46px; }
  .catalogue { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 23px 13px; }
  .catalogue-count { display: none; }
  .footer { padding: 16px 22px; }
  .footer > span { display: none; }
}
@media (max-width: 480px) {
  .topbar { gap: 18px; padding: 0 17px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 33px; height: 33px; }
  .main-nav { gap: 13px; }
  .nav-link { font-size: 11px; }
  .search-form:focus-within { right: 17px; left: 17px; }
  main { width: calc(100% - 34px); }
  .hero { min-height: 365px; padding: 34px 22px; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: 47px; }
  .hero-description { max-width: 280px; font-size: 12px; }
  .hero-art { top: -8%; right: -35%; width: 90%; opacity: .38; }
  .hero-caption { display: none; }
  .hero-index { right: 17px; bottom: 16px; }
  .catalogue-heading h2 { font-size: 21px; }
  .catalogue { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 21px 12px; }
  .poster-wordmark { font-size: 20px; }
  .watch-page { width: calc(100% - 34px); padding: 34px 0 44px; }
  .watch-heading { align-items: start; flex-direction: column; gap: 13px; }
  .cinema-frame { min-height: 220px; border-radius: 9px; }
  .watch-toolbar { align-items: stretch; flex-direction: column; gap: 13px; padding: 15px 0; }
  .source-note { flex: 0 1 auto; }
  .player-controls { justify-content: flex-start; gap: 12px 18px; }
  .source-controls { flex: 0 1 auto; }
  .source-controls select, .episode-controls select { max-width: min(250px, 52vw); }
  .episode-controls { width: 100%; flex-wrap: wrap; gap: 8px; }
  .episode-controls .button { margin-left: 0; }
  .back-button { min-height: 36px; padding: 0 9px; font-size: 11px; }
  .footer { gap: 10px; }
  .footer p { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
