:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f7f9;
  background: #080a0d;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button { font: inherit; }
#app {
  position: relative;
  background: radial-gradient(circle at 50% 42%, rgba(41, 47, 55, .8), transparent 34%), linear-gradient(145deg, #0d1116, #060709 70%);
}
#stream {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: #000;
}
#viewer {
  position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: grab;
  transition: opacity .5s ease; touch-action: none;
}
#viewer:active { cursor: grabbing; }
#viewer.viewer--active { opacity: 1; }
.topbar {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center;
  justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent); pointer-events: none;
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; letter-spacing: -.02em; }
.mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #07110b;
  background: #4cf28a; font-size: 13px; box-shadow: 0 0 28px rgba(76, 242, 138, .22);
}
.status {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px; background: rgba(8, 10, 13, .68); backdrop-filter: blur(14px);
  font-size: 12px; font-weight: 750; letter-spacing: .04em;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: #9299a2; }
.status--live .status__dot { background: #43ee82; box-shadow: 0 0 0 5px rgba(67, 238, 130, .14); animation: pulse 1.8s infinite; }
.status--error .status__dot { background: #ff6a6a; }
.empty-state { position: absolute; z-index: 2; top: 50%; left: 50%; width: min(88vw, 440px); transform: translate(-50%, -50%); text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state__icon {
  display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 25px;
  border: 1px solid rgba(76, 242, 138, .32); border-radius: 50%; color: #63f397;
  background: rgba(76, 242, 138, .06); box-shadow: 0 0 80px rgba(76, 242, 138, .08), inset 0 0 28px rgba(76, 242, 138, .05);
  font-size: 23px; font-weight: 800;
}
.empty-state h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.045em; }
.empty-state p { margin: 0; color: #a6adb7; line-height: 1.55; }
.play-button {
  position: absolute; z-index: 5; top: 50%; left: 50%; display: flex; align-items: center; gap: 10px;
  transform: translate(-50%, -50%); padding: 14px 18px; border: 0; border-radius: 999px;
  color: #08100b; background: #4cf28a; font-weight: 750; cursor: pointer;
}
.play-button__triangle { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; }
.hint {
  position: absolute; z-index: 3; bottom: 88px; left: 50%; transform: translateX(-50%); padding: 9px 13px;
  border-radius: 999px; color: #e4e8ec; background: rgba(0, 0, 0, .55); backdrop-filter: blur(10px);
  font-size: 12px; white-space: nowrap; opacity: 1; transition: opacity .4s ease; pointer-events: none;
}
.hint--hidden { opacity: 0; }
.controls { position: absolute; z-index: 4; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; display: flex; gap: 8px; transform: translateX(-50%); }
.controls button {
  padding: 10px 13px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; color: #f5f7f8;
  background: rgba(8, 10, 13, .66); backdrop-filter: blur(14px); font-size: 12px; font-weight: 650; cursor: pointer;
}
.controls button:hover { background: rgba(33, 37, 43, .82); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(67, 238, 130, 0); } }
@media (max-width: 540px) {
  .brand > span:last-child { display: none; }
  .controls { width: calc(100% - 24px); }
  .controls button { flex: 1; padding-inline: 7px; }
  .hint { bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
