/* ── ECOAML Splash Screen ─────────────────────── */
body {
  margin: 0;
  padding: 0;
}
.splash-screen {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'Inter', Helvetica, sans-serif;
  background: linear-gradient(145deg, #004c71 0%, #003a57 40%, #002a3f 100%);
  color: #fff;
  overflow: hidden;
}
/* ── Subtle background pattern ─────────────────── */
.splash-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0, 130, 68, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(94, 163, 179, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
  pointer-events: none;
}
/* ── Floating accent rings ─────────────────────── */
.splash-screen::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(94, 163, 179, 0.06);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: splash-ring-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes splash-ring-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}
/* ── Logo ──────────────────────────────────────── */
.splash-screen img {
  position: relative;
  z-index: 1;
  height: 72px;
  margin-bottom: 2rem;
  animation: splash-logo-in 0.8s ease-out both;
}
@keyframes splash-logo-in {
  0% { opacity: 0; transform: translateY(12px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* ── Loading text ──────────────────────────────── */
.splash-screen span {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.5rem;
  animation: splash-text-in 0.8s 0.2s ease-out both;
}
@keyframes splash-text-in {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
/* ── Progress bar ──────────────────────────────── */
.splash-progress {
  position: relative;
  z-index: 1;
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  animation: splash-text-in 0.8s 0.3s ease-out both;
}
.splash-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #008244, #5ea3b3);
  animation: splash-progress 2.5s ease-in-out infinite;
}
@keyframes splash-progress {
  0% { width: 0%; transform: translateX(0); }
  50% { width: 70%; }
  100% { width: 100%; transform: translateX(0); }
}
/* ── Dark theme ────────────────────────────────── */
[data-theme="dark"] .splash-screen,
[data-bs-theme="dark"] .splash-screen {
  background: linear-gradient(145deg, #0a1929 0%, #0d1f33 40%, #111827 100%);
}
[data-theme="dark"] .splash-screen span,
[data-bs-theme="dark"] .splash-screen span {
  color: rgba(255, 255, 255, 0.35);
}
/* ── Fade out ──────────────────────────────────── */
.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#root {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}
