:root {
  --bg: #0a0a10;
  --bg-soft: #101018;
  --surface: #171722;
  --surface-hover: #1e1e2b;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f3f8;
  --muted: #a3a1b3;
  --violet: #a78bfa;
  --violet-deep: #6d28d9;
  --amber: #f5b84b;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--violet-deep);
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 16, 0.82);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--amber));
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.45);
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg);
}
.brand__word { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.04em; }
.brand__word span { color: var(--violet); }
.brand--small .brand__word { font-size: 1.1rem; }

.nav { display: flex; gap: 22px; margin-right: auto; }
.nav__link { color: var(--muted); font-size: 0.92rem; transition: color 0.2s ease; }
.nav__link:hover, .nav__link.is-active { color: var(--text); }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 240px;
  color: var(--muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search:focus-within { border-color: rgba(167, 139, 250, 0.6); box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 0.9rem; }
.search input::placeholder { color: #777488; }
.search kbd {
  font-size: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  color: #777488;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: 90px 24px;
  isolation: isolate;
}
.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 70% at 80% 20%, rgba(109, 40, 217, 0.42), transparent 70%),
    radial-gradient(ellipse 45% 60% at 20% 90%, rgba(245, 184, 75, 0.18), transparent 70%),
    linear-gradient(180deg, #10101a, var(--bg));
  transition: background 0.5s ease;
}
.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 5%, rgba(10, 10, 16, 0.65) 55%, transparent);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent);
}
.hero__inner { max-width: 1220px; margin: 0 auto; width: 100%; position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--violet);
}
.hero h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--violet), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__description { max-width: 520px; color: var(--muted); font-size: 1.05rem; margin: 22px 0 0; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tag {
  font-size: 0.78rem;
  color: #d8d6e4;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 5px 12px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
}
.button:hover { transform: translateY(-2px); }
.button--primary { background: linear-gradient(135deg, var(--violet-deep), #8b5cf6); color: #fff; box-shadow: 0 12px 32px rgba(109, 40, 217, 0.35); }
.button--primary:hover { filter: brightness(1.12); }
.button--ghost { background: rgba(255,255,255,0.05); border-color: var(--border); color: var(--text); }
.button--ghost:hover { background: rgba(255,255,255,0.1); }
.hero__card {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%) rotate(6deg);
  width: 250px;
  height: 330px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(160deg, rgba(167,139,250,0.35), rgba(245,184,75,0.12));
  box-shadow: var(--shadow);
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
}
.hero__card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
}
.hero__card-glyph { font-size: 5rem; font-weight: 800; line-height: 1; background: linear-gradient(135deg, #fff, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__card-label { letter-spacing: 0.3em; font-size: 0.7rem; color: #e7e3f5; }

/* Catalogue */
.catalog, .setup { max-width: 1220px; margin: 0 auto; padding: 72px 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head h2, .setup h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.04em; }
.section-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.filter:hover { color: var(--text); border-color: rgba(167,139,250,0.45); }
.filter.is-active { background: var(--violet-deep); border-color: transparent; color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.card {
  appearance: none;
  text-align: left;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: grid;
  place-content: center;
  box-shadow: 0 14px 30px rgba(0,0,0,0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover .card__poster { transform: translateY(-6px) scale(1.02); box-shadow: 0 22px 40px rgba(0,0,0,0.5); }
.card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.72));
}
.card__glyph { font-size: 4rem; font-weight: 800; opacity: 0.85; filter: blur(0.3px); }
.card__play {
  position: absolute;
  z-index: 2;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.92);
  color: #14131b;
  opacity: 0;
  transform: scale(0.75);
  transition: all 0.2s ease;
}
.card:hover .card__play { opacity: 1; transform: scale(1); }
.card__badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(10,10,16,0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
}
.card__body { padding: 12px 2px 0; }
.card__title { margin: 0; font-size: 0.98rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__info { margin: 4px 0 0; font-size: 0.78rem; color: var(--muted); }

.notice {
  border: 1px dashed rgba(167,139,250,0.35);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
}
.notice__icon { display: block; font-size: 2rem; color: var(--violet); margin-bottom: 8px; }
.notice h3 { margin: 0 0 8px; color: var(--text); font-size: 1.2rem; }
.notice p { margin: 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.88em; background: rgba(167,139,250,0.12); color: #ddd5ff; padding: 2px 6px; border-radius: 5px; }

/* Setup */
.setup { border-top: 1px solid var(--border); }
.setup__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step__number { font-size: 0.75rem; font-weight: 800; color: var(--amber); letter-spacing: 0.12em; }
.step h3 { margin: 12px 0 8px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.setup__legal { margin: 24px 0 0; color: #85829a; font-size: 0.85rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner { max-width: 1220px; margin: 0 auto; padding: 28px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.footer-inner a { color: var(--violet); }

/* Player */
.player {
  width: min(1000px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-soft);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: auto;
}
.player::backdrop { background: rgba(4,4,8,0.82); backdrop-filter: blur(6px); }
.player__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px 12px; }
.player__bar .eyebrow { margin-bottom: 2px; }
.player__bar h3 { margin: 0; font-size: 1.1rem; }
.icon-button {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-button:hover { background: var(--surface-hover); }
.player video { display: block; width: 100%; max-height: 62vh; background: #000; }
.player__message { margin: 0; padding: 14px 22px; color: var(--amber); background: rgba(245,184,75,0.08); border-top: 1px solid var(--border); font-size: 0.9rem; }
.player__hint { margin: 0; padding: 12px 22px 18px; color: var(--muted); font-size: 0.82rem; }

@media (max-width: 860px) {
  .hero__card { display: none; }
  .nav { display: none; }
  .header-inner { gap: 14px; }
  .search { min-width: 0; flex: 1; }
  .search kbd { display: none; }
  .hero { min-height: 480px; padding: 60px 20px; }
  .catalog, .setup { padding: 56px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
