:root {
  --bg: #000000;
  --fg: #ffffff;
}

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

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  cursor: none;
  font-family: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 카메라가 매우 어두울 때 iMac 화면을 약한 필라이트로 사용한다. */
#fillLight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  transition: opacity 1.8s ease;
}

body.low-light #fillLight {
  opacity: 0.12;
}

/* ── 시작 게이트 ───────────────────────────── */
#gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 100;
  cursor: default;
}

#gate.hidden {
  display: none;
}

.gate-inner {
  text-align: center;
  padding: 2rem;
}

.gate-inner h1 {
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gate-inner .sub {
  margin-top: 0.6rem;
  opacity: 0.5;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

#startBtn {
  margin-top: 2.4rem;
  padding: 0.9rem 2.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#startBtn:hover {
  transform: scale(1.04);
}

#startBtn:active {
  transform: scale(0.98);
}

.gate-inner .hint {
  margin-top: 1.4rem;
  opacity: 0.35;
  font-size: 0.85rem;
}

/* ── 무대 ─────────────────────────────────── */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vmin;
  z-index: 1;
}

.word {
  text-align: center;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.5;
  white-space: pre-line;
  font-size: clamp(3rem, 11vw, 12rem);
  opacity: 0;
}

.word.show {
  opacity: 1;
}

body.mode-kind .word {
  color: #ffffff;
}

body.mode-mean .word {
  color: #ff2d2d;
}

/* ── 카메라(숨김) ─────────────────────────── */
#cam {
  position: fixed;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  top: 0;
  left: 0;
}

/* ── 디버그 ───────────────────────────────── */
.debug {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  font-family: 'Inter', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #0f0;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  white-space: pre;
  pointer-events: none;
}

.debug.hidden {
  display: none;
}
