/* Base font & global reset */
* {
  font-family: "Quicksand", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Loading Screen --- */
.loading-container {
  position: fixed;
  inset: 0; /* shorthand for top/right/bottom/left = 0 */
  background: linear-gradient(145deg, #91beb5 0%, #6d7070 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: #ffffff;
  text-align: center;
  padding: 2rem;
  transition: opacity 0.6s ease, transform 0.6s ease;
  backdrop-filter: blur(4px);
}

.loading-container.fade-out {
  opacity: 0;
  transform: scale(0.97);
}

/* --- Titles --- */
.title {
  font-size: 2.8rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

/* --- Spinner --- */
.spinner-container {
  margin: 2rem 0;
}

.spinner {
  width: 75px;
  height: 75px;
  border: 5px solid rgba(255, 255, 255, 0.25);
  border-top: 5px solid #ffffff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- Subtitles & Notices --- */
.subtitle,
.camera-notice {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto;
  line-height: 1.6;
  color: #f0f0f0;
}

.subtitle-error {
  color: #ff6666;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* --- Error Message --- */
.error-message {
  background: rgba(255, 0, 0, 0.12);
  border: 2px solid #ff4444;
  border-radius: 14px;
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
  max-width: 520px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  animation: fadeIn 0.5s ease;
  font-weight: 500;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Status Indicator --- */
.status-indicator {
  position: fixed;
  top: 25px;
  right: 25px;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
}

.status-indicator:hover {
  transform: scale(1.08);
}

.status-searching {
  background: rgba(255, 165, 0, 0.95);
  color: #fff;
}

.status-found {
  background: rgba(0, 200, 0, 0.95);
  color: #fff;
}

.status-lost {
  background: rgba(255, 0, 0, 0.95);
  color: #fff;
}

/* --- AR Button --- */
.ar-button {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  background: #ff9900;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-transform: uppercase;
}

.ar-button:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.ar-button a {
  text-decoration: none;
  color: inherit;
}
