/* ================================================================
   EUCLID EXPLORER — Loading Screen
   ================================================================ */

#loading-bg {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
  z-index: 9999;
}

@media (prefers-color-scheme: dark) {
  #loading-bg {
    background: #050810;
  }
  .loading-brand {
    color: #e2e8f0 !important;
  }
  .loading-brand span {
    color: #818cf8 !important;
  }
  .spinner-ring {
    border-color: rgba(129, 140, 248, 0.1) !important;
    border-top-color: #818cf8 !important;
  }
}

/* Logo */
.loading-logo {
  margin-bottom: 20px;
}

.loading-logo img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  animation: logo-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Brand text */
.loading-brand {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 32px;
  animation: brand-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.loading-brand span {
  font-weight: 400;
  color: #4f46e5;
  margin-left: 6px;
}

/* Spinner */
.loading-spinner {
  animation: spinner-enter 0.4s ease 0.3s both;
}

.spinner-ring {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(79, 70, 229, 0.12);
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes logo-enter {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes brand-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinner-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

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