html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  background: #111;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

canvas,
#sceneContainer {
  touch-action: none;
  display: block;
}

/* Scene container (we fade this in after intro) */
#sceneContainer {
  position: fixed;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Popup UI + tweening */
#popupOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10;
}

#popupOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

#popup {
  background: #fff;
  padding: 1.5rem;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.9) translateY(12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#popupOverlay.active #popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

#popup h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

#popup button {
  margin-top: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

#popup button:active {
  transform: translateY(1px);
}

/* Language toggle */
#langToggle {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 5;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.96);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

#langToggle:active {
  transform: translateY(1px);
}

/* 2D labels above icons */
#labels {
  position: fixed;
  top: 18px;
  left: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
  color: #111;
  font-weight: 600;
  font-size: 14px;
  z-index: 4;
}

#labels span {
  display: inline-block;
  margin: 0 36px;
}

@media (max-width: 600px) {
  #labels span { margin: 0 16px; font-size: 12px; }
}

/* Intro overlay with typewriter */
#introOverlay {
  position: fixed;
  inset: 0;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
  transition: opacity 0.6s ease;
}

#introText {
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}
