html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: #193028;
}

#app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% -12%, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(180deg, #00833d 0%, #193028 100%);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.splash-content {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100vw - 48px));
  padding: 24px;
  box-sizing: border-box;
}

.splash-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: splash-rise 620ms ease-out both;
}

.splash-logo {
  width: clamp(240px, 42vw, 420px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.18));
  animation: splash-pulse 2.6s ease-in-out infinite;
}

.splash-status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(420px, 100%);
  padding: 22px 28px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: splash-card-in 580ms 180ms ease-out both;
}

.loading-text {
  margin-top: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
}

#progress-bar-container {
  position: relative;
  width: min(220px, 82%);
  height: 4px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

#progress-bar {
  position: absolute;
  top: 0;
  left: -45%;
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: #ffffff;
  animation: indeterminate-progress 1.6s ease-in-out infinite;
}

.splash-footer {
  position: fixed;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 0;
  z-index: 3;
  padding: 0 18px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14px;
  text-align: center;
  white-space: nowrap;
  opacity: 0.9;
  pointer-events: none;
}

.splash-glow,
.splash-watermark,
.splash-orbit-dot {
  position: absolute;
  pointer-events: none;
}

.splash-glow {
  width: 80vh;
  height: 80vh;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 68%);
}

.splash-glow-top {
  top: -28vh;
  right: -8vw;
}

.splash-watermark {
  bottom: -34vh;
  left: -20vh;
  z-index: 1;
  opacity: 0.14;
}

.splash-watermark svg {
  width: 90vh;
  height: 90vh;
  animation: splash-watermark-in 900ms ease-out both;
}

.splash-orbit-dot {
  z-index: 1;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 22px currentColor;
  animation: splash-orbit-fade 1.5s ease-in-out infinite alternate;
}

.splash-orbit-dot-start {
  top: 14vh;
  left: 10vw;
  width: 9px;
  height: 9px;
  color: rgba(255, 255, 255, 0.34);
}

.splash-orbit-dot-end {
  top: 27vh;
  right: 14vw;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.18);
  animation-delay: 280ms;
}

.splash-orbit-dot-bottom {
  right: 24vw;
  bottom: 22vh;
  width: 7px;
  height: 7px;
  color: rgba(255, 255, 255, 0.28);
  animation-delay: 520ms;
}

#app-loader::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 42vh;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(25, 48, 40, 0.48));
  pointer-events: none;
}

@media (orientation: landscape) and (max-height: 540px) {
  .splash-content {
    width: min(700px, calc(100vw - 80px));
    padding: 16px 24px 56px;
  }

  .splash-hero {
    gap: 14px;
  }

  .splash-logo {
    width: clamp(220px, 46vw, 360px);
  }

  .splash-status-card {
    width: min(360px, 100%);
    padding: 18px 22px;
  }

  .loading-text {
    margin-top: 12px;
    font-size: 14px;
  }

  #progress-bar-container {
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .splash-content {
    width: min(420px, calc(100vw - 28px));
    padding: 18px;
  }

  .splash-status-card {
    padding: 22px 20px;
  }

  .splash-logo {
    width: min(300px, 82vw);
  }

  .splash-watermark {
    left: -28vh;
  }
}

@keyframes splash-pulse {
  0%,
  100% {
    opacity: 0.92;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.045);
  }
}

@keyframes splash-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-watermark-in {
  from {
    transform: translateX(-15%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes splash-orbit-fade {
  from {
    opacity: 0.45;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes indeterminate-progress {
  0% {
    left: -45%;
  }

  100% {
    left: 100%;
  }
}
