@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #080809;
  --stroke-dim: rgba(255,255,255,0.08);
  --stroke-mid: rgba(255,255,255,0.18);
  --stroke-bright: rgba(255,255,255,0.55);
  --accent: rgba(255,255,255,0.90);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow: hidden;
}

#camera {
  position: fixed;
  top: -200vh;
  left: -200vw;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  transform: scaleX(-1);
}

#stage {
  position: fixed;
  inset: 0;
  background: var(--bg);
}

#scene {
  width: 100%;
  height: 100%;
  display: block;
}

#overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#tooltip {
  position: absolute;
  padding: 4px 8px;
  background: rgba(0,0,0,0.75);
  border: 0.5px solid var(--stroke-dim);
  color: var(--stroke-bright);
  font-size: 9px;
  white-space: nowrap;
  transform: translate(-50%, -140%);
  pointer-events: none;
  transition: opacity 120ms ease;
}
#tooltip.hidden { opacity: 0; }

#pip {
  position: absolute;
  right: 16px;
  bottom: 72px;
  width: 180px;
  height: 100px;
  border: 0.5px solid var(--stroke-dim);
  border-radius: 6px;
  overflow: hidden;
  pointer-events: none;
}
#pip.hidden { display: none; }
#pip-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#controls {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: transparent;
  z-index: 20;
}

.ctrl {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--stroke-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 150ms ease;
}

.ctrl:hover { color: var(--stroke-bright); }
.ctrl.active { color: var(--accent); }

.ctrl.record {
  width: 34px;
  height: 34px;
  border: 0.5px solid var(--stroke-dim);
  border-radius: 50%;
}
.ctrl.record .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background 150ms ease;
}
.ctrl.record.active { border-color: var(--accent); }
.ctrl.record.active .dot {
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.ctrl .meter {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 0.5px solid transparent;
  pointer-events: none;
}
.ctrl.active#btn-mic .meter {
  border-color: var(--stroke-mid);
}

#begin {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 100;
  background: var(--bg);
  transition: opacity 400ms ease;
}
#begin.fade { opacity: 0; pointer-events: none; }

#begin-btn {
  width: 48px;
  height: 48px;
  border: 0.5px solid var(--stroke-mid);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
#begin-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--stroke-bright);
}

#begin-msg {
  color: var(--stroke-dim);
  font-size: 10px;
}

#session-badge {
  position: fixed;
  top: 14px;
  right: 18px;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.12);
  z-index: 15;
  pointer-events: none;
  user-select: none;
}
#session-badge.hidden { display: none; }
