/* ══════════════════════════════════════════════
   App Shell — Splash Screen, Page Transitions
   ══════════════════════════════════════════════ */

/* ── Page Transition: Fade In ── */
body {
  opacity: 0;
  animation: appShellFallback 0s 2s forwards; /* Safety: force visible after 2s if JS fails */
  transition: opacity 0.3s ease-in;
}
@keyframes appShellFallback {
  to { opacity: 1; }
}

body.app-ready {
  opacity: 1;
}
body.app-exit {
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

/* ── Splash Screen ── */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0b1220;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.4s ease-out;
}
.splash-screen.splash-out {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  animation: splashPulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(74, 144, 217, 0.5));
}

.splash-title {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: splashFadeUp 0.6s 0.3s ease-out forwards;
}

.splash-dots {
  display: flex;
  gap: 8px;
}
.splash-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a90d9;
  opacity: 0.3;
  animation: splashDot 1.2s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes splashPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 30px rgba(74, 144, 217, 0.5)); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 0 50px rgba(74, 144, 217, 0.8)); }
}

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

@keyframes splashDot {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.3); }
}
