#app-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #0d519b 0%, #04366a 45%, #021b33 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#app-splash.app-splash--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash__grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 68%);
}

.app-splash__sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 70%
  );
  transform: translateX(-60%);
  animation: app-splash-sheen 3.2s ease-in-out infinite;
}

.app-splash__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-splash__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 280px;
}

.app-splash__glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 70%);
  animation: app-splash-breathe 2.6s ease-in-out infinite;
}

.app-splash__orbit {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.app-splash__orbit--outer {
  inset: 0;
  border-top-color: #ffffff;
  border-right-color: rgba(255, 255, 255, 0.45);
  animation: app-splash-spin 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.app-splash__orbit--inner {
  inset: 26px;
  border-bottom-color: rgba(255, 255, 255, 0.8);
  border-left-color: rgba(255, 255, 255, 0.3);
  animation: app-splash-spin-reverse 1.5s linear infinite;
}

.app-splash__logo {
  position: relative;
  width: auto;
  height: 96px;
  max-width: 200px;
  object-fit: contain;
  border-radius: 1rem;
  filter: drop-shadow(0 4px 14px rgba(255, 255, 255, 0.4));
  animation: app-splash-float 3s ease-in-out infinite;
}

.app-splash__wordmark {
  margin-top: 2rem;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #eef4f7;
  text-transform: uppercase;
  padding-left: 0.32em;
}

.app-splash__wordmark span {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  animation: app-splash-letter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.app-splash__tagline {
  margin-top: 0.6rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0;
  animation: app-splash-fade-in 0.7s ease 1.1s forwards;
}

.app-splash__bar {
  position: relative;
  margin-top: 2.25rem;
  width: 260px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.app-splash__bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff, rgba(255, 255, 255, 0));
  animation: app-splash-bar 1.3s ease-in-out infinite;
}

@keyframes app-splash-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes app-splash-spin-reverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes app-splash-breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes app-splash-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes app-splash-letter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-splash-fade-in {
  to {
    opacity: 1;
  }
}

@keyframes app-splash-sheen {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(60%);
  }
}

@keyframes app-splash-bar {
  0% {
    left: -45%;
  }
  100% {
    left: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__sheen,
  .app-splash__glow,
  .app-splash__orbit--outer,
  .app-splash__orbit--inner,
  .app-splash__logo,
  .app-splash__wordmark span,
  .app-splash__tagline,
  .app-splash__bar span {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
