body {
  margin: 0;
  padding: 0;
}

.splash {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1C39BB;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.splash.fade-out {
  opacity: 0;
}

.splash-container {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.splash-progress {
  position: absolute;
  left: 50%;
  bottom: max(32px, env(safe-area-inset-bottom));
  width: min(320px, calc(100vw - 64px));
  height: 4px;
  overflow: hidden;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.splash-progress-bar {
  position: relative;
  width: 4%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #ffffff;
  transition: width 0.3s ease-out;
}

.splash-progress-bar::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.75),
    transparent
  );
  transform: translateX(-100%);
  animation: progressShimmer 1.4s ease-in-out infinite;
}

.splash-progress-bar.is-complete::after {
  animation: none;
}

.splash-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: logoEntry 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

/* Elastic scale and rotate animation matching Flutter's elasticOut curve */
@keyframes logoEntry {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-0.1rad);
  }
  60% {
    transform: scale(1.1) rotate(0.02rad);
  }
  80% {
    transform: scale(0.95) rotate(-0.01rad);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes progressShimmer {
  to {
    transform: translateX(100%);
  }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .splash-logo {
    width: 100px;
    height: 100px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .splash {
    background-color: #1C39BB;
  }
}

