:root {
  --bg: #0f1115;
  --panel: #151922;
  --text: #e6e8ee;
  --accent: #7aa2f7;
  --danger: #f7768e;
  --success: #9ece6a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app { max-width: 1200px; margin: 0 auto; padding: 16px; }
.app__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.app__title { margin: 0; font-size: 20px; font-weight: 600; }
.controls { display: flex; gap: 12px; align-items: center; }

.btn {
  appearance: none;
  background: var(--panel);
  color: var(--text);
  border: 1px solid #2a3140;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }

.status { padding: 6px 10px; border-radius: 999px; background: #1a2030; border: 1px solid #2a3140; font-size: 12px; }
.status.active { color: var(--bg); background: var(--success); border-color: var(--success); }

.stage { width: 100%; }
.video-stage {
  position: relative;
  width: 100%;
  background: #0b0e14;
  border: 1px solid #2a3140;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.overlay, .draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.overlay { z-index: 2; }
.draw-canvas { z-index: 3; }

@media (max-width: 640px) {
  .app { padding: 12px; }
  .app__title { font-size: 18px; }
}


