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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
}

a-scene {
  width: 100%;
  height: 100%;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10;
  padding: 2rem;
  text-align: center;
}

.overlay p {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  max-width: 280px;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.scan-frame {
  width: min(60vw, 260px);
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 12px;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

.scan-frame::before,
.scan-frame::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: scanline 2s ease-in-out infinite;
}

.scan-frame::before { top: 20%; }
.scan-frame::after { bottom: 20%; animation-delay: 1s; }

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes scanline {
  0%, 100% { transform: translateY(0); opacity: 0; }
  50% { transform: translateY(60px); opacity: 1; }
}

#title-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), transparent);
  z-index: 5;
  pointer-events: none;
}

#location-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#error {
  background: rgba(60, 0, 0, 0.95);
}
