/* ==========================================================================
   MirrorCast design system
   ========================================================================== */

:root {
  --bg: #06080f;
  --bg-soft: #0a0e19;
  --surface: rgba(17, 23, 39, 0.72);
  --surface-solid: #101728;
  --surface-2: #151f35;
  --line: rgba(148, 170, 220, 0.14);
  --line-strong: rgba(148, 170, 220, 0.26);
  --text: #eef3ff;
  --text-2: #c3cee6;
  --muted: #8d9ab8;
  --dim: #7d8aa9;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --brand-3: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --grad: linear-gradient(120deg, #8b5cf6 0%, #6366f1 42%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.1));
  --radius-xxl: 30px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  --shadow-glow: 0 18px 50px -18px rgba(94, 92, 255, 0.7);
  --font: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --nav-h: 72px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(900px 520px at 10% -8%, rgba(124, 92, 255, 0.16), transparent 62%),
    radial-gradient(820px 520px at 98% 4%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(700px 500px at 50% 108%, rgba(124, 92, 255, 0.08), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(148, 170, 220, 0.18) 0.7px, transparent 0.7px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
}

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

svg {
  flex: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: rgba(124, 92, 255, 0.42);
  color: #fff;
}

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

[hidden] {
  display: none !important;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s;
}

.skip:focus {
  transform: none;
}

/* --------------------------------------------------------------------------
   Ambient orbs
   -------------------------------------------------------------------------- */

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-orbs i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}

.bg-orbs i:nth-child(1) {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(124, 92, 255, 0.35);
}

.bg-orbs i:nth-child(2) {
  width: 360px;
  height: 360px;
  top: 18%;
  right: -140px;
  background: rgba(34, 211, 238, 0.22);
  animation-delay: -6s;
}

.bg-orbs i:nth-child(3) {
  width: 300px;
  height: 300px;
  bottom: -120px;
  left: 36%;
  background: rgba(99, 102, 241, 0.2);
  animation-delay: -11s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(30px, 40px, 0) scale(1.12);
  }
}

/* --------------------------------------------------------------------------
   Buttons, pills, brand
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s, filter 0.18s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  border: 0;
  background: var(--grad);
  background-size: 150% 150%;
  color: #06101d;
  font-weight: 800;
  box-shadow: var(--shadow-glow);
}

.btn.primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  background-position: 100% 50%;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  color: #ffd9df;
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(80, 20, 35, 0.42);
}

.btn.danger:hover {
  background: rgba(120, 28, 48, 0.55);
  border-color: rgba(251, 113, 133, 0.55);
}

.btn.lg {
  height: 54px;
  padding: 0 25px;
  border-radius: 15px;
  font-size: 15.5px;
}

.btn.lg svg {
  width: 20px;
  height: 20px;
}

.btn.sm {
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13px;
}

.btn.sm svg {
  width: 15px;
  height: 15px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: 0.18s;
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.9);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  color: #06101d;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}

.brand-name span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand.sm .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand.sm .brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand.sm .brand-name {
  font-size: 16.5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.2s, box-shadow 0.2s;
}

.pill.on {
  color: #c8f7e4;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
}

.pill.on .dot {
  background: var(--ok);
  box-shadow: 0 0 9px var(--ok);
}

.pill.warn {
  color: #ffe9b3;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
}

.pill.warn .dot {
  background: var(--warn);
  box-shadow: 0 0 9px var(--warn);
}

.pill.off {
  color: #ffd4dc;
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.08);
}

.pill.off .dot {
  background: var(--danger);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: pulse 2.2s ease-in-out infinite;
}

.eyebrow.small {
  padding: 4px 10px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* --------------------------------------------------------------------------
   Marketing nav
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 26px;
  height: var(--nav-h);
  padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(6, 8, 15, 0.6);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: background 0.25s, border-color 0.25s;
}

.nav.scrolled {
  background: rgba(6, 8, 15, 0.9);
  border-bottom-color: var(--line);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: 0.18s;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Home: hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(30px, 4vw, 56px);
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 104px) clamp(18px, 4vw, 48px) clamp(36px, 5vw, 68px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(44px, 5.8vw, 78px);
  line-height: 0.97;
  letter-spacing: -0.05em;
}

.hero h1 em {
  position: relative;
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lead {
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(15.5px, 1.35vw, 18.5px);
  line-height: 1.68;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 500;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta svg {
  width: 15px;
  height: 15px;
  color: var(--brand-2);
}

/* hero device art */

.hero-art {
  position: relative;
  height: clamp(380px, 42vw, 540px);
  display: grid;
  place-items: center;
  perspective: 1300px;
}

.orbit {
  position: absolute;
  inset: 4%;
  border: 1px dashed rgba(148, 170, 220, 0.16);
  border-radius: 50%;
  animation: spin 46s linear infinite;
}

.orbit.o2 {
  inset: 15%;
  border-color: rgba(34, 211, 238, 0.16);
  animation-direction: reverse;
  animation-duration: 62s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tv {
  position: relative;
  z-index: 2;
  width: min(100%, 490px);
  aspect-ratio: 16 / 10;
  padding: 9px;
  border-radius: 22px;
  background: linear-gradient(155deg, #253253, #0b1222 62%);
  border: 1px solid rgba(148, 170, 220, 0.28);
  box-shadow:
    0 60px 110px -46px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: rotateY(-9deg) rotateX(5deg) rotateZ(-1deg);
}

.tv::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.1), transparent 36%);
  pointer-events: none;
}

.tv-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #05080f;
}

.phone {
  position: absolute;
  z-index: 3;
  right: 2%;
  bottom: -4%;
  width: clamp(120px, 12vw, 170px);
  aspect-ratio: 9 / 18.5;
  padding: 7px;
  border-radius: 26px;
  background: linear-gradient(160deg, #232f4d, #080d18);
  border: 1px solid rgba(148, 170, 220, 0.32);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.95);
  transform: rotate(7deg);
}

.phone::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  z-index: 2;
  width: 34%;
  height: 5px;
  border-radius: 99px;
  background: #05080f;
  transform: translateX(-50%);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #05080f;
}

.mirror-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #101a33, #090e1b 70%);
}

.mirror-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(124, 92, 255, 0.42), transparent 46%),
    radial-gradient(circle at 86% 82%, rgba(34, 211, 238, 0.3), transparent 48%);
}

.ms-window {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6%;
  width: 78%;
  height: 68%;
  padding: 7%;
  border-radius: 12px;
  background: rgba(9, 14, 27, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 44px -22px #000;
  backdrop-filter: blur(4px);
}

.ms-dots {
  display: flex;
  gap: 4px;
}

.ms-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.ms-dots i:first-child {
  background: #fb7185;
}

.ms-dots i:nth-child(2) {
  background: #fbbf24;
}

.ms-dots i:nth-child(3) {
  background: #34d399;
}

.ms-line {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
}

.ms-line.w70 {
  width: 70%;
}

.ms-line.w44 {
  width: 44%;
}

.ms-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40%;
  margin-top: auto;
}

.ms-chart i {
  flex: 1;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #22d3ee, #7c5cff);
  opacity: 0.9;
}

.ms-chart i:nth-child(1) {
  height: 42%;
}
.ms-chart i:nth-child(2) {
  height: 68%;
}
.ms-chart i:nth-child(3) {
  height: 54%;
}
.ms-chart i:nth-child(4) {
  height: 86%;
}
.ms-chart i:nth-child(5) {
  height: 62%;
}
.ms-chart i:nth-child(6) {
  height: 96%;
}

.phone .ms-window {
  gap: 7%;
  border-radius: 7px;
}

.phone .ms-line {
  height: 3px;
}

.phone .ms-dots i {
  width: 3px;
  height: 3px;
}

.float {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(12, 18, 32, 0.86);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 44px -22px #000;
  backdrop-filter: blur(12px);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  animation: floaty 6.5s ease-in-out infinite;
}

.float svg {
  width: 14px;
  height: 14px;
}

.float.f1 {
  top: 6%;
  left: -2%;
}

.float.f2 {
  bottom: 10%;
  left: 1%;
  animation-delay: -2.2s;
}

.float.f3 {
  top: 14%;
  right: -2%;
  animation-delay: -4.4s;
}

.float .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
  animation: pulse 1.6s infinite;
}

.float .spark {
  color: var(--brand-2);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* --------------------------------------------------------------------------
   Home: sections
   -------------------------------------------------------------------------- */

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(46px, 6.5vw, 92px) clamp(18px, 4vw, 48px);
}

.section.tight {
  padding-top: 0;
}

.section-head {
  max-width: 700px;
  margin: 0 auto clamp(28px, 4vw, 52px);
  text-align: center;
}

.section-head h2 {
  margin: 14px 0;
  font-size: clamp(30px, 3.5vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  overflow: hidden;
  padding: 30px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  backdrop-filter: blur(12px);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: -14px;
  right: 10px;
  color: rgba(148, 170, 220, 0.1);
  font-family: var(--mono);
  font-size: 84px;
  font-weight: 800;
  line-height: 1;
}

.step-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--brand-3);
}

.step-icon svg {
  width: 22px;
  height: 22px;
}

.step h3 {
  position: relative;
  margin: 20px 0 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.step p {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.06), rgba(124, 92, 255, 0.04));
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, 0.26);
  color: var(--brand-3);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature h3 {
  margin: 17px 0 7px;
  font-size: 16.5px;
  letter-spacing: -0.02em;
}

.feature p {
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.62;
}

.faq {
  max-width: 840px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 0 20px;
  transition: border-color 0.2s, background 0.2s;
}

.faq-item:hover {
  border-color: var(--line-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  width: 17px;
  height: 17px;
  color: var(--dim);
  transition: transform 0.22s, color 0.22s;
}

.faq-item[open] summary {
  color: #fff;
}

.faq-item[open] summary svg {
  color: var(--brand-2);
  transform: rotate(45deg);
}

.faq-a {
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}

.faq-a code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
}

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5.5vw, 68px) clamp(22px, 4vw, 56px);
  border-radius: var(--radius-xxl);
  border: 1px solid rgba(148, 170, 220, 0.2);
  background:
    radial-gradient(520px 300px at 12% 0%, rgba(124, 92, 255, 0.28), transparent 62%),
    radial-gradient(520px 320px at 92% 100%, rgba(34, 211, 238, 0.2), transparent 60%),
    linear-gradient(160deg, rgba(20, 27, 48, 0.9), rgba(9, 13, 24, 0.94));
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.04em;
}

.cta-band p {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

.cta-band .hero-cta {
  justify-content: center;
}

.cta-note {
  margin-top: 16px;
  color: var(--dim);
  font-size: 12px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 48px) 40px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12.5px;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   Modal + toasts
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 11, 0.72);
  backdrop-filter: blur(10px);
  animation: fade-in 0.18s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 34px 32px 30px;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(170deg, #141c30, #0a1020 72%);
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, 0.95);
  animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--brand-3);
}

.modal-icon svg {
  width: 24px;
  height: 24px;
}

.modal-card h2 {
  margin-bottom: 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.modal-card > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.code-input {
  width: 100%;
  height: 64px;
  padding: 0 0 0 0.36em;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 700;
  letter-spacing: 0.36em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.code-input::placeholder {
  color: rgba(148, 170, 220, 0.42);
}

.code-input:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.15);
}

.modal .hint {
  margin-top: 14px;
  color: var(--dim);
  font-size: 12px;
  text-align: center;
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(430px, calc(100vw - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 23, 40, 0.96);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9);
  color: var(--text-2);
  font-size: 13.2px;
  font-weight: 500;
  animation: toast-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.toast svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.toast.ok {
  border-color: rgba(52, 211, 153, 0.4);
}

.toast.ok svg {
  color: var(--ok);
}

.toast.err {
  border-color: rgba(251, 113, 133, 0.42);
}

.toast.err svg {
  color: var(--danger);
}

.toast.info svg {
  color: var(--brand-2);
}

.toast.out {
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* --------------------------------------------------------------------------
   App shell
   -------------------------------------------------------------------------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 clamp(14px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.86);
  backdrop-filter: blur(16px);
}

.appbar-mid {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

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

.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.room-chip b {
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
}

.viewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.viewer-chip svg {
  width: 14px;
  height: 14px;
}

.viewer-chip b {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Cast console
   -------------------------------------------------------------------------- */

.cast-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  align-items: start;
  gap: clamp(14px, 2vw, 22px);
  max-width: 1520px;
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 28px);
}

.stage-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.stage-head .eyebrow {
  margin-bottom: 7px;
}

.stage-head h1 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.stage-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.12);
  color: #ffd9e0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.badge-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 9px var(--danger);
  animation: pulse 1.4s infinite;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 92, 255, 0.08), transparent 70%),
    #04070e;
  overflow: hidden;
}

.stage video#preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.stage-empty,
.stage-unsupported {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 480px;
  padding: 28px;
  text-align: center;
}

.empty-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-bottom: 6px;
  border-radius: 26px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--brand-3);
  box-shadow: 0 22px 46px -24px rgba(124, 92, 255, 0.9);
}

.empty-art::before,
.empty-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, 0.22);
  animation: ripple 3.4s ease-out infinite;
}

.empty-art::before {
  inset: -16px;
}

.empty-art::after {
  inset: -34px;
  animation-delay: 1.1s;
  border-color: rgba(34, 211, 238, 0.18);
}

.empty-art svg {
  width: 38px;
  height: 38px;
}

.stage-empty h2,
.stage-unsupported h2 {
  margin: 18px 0 7px;
  font-size: clamp(20px, 2.3vw, 26px);
  letter-spacing: -0.03em;
}

.stage-empty p,
.stage-unsupported p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.stage-empty .tiny {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 11.5px;
}

.stage-unsupported .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.stage-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 14px 14px;
  background: linear-gradient(0deg, rgba(3, 6, 12, 0.88), transparent);
}

.ctl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 16, 30, 0.76);
  color: #dbe4f8;
  font-size: 12.3px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: 0.16s;
}

.ctl svg {
  width: 16px;
  height: 16px;
}

.ctl:hover {
  background: rgba(24, 34, 58, 0.94);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
}

.ctl.danger {
  color: #ffd6dd;
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(80, 20, 35, 0.6);
}

.ctl.danger:hover {
  background: rgba(120, 28, 48, 0.8);
}

.stage-stats {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 74%;
}

.stage-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 10, 18, 0.74);
  color: var(--dim);
  font-size: 10.5px;
  backdrop-filter: blur(8px);
}

.stage-stats b {
  color: #fff;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.stage-foot {
  padding: 15px 20px;
  border-top: 1px solid var(--line);
}

.quality {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.quality label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.3px;
  font-weight: 500;
}

.quality select {
  height: 34px;
  padding: 0 30px 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background-color: #0d1525;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d9ab8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--text-2);
  font-size: 12.5px;
  appearance: none;
  cursor: pointer;
}

.quality select:hover {
  border-color: rgba(148, 170, 220, 0.4);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12.3px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: relative;
  width: 36px;
  height: 21px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  appearance: none;
  cursor: pointer;
  transition: background 0.18s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s;
}

.switch input:checked {
  background: var(--brand);
}

.switch input:checked::after {
  transform: translateX(15px);
}

.stage-foot .hint {
  margin-top: 11px;
  color: var(--dim);
  font-size: 11.5px;
}

/* side panels */

.cast-side {
  position: sticky;
  top: 80px;
  display: grid;
  gap: 14px;
}

.panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-head h2 {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-head .count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.28);
  color: var(--brand-3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
}

.qr-wrap {
  display: grid;
  place-items: center;
  min-height: 182px;
  margin-bottom: 13px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.8);
}

.qr {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 188px;
  aspect-ratio: 1;
}

.qr svg {
  width: 100%;
  height: 100%;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 188px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #f1f4fb;
  color: #8d9ab8;
  font-size: 12px;
  text-align: center;
}

.code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: rgba(0, 0, 0, 0.26);
  color: #fff;
  font-family: var(--mono);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.24em;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.code-display:hover {
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.06);
}

.code-display svg {
  width: 17px;
  height: 17px;
  color: var(--dim);
}

.link-row {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.link-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

.link-row .icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
}

.link-row .icon-btn svg {
  width: 16px;
  height: 16px;
}

.panel .hint {
  margin-top: 10px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.55;
}

.viewer-list {
  display: grid;
  gap: 5px;
  max-height: 250px;
  overflow: auto;
}

.viewer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.022);
  animation: fade-in 0.2s;
}

.viewer .ava {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, 0.26);
  color: var(--brand-3);
  flex: none;
}

.viewer .ava svg {
  width: 15px;
  height: 15px;
}

.viewer .who {
  flex: 1;
  min-width: 0;
}

.viewer .who b {
  display: block;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.viewer .who span {
  display: block;
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.viewer .status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  flex: none;
}

.viewer .status.live {
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.viewer .status.lost {
  background: var(--danger);
}

.viewer .kick {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--dim);
  opacity: 0;
  transition: 0.15s;
}

.viewer:hover .kick,
.viewer .kick:focus-visible {
  opacity: 1;
}

.viewer .kick:hover {
  color: var(--danger);
  background: rgba(251, 113, 133, 0.12);
}

.viewer .kick svg {
  width: 13px;
  height: 13px;
}

.viewer-list .empty {
  padding: 14px 10px;
  color: var(--dim);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.55;
}

.tips ul {
  display: grid;
  gap: 10px;
}

.tips li {
  position: relative;
  padding-left: 19px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.tips li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--grad);
}

/* --------------------------------------------------------------------------
   Watch receiver
   -------------------------------------------------------------------------- */

.page-watch {
  background: #02040a;
  overscroll-behavior: none;
}

.watch-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.watch-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  padding: 0 clamp(12px, 2.5vw, 24px);
  background: linear-gradient(180deg, rgba(3, 5, 10, 0.92), rgba(3, 5, 10, 0.2) 78%, transparent);
  transition: opacity 0.3s, transform 0.3s;
}

body.viewing.idle .watch-bar {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.watch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

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

.watch-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.watch-join,
.watch-waiting,
.watch-ended {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 100px 22px 48px;
  text-align: center;
}

.join-card {
  width: min(470px, 100%);
}

.join-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 28px;
  background: var(--grad);
  box-shadow: 0 30px 70px -28px rgba(124, 92, 255, 0.9);
}

.join-art svg {
  width: 46px;
  height: 46px;
  color: #06101d;
}

.join-art::before,
.join-art::after {
  content: "";
  position: absolute;
  border-radius: 34px;
  border: 1px solid rgba(124, 92, 255, 0.26);
  animation: ripple 3.6s ease-out infinite;
}

.join-art::before {
  inset: -16px;
}

.join-art::after {
  inset: -34px;
  border-color: rgba(34, 211, 238, 0.18);
  animation-delay: 1.2s;
}

.watch-join h1,
.watch-waiting h1,
.watch-ended h1 {
  font-size: clamp(27px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.watch-join p,
.watch-waiting p,
.watch-ended p {
  max-width: 48ch;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.66;
}

.join-form {
  display: grid;
  gap: 11px;
  margin-top: 24px;
}

.join-form .hint {
  margin-top: 3px;
  color: var(--dim);
  font-size: 12px;
}

.wait-rings {
  position: relative;
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  margin: 0 auto 30px;
}

.wait-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, 0.4);
  animation: ripple 2.6s ease-out infinite;
}

.wait-rings span:nth-child(2) {
  border-color: rgba(34, 211, 238, 0.4);
  animation-delay: 1.3s;
}

.wait-rings i {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--grad);
  box-shadow: 0 0 54px rgba(124, 92, 255, 0.5);
}

.wait-rings i svg {
  width: 28px;
  height: 28px;
  color: #06101d;
}

.watch-waiting .wait-actions,
.watch-ended .wait-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.watch-waiting b {
  color: #fff;
}

.watch-player {
  display: flex;
  flex: 1;
  min-height: 100dvh;
  background: #000;
}

.video-shell {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  overflow: hidden;
  background: #000;
  min-height: 100dvh;
}

.video-shell video {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  object-fit: contain;
  background: #000;
}

.video-shell:fullscreen {
  background: #000;
}

.player-stats {
  position: absolute;
  top: 72px;
  right: 14px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 9, 17, 0.82);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  animation: fade-in 0.15s;
}

.player-stats div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.player-stats b {
  color: #fff;
  font-weight: 600;
}

.unmute-chip {
  position: absolute;
  top: 76px;
  left: 50%;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--grad);
  color: #06101d;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 18px 44px -14px rgba(124, 92, 255, 0.8);
  transform: translateX(-50%);
  animation: floaty 3.6s ease-in-out infinite;
}

.unmute-chip svg {
  width: 18px;
  height: 18px;
}

.player-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 7;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(4, 7, 14, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 11.5px;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s;
  white-space: nowrap;
}

body.viewing.idle .player-hint {
  opacity: 0;
}

.player-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 40px 16px 16px;
  background: linear-gradient(0deg, rgba(2, 4, 9, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

body.viewing:not(.idle) .player-actions {
  opacity: 1;
}

.player-actions .pa-left,
.player-actions .pa-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 16, 30, 0.76);
  color: #dbe4f8;
  font-size: 12.3px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: 0.15s;
}

.pa-btn svg {
  width: 16px;
  height: 16px;
}

.pa-btn:hover {
  background: rgba(24, 34, 58, 0.94);
  color: #fff;
}

.ended-art {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.3);
  color: var(--danger);
}

.ended-art svg {
  width: 34px;
  height: 34px;
}

/* --------------------------------------------------------------------------
   Offline + 404
   -------------------------------------------------------------------------- */

.center-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
}

.center-card {
  width: min(460px, 100%);
  padding: clamp(30px, 5vw, 46px);
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(170deg, rgba(20, 27, 48, 0.9), rgba(8, 12, 22, 0.94));
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.center-card .brand {
  justify-content: center;
  margin-bottom: 24px;
}

.center-card h1 {
  margin: 18px 0 10px;
  font-size: clamp(26px, 4vw, 34px);
}

.center-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.center-card .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.center-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 22px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--brand-3);
}

.center-icon svg {
  width: 32px;
  height: 32px;
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .cast-main {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1020px) {
  .cast-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .cast-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cast-side .panel.tips {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: clamp(30px, 6vw, 56px);
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-art {
    height: 400px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .nav.open .nav-links {
    position: absolute;
    top: var(--nav-h);
    right: 14px;
    left: 14px;
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: rgba(9, 13, 24, 0.98);
    box-shadow: var(--shadow-lg);
  }

  .nav.open .nav-links a {
    padding: 12px 14px;
  }

  .nav.open .nav-toggle {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
  }

  .steps,
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps .step:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .hero-art {
    height: 340px;
  }

  .float.f1,
  .float.f3 {
    display: none;
  }

  .float.f2 {
    bottom: 2%;
    left: 0;
  }

  .steps,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps .step:last-child {
    grid-column: auto;
  }

  .cast-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .cast-side .panel.tips {
    grid-column: auto;
  }

  .appbar {
    gap: 10px;
  }

  .appbar .room-chip,
  .appbar .viewer-chip {
    display: none;
  }

  .appbar-mid .pill span {
    display: none;
  }

  .appbar-mid .pill {
    width: 30px;
    padding: 0;
    justify-content: center;
  }

  .stage-controls {
    gap: 6px;
    padding: 34px 10px 10px;
  }

  .ctl span {
    display: none;
  }

  .ctl {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .stage-stats {
    max-width: 100%;
    left: 10px;
    right: 10px;
    top: 10px;
    justify-content: flex-start;
  }

  .stage-stats span:nth-child(3),
  .stage-stats span:nth-child(4) {
    display: none;
  }

  .watch-bar .brand-name {
    display: none;
  }

  .watch-bar .room-chip {
    max-width: 120px;
  }

  .watch-actions .btn.sm {
    padding: 0 10px;
    font-size: 12px;
  }

  .player-stats {
    top: 66px;
    right: 10px;
  }

  .player-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-actions .btn.ghost {
    display: none;
  }

  .hero-meta {
    gap: 7px 14px;
  }

  .section {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .stage-head,
  .stage-foot {
    padding-right: 14px;
    padding-left: 14px;
  }

  .quality {
    gap: 8px 12px;
  }

  .modal-card {
    padding: 30px 22px 26px;
  }

  .watch-actions .btn.ghost {
    display: none;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
