/* Boot loader: the static loading screen in the page markup (#boot-loader in client/index.html and the Reddit
   game.html). It shows before any script has run and looks like the app's LoadingScreen (menu.css), which takes
   over once the UI modules are in; main.js then fades this one out. Self-contained: no variables from base.css,
   which may not be loaded yet. */
#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #04050c;
  color: #e9e3f5;
  font-family: Cinzel, 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
#boot-loader.leaving { opacity: 0; }
.boot-art {
  position: absolute;
  inset: 0;
  background: url('../assets/img/keyart-small.webp') center / cover no-repeat;
  opacity: 0.55;
  animation: bootFade 0.8s ease both;
}
.boot-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 40% at 50% 46%, rgba(4, 5, 12, 0.72), rgba(4, 5, 12, 0.2) 70%, transparent),
    linear-gradient(180deg, rgba(4, 5, 12, 0.55), rgba(4, 5, 12, 0.1) 35%, rgba(4, 5, 12, 0.85));
}
.boot-center { position: relative; display: flex; flex-direction: column; align-items: center; width: 30rem; max-width: 90vw; }
.boot-emblem { width: 5.5rem; height: 5.5rem; filter: drop-shadow(0 0 1.2rem rgba(168, 120, 255, 0.6)); animation: bootPulse 2.4s ease-in-out infinite; }
.boot-word {
  margin-top: 0.4rem;
  font-weight: 900;
  font-size: clamp(2.6rem, 13vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f3dfa6;
  text-shadow: 0 0 1.4rem rgba(168, 120, 255, 0.45), 0 2px 0 #3a2410;
}
.boot-sub { margin-top: 0.35rem; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.72em; text-indent: 0.72em; text-transform: uppercase; color: #e8c170; }
.boot-bar {
  position: relative;
  width: 100%;
  height: 0.55rem;
  margin-top: 2.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(232, 193, 112, 0.35);
  overflow: hidden;
}
.boot-bar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #c79bff 40%, #f6d78e 80%, transparent);
  box-shadow: 0 0 1rem rgba(200, 160, 255, 0.8);
  animation: bootSlide 1.4s ease-in-out infinite;
}
@keyframes bootSlide { from { left: -35%; } to { left: 100%; } }
@keyframes bootPulse { 0%, 100% { filter: drop-shadow(0 0 0.8rem rgba(168, 120, 255, 0.45)); } 50% { filter: drop-shadow(0 0 1.6rem rgba(216, 184, 255, 0.85)); } }
@keyframes bootFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .boot-emblem, .boot-bar::before { animation: none; }
  .boot-bar::before { left: 0; width: 100%; opacity: 0.5; }
}
