:root {
  color-scheme: dark;
  --bg: #04050a;
  --panel: rgba(10, 14, 24, 0.75);
  --line: rgba(255, 255, 255, 0.18);
  --text: #e9edff;
  --accent: #8b7dff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top, #1a1940 0%, var(--bg) 55%);
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 12px;
}

.overlay {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  backdrop-filter: blur(6px);
}

.overlay h1 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.overlay p {
  margin: 0;
  opacity: 0.95;
  font-size: 0.92rem;
}

.stage {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #000;
  min-height: 56vh;
}

#cameraFeed,
#fxCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 160px;
  height: 220px;
  transform-origin: center center;
  pointer-events: none;
  transition: opacity 140ms ease-out;
}

.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.avatar-canvas {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.avatar-source {
  display: none;
}

.hidden {
  opacity: 0;
}

.status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
}

.primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  background: linear-gradient(130deg, #6f5dff, var(--accent));
}

.hint {
  margin-top: 8px;
  font-size: 0.83rem;
  opacity: 0.84;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
