/* Boot splash (linked from index.html). Must be external: CSP blocks inline style blocks. */
html,
body {
  margin: 0;
  min-height: 100%;
  background: #07111f;
  color: #0f2d5c;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
}

#app-boot.app-boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #dbeafe;
  background:
    linear-gradient(115deg, rgba(250, 204, 21, 0.16), transparent 28%),
    radial-gradient(circle at 52% 34%, rgba(96, 165, 250, 0.34), transparent 34%),
    radial-gradient(circle at 20% 78%, rgba(14, 165, 233, 0.18), transparent 34%),
    linear-gradient(145deg, #07111f 0%, #0d2140 48%, #13263d 100%);
}

#app-boot.app-boot-loader::before {
  content: "";
  position: absolute;
  inset: max(18px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px))
    max(18px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 18px;
  pointer-events: none;
}

#app-boot.app-boot-loader::after {
  content: "";
  position: absolute;
  width: min(420px, 82vw);
  height: min(420px, 82vw);
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    rgba(250, 204, 21, 0.28),
    rgba(96, 165, 250, 0.08),
    rgba(250, 204, 21, 0.28)
  );
  filter: blur(26px);
  opacity: 0.42;
  animation: app-boot-orbit 5s linear infinite;
  pointer-events: none;
}

.app-boot-seal {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32), 0 0 0 8px rgba(219, 234, 254, 0.08);
  animation: app-boot-pulse 1.8s ease-in-out infinite;
}

.app-boot-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  text-align: center;
}

.app-boot-copy span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
}

.app-boot-copy strong {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.25;
  color: #f8fafc;
}

.app-boot-copy small {
  color: #b6c6da;
  font-size: 0.88rem;
}

.app-boot-bar {
  position: relative;
  z-index: 1;
  width: min(260px, 72vw);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.app-boot-bar span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #facc15);
  animation: app-boot-load 1.05s ease-in-out infinite;
}

@keyframes app-boot-load {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(230%);
  }
}

@keyframes app-boot-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

@keyframes app-boot-orbit {
  to {
    transform: rotate(360deg);
  }
}

#app-boot.app-boot-loader--hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
