/* Splash screen - loaded directly by index.html so it shows instantly, before the app's JS/CSS.
   Also used by the "Submitting…" overlay (src/Splash.jsx). */

html,
body {
  margin: 0;
  background-color: #060c33;
}

body.no-scroll {
  overflow: hidden;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(90% 45% at 0% 0%, rgba(30, 107, 255, 0.45), transparent 70%),
    radial-gradient(80% 40% at 100% 0%, rgba(255, 46, 126, 0.35), transparent 70%),
    radial-gradient(120% 50% at 50% 100%, rgba(30, 107, 255, 0.3), transparent 70%),
    linear-gradient(180deg, #0a1240 0%, #060c33 55%, #030620 100%);
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease;
}
.splash--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash--enter {
  animation: splash-in 0.25s ease both;
}

.splash__inner {
  width: min(84vw, 420px);
  text-align: center;
}

.splash__logo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  animation: splash-pulse 2.4s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 50%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 80% at 50% 50%, #000 60%, transparent 100%);
}

.splash__loader {
  position: relative;
  width: min(60vw, 240px);
  height: 4px;
  margin: 26px auto 0;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}
.splash__loader span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3ad7ff, #7b2ff7, #ff2e7e);
  box-shadow: 0 0 12px rgba(58, 215, 255, 0.6);
  animation: splash-bar 1.2s ease-in-out infinite;
}

.splash__text,
.splash__sub {
  margin: 16px 0 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: #e9eefb;
}
.splash__sub {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 400;
  color: #8c9bcc;
}

@keyframes splash-bar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}
@keyframes splash-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.88;
  }
}
@keyframes splash-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash__logo,
  .splash--enter {
    animation: none;
  }
  .splash__loader span {
    animation-duration: 2.4s;
  }
}
