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

body {
  background: #050505;
  color: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  touch-action: none;
}

#ar-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

#ar-scene.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

#ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

#status {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 52px;
  display: flex;
  align-items: center;
}

button {
  pointer-events: auto;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #6a1b9a, #1a237e);
  color: white;
  box-shadow: 0 4px 16px rgba(106, 27, 154, 0.4);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 27, 154, 0.5);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

#talk {
  background: linear-gradient(135deg, #b71c1c, #4a148c);
  box-shadow: 0 4px 16px rgba(183, 28, 28, 0.4);
}

#talk.listening {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(46, 125, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

#ios-hint {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f0d0ff;
}

#ios-hint.hidden {
  display: none;
}

#ios-hint strong {
  color: #ffffff;
}

#ios-hint p {
  margin: 0;
}

#camera-help {
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d4f8ff;
}

#camera-help.hidden {
  display: none;
}

#camera-help p {
  margin: 0;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
