/* ═══════════════════════════════════════════════════════════════════════════
   WebAR Video Overlay — UI Styles
   ═══════════════════════════════════════════════════════════════════════════ */

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

body {
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Loading Screen ────────────────────────────────────────────────────────── */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out;
}

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

.loading-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}

.loading-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #a78bfa;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.loading-subtitle {
  font-size: 0.9rem;
  color: #a5b4fc;
  margin-bottom: 32px;
}

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(167, 139, 250, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ── Loading Hint (shown after AR scene loads) ─────────────────────────────── */
#loading-hint {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  transition: opacity 0.5s ease-out;
}

.hint-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  animation: bounce 2s ease-in-out infinite;
}

.hint-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hint-text {
  font-size: 0.95rem;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.5;
}

.hint-text strong {
  color: #a78bfa;
}

/* ── Marker Found Feedback ─────────────────────────────────────────────────── */
#marker-feedback {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 200;
  transition: opacity 0.5s ease-out;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

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

.tap-content {
  text-align: center;
  color: #ffffff;
}

.tap-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

.tap-text {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
