/* Loader Styles for AlphaCode - Minimalistic, Professional, Theme-aware */

/* Hide page content until fully loaded */
body {
  transition: opacity 0.5s ease;
}

.alphacode-loader-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--loader-bg, #f8fafc);
  transition: opacity 0.4s;
  opacity: 1;
}

.alphacode-loader-overlay[data-theme="dark"] {
  --loader-bg: #0a1627;
}

.alphacode-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.alphacode-spinner {
  width: 56px;
  height: 56px;
  border: 6px solid #2563eb;
  border-top: 6px solid #fff;
  border-radius: 50%;
  margin-bottom: 18px;
  background: transparent;
  animation: spin 1s linear infinite !important;
  /* Ensure animation is always applied, even in dark mode */
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.alphacode-loader-text {
  font-size: 1.1rem;
  color: #2563eb;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.alphacode-loader-overlay[data-theme="dark"] .alphacode-loader-text {
  color: #fff;
}
