/* ==========================================================================
   AstroDev App — Animations
   Restrained: a quiet ambient starfield behind the app shell (consistent
   with the marketing site), plus simple view-transition fades.
   ========================================================================== */

#starfield-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
}

:root[data-theme="light"] #starfield-canvas {
  display: none;
}

.view {
  animation: view-fade-in 0.35s ease;
}

@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--maroon);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

.loading-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
  padding: var(--space-6);
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
  .spinner { animation: none; border-top-color: var(--line); }
}
