:root {
  --bg: #050a1c; /* deep midnight blue, not raw black -- keeps a hint of
                    color behind the neon effects without washing them out */
  --panel: #1e1e1ecc;
  --border: #3c3c3c;
  --text: #d4d4d4;
  --ok: #4ec9b0;
  --warn: #ce9178;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

/* The mirrored camera feed IS the background again -- object-fit: cover
   fills the viewport regardless of its native aspect ratio, scaleX(-1)
   mirrors it so it feels like looking in a mirror. */
#webcam-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: scaleX(-1);
  background: #000;
}

/* Transparent overlay for the dot/string/particle effects, sized to match
   the viewport, sitting above the live video. */
#effects-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Faint CRT scanline texture over the live video -- much lower opacity
   than the earlier all-dark-theme version, so it adds a retro-monitor
   feel without hiding you. Pure CSS, no per-frame cost. */
#scanlines {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.07) 0px,
    rgba(0, 0, 0, 0.07) 1px,
    transparent 1px,
    transparent 3px
  );
}

#status-bar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(6px);
}

#brand {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.status-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #2d2d2d;
  border: 1px solid var(--border);
  color: var(--text);
}

.status-pill.ok {
  color: var(--ok);
  border-color: var(--ok);
}

.status-pill.error {
  color: var(--warn);
  border-color: var(--warn);
}

#palette-picker {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(6px);
}

.palette-swatch {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.palette-swatch:hover {
  transform: scale(1.15);
}

.palette-swatch.active {
  border-color: #fff;
  transform: scale(1.2);
}
