/* ================================================
   FACE SPACE SHOOTER – Web Theme
   ================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #060618;
  color: #e0e0e0;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Loading Screen ---------- */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #060618 80%);
}

.loader-content {
  text-align: center;
}

.loader-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  background: linear-gradient(135deg, #32ffe6, #50b0ff, #b450ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.loader-content p {
  font-size: 1rem;
  color: #888;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(50, 255, 230, 0.15);
  border-top-color: #32ffe6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Game Container ---------- */
#game-container {
  position: fixed;
  inset: 0;
  display: none;
  /* shown after loading */
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* Hidden webcam video element */
#webcam {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Camera preview (bottom-right) */
#camPreview {
  position: absolute;
  bottom: 52px;
  right: 8px;
  width: 160px;
  height: 120px;
  border: 2px solid #32ffe6;
  border-radius: 8px;
  z-index: 10;
}

#cam-label {
  position: absolute;
  bottom: 174px;
  right: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  color: #32ffe6;
  letter-spacing: 2px;
  z-index: 10;
}

/* ---------- Bottom Controls Bar ---------- */
#controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(8, 8, 32, 0.85);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(50, 255, 230, 0.12);
  border-radius: 0;
  z-index: 10;
}

.ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  background: rgba(40, 40, 60, 0.7);
  border: 1px solid rgba(80, 80, 120, 0.3);
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ctrl.active {
  color: #000;
  border-color: transparent;
}

#ctrl-smile.active {
  background: #32dc32;
}

#ctrl-brows.active {
  background: #32ffe6;
}

#ctrl-mouth.active {
  background: #ffe632;
}

#ctrl-head.active {
  background: #ffa01e;
}

#ctrl-pause.active {
  background: #b450ff;
}

.ctrl-icon {
  font-size: 0.9rem;
}