:root {
  --ink: #f4f8fa;
  --muted: #a8bdc8;
  --cyan: #63dce5;
  --cyan-bright: #00e5f2;
  --night: #03090f;
  --panel: #071722;
  --line: rgba(134, 204, 216, .25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--night);
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: radial-gradient(circle at 75% 15%, #0d2a38 0, #050d14 38%, #020609 74%); }
button, a { font: inherit; }
button { color: inherit; }

.page-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 56.25dvh) minmax(300px, 500px);
  justify-content: center;
  align-items: center;
  gap: clamp(3rem, 8vw, 9rem);
  padding: clamp(1.5rem, 4vw, 4rem);
}

.player-stage {
  position: relative;
  width: min(100%, 56.25dvh);
  aspect-ratio: 9 / 16;
  max-height: calc(100dvh - 3rem);
  overflow: hidden;
  background: #02070b;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, .48), 0 0 0 .35rem rgba(95, 221, 230, .035);
  isolation: isolate;
}

video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #02070b;
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(1, 8, 13, .78), transparent 20%, transparent 64%, rgba(1, 7, 11, .8));
}

.brand-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(1.1rem, env(safe-area-inset-top)) 1.15rem 1rem;
}

.brand { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.brand img { width: 2rem; height: 2rem; object-fit: contain; }
.brand strong, .brand small { display: block; letter-spacing: .13em; line-height: 1; }
.brand strong { font-size: .88rem; }
.brand small { margin-top: .28rem; color: var(--cyan); font-size: .64rem; font-weight: 750; }

.live-state {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2rem;
  padding: .4rem .65rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(0, 7, 12, .62);
  backdrop-filter: blur(10px);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.live-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #e8b84b; box-shadow: 0 0 .7rem currentColor; }
.is-live .live-dot { background: #ff3f55; animation: pulse 1.8s infinite; }
.is-error .live-dot { background: #e8b84b; }
@keyframes pulse { 50% { opacity: .45; } }

.welcome {
  position: absolute;
  z-index: 3;
  left: 1.4rem;
  right: 1.4rem;
  bottom: max(5.9rem, calc(env(safe-area-inset-bottom) + 5rem));
  transition: opacity .35s ease, transform .35s ease;
}
.welcome.is-dismissed { opacity: 0; transform: translateY(1rem); pointer-events: none; }
.eyebrow { margin: 0 0 .75rem; color: var(--cyan); font-size: .74rem; font-weight: 800; letter-spacing: .16em; }
.welcome h1 {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 7dvh, 4.4rem);
  line-height: .92;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.welcome > p:not(.eyebrow) { max-width: 31rem; margin: 1rem 0 1.2rem; color: #d5e2e7; line-height: 1.5; }
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 3.2rem;
  padding: .75rem 1.1rem;
  border: 0;
  border-radius: .65rem;
  background: var(--cyan);
  color: #021116;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 .7rem 2rem rgba(0, 229, 242, .2);
}
.primary-action:hover { background: #8ce9ef; }
.autoplay-note { display: block; margin-top: .65rem; color: var(--muted); font-size: .78rem; }

.controls {
  position: absolute;
  z-index: 4;
  left: .8rem;
  right: .8rem;
  bottom: max(.8rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: .8rem;
  background: rgba(1, 8, 13, .68);
  backdrop-filter: blur(14px);
  transition: opacity .3s ease, transform .3s ease;
}
.controls.is-idle { opacity: 0; transform: translateY(.5rem); pointer-events: none; }
.controls button, .controls a, .stream-message button {
  min-height: 2.65rem;
  padding: .55rem .72rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.controls button:hover, .controls a:hover { background: rgba(255,255,255,.1); }
.control-spacer { flex: 1; }

.stream-message {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: min(86%, 25rem);
  transform: translate(-50%, -50%);
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(3, 14, 21, .94);
  box-shadow: 0 1rem 4rem rgba(0,0,0,.45);
  text-align: center;
}
.stream-message strong, .stream-message span { display: block; }
.stream-message span { margin: .55rem 0 1rem; color: var(--muted); line-height: 1.45; }
.stream-message button { background: var(--cyan); color: #021116; font-weight: 800; }

.desktop-note { max-width: 32rem; }
.desktop-note img { width: 4.4rem; height: 4.4rem; object-fit: contain; margin-bottom: 2rem; }
.desktop-note h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 5vw, 5.5rem); line-height: .94; letter-spacing: -.05em; }
.desktop-note > p:not(.eyebrow) { max-width: 29rem; margin: 1.5rem 0; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.desktop-note a { color: var(--cyan); font-weight: 750; text-underline-offset: .3rem; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan-bright); outline-offset: 3px; }
[hidden] { display: none !important; }
noscript { display: block; padding: 1rem; text-align: center; }
noscript a { color: var(--cyan); }

@media (max-width: 760px) {
  body { background: #02070b; }
  .page-shell { display: block; min-height: 100dvh; padding: 0; }
  .player-stage { width: 100%; height: 100dvh; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  .desktop-note { display: none; }
  .welcome { left: 1.2rem; right: 1.2rem; }
  .welcome h1 { font-size: clamp(2.7rem, 8.5dvh, 4.6rem); }
  .controls a { display: none; }
}

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