/* ===== AR Experience Styles ===== */

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow: hidden;
  width: 100%;
  height: 100%;
  /* background: #000; */
}

body {
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: transparent;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  position: relative;
}

/* ===== MindAR Camera Feed Fix ===== */
/* MindAR appends a <video> to <body> with z-index:-2.
   The A-Frame canvas must be transparent so the video shows through. */
.a-scene.fullscreen,
a-scene {
  background: transparent !important;
}

a-scene .a-canvas {
  background: transparent !important;
}

/* ===== Loading Overlay ===== */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Pulsing camera icon */
.loading-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e94560, #c23152);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(233, 69, 96, 0.4);
}

.loading-icon svg {
  width: 40px;
  height: 40px;
  fill: white;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.4);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(233, 69, 96, 0.6);
  }
}

.loading-text {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  letter-spacing: 0.5px;
}

.loading-subtext {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-top: 8px;
}

/* Spinner dots */
.loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e94560;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ===== Scanning Hint (shown after loading) ===== */
#scanning-hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.5s ease-out;
  transition: opacity 0.5s ease-out;
}

#scanning-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

#scanning-hint .scan-icon {
  animation: scanPulse 2s ease-in-out infinite;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes scanPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ===== Tap to Play (iOS autoplay workaround) ===== */
#tap-to-play {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: pointer;
}

#tap-to-play .tap-content {
  text-align: center;
  color: #fff;
}

#tap-to-play .tap-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e94560, #c23152);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: pulse 2s ease-in-out infinite;
}

#tap-to-play .tap-icon svg {
  width: 30px;
  height: 30px;
  fill: white;
  margin-left: 4px;
}

#tap-to-play .tap-text {
  font-size: 16px;
  font-weight: 600;
}

/* ===== Target Found Indicator ===== */
#target-found-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(46, 204, 113, 0.9);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#target-found-indicator.visible {
  opacity: 1;
}