html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

[hidden] { display: none !important; }

a-scene {
  position: fixed !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

#hud {
  position: fixed;
  top: env(safe-area-inset-top, 16px);
  left: 0;
  right: 0;
  text-align: center;
  padding: 16px;
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

#title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

#subtitle {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 4px;
  letter-spacing: 0.08em;
}

#tap-prompt {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
}

#tap-prompt .prompt-text {
  background: rgba(0, 0, 0, 0.55);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

#controls {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 130px);
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
}

#controls button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  min-width: 64px;
}

#controls button:active {
  transform: scale(0.97);
}

#controls #record.recording {
  background: rgba(255, 50, 60, 0.85);
  border-color: rgba(255, 80, 80, 0.9);
  animation: recPulse 1.4s ease-in-out infinite;
}

@keyframes recPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 50, 60, 0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 50, 60, 0); }
}
