body {
  margin: 0;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
}

#loading-bg {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 14% 16%, rgba(85, 141, 255, 0.16), transparent 33%),
    radial-gradient(circle at 82% 78%, rgba(46, 205, 170, 0.13), transparent 38%),
    var(--initial-loader-bg, #f4f8ff);
  block-size: 100vh;
  gap: 0.88rem 0;
  inline-size: 100vw;
  overflow: hidden;
  z-index: 9999;
}

.loading-aurora {
  border-radius: 999px;
  pointer-events: none;
  position: absolute;
}

.loading-aurora-top {
  animation: loaderAuroraTop 14s ease-in-out infinite alternate;
  background: rgba(72, 131, 255, 0.19);
  block-size: 320px;
  filter: blur(7px);
  inline-size: 320px;
  inset-block-start: -130px;
  inset-inline-start: -140px;
}

.loading-aurora-bottom {
  animation: loaderAuroraBottom 16s ease-in-out infinite alternate;
  background: rgba(34, 196, 158, 0.17);
  block-size: 300px;
  filter: blur(8px);
  inline-size: 300px;
  inset-block-end: -130px;
  inset-inline-end: -120px;
}

.loading-logo {
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(22, 34, 74, 0.09);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(14, 30, 72, 0.12);
  display: inline-flex;
  gap: 0.68rem;
  padding: 0.58rem 0.88rem;
  position: relative;
  z-index: 2;
}

.loading-logo-mark {
  align-items: center;
  background: rgba(102, 91, 255, 0.12);
  border-radius: 10px;
  display: inline-flex;
  justify-content: center;
  min-block-size: 2rem;
  min-inline-size: 2rem;
}

.loading-logo-copy {
  display: flex;
  flex-direction: column;
}

.loading-title {
  color: rgba(24, 34, 71, 0.96);
  font-family: "Public Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}

.loading-subtitle {
  color: rgba(32, 52, 93, 0.66);
  font-family: "Public Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0.08rem 0 0;
  text-transform: uppercase;
}

.loading-status-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
  position: relative;
  z-index: 2;
}

.loading-status {
  color: rgba(26, 44, 80, 0.76);
  font-family: "Public Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

.loading {
  position: relative;
  box-sizing: border-box;
  border: 3px solid transparent;
  border-radius: 50%;
  block-size: 50px;
  inline-size: 50px;
}

.loading .effect-1,
.loading .effect-2,
.loading .effect-3 {
  position: absolute;
  box-sizing: border-box;
  border: 3px solid transparent;
  border-radius: 50%;
  block-size: 100%;
  border-inline-start: 3px solid var(--initial-loader-color, #635bff);
  inline-size: 100%;
}

.loading .effect-1 {
  animation: rotate 1.1s ease infinite;
}

.loading .effect-2 {
  animation: rotate-opacity 1.1s ease infinite 0.1s;
}

.loading .effect-3 {
  animation: rotate-opacity 1.1s ease infinite 0.2s;
}

.loading .effects {
  transition: all 0.3s ease;
}

.loading-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
  justify-content: center;
  max-inline-size: 90vw;
  position: relative;
  z-index: 2;
}

.loading-signal-chip {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(22, 34, 74, 0.11);
  border-radius: 999px;
  color: rgba(30, 50, 95, 0.72);
  font-family: "Public Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.22rem 0.54rem;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(1turn);
  }
}

@keyframes rotate-opacity {
  0% {
    opacity: 0.1;
    transform: rotate(0deg);
  }

  100% {
    opacity: 1;
    transform: rotate(1turn);
  }
}

@keyframes loaderAuroraTop {
  0% {
    opacity: 0.16;
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    opacity: 0.28;
    transform: translate3d(48px, -12px, 0) scale(1.08);
  }
}

@keyframes loaderAuroraBottom {
  0% {
    opacity: 0.14;
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    opacity: 0.26;
    transform: translate3d(-42px, 15px, 0) scale(1.06);
  }
}

@media (max-width: 599px) {
  .loading-logo {
    padding: 0.52rem 0.78rem;
  }

  .loading-title {
    font-size: 1.02rem;
  }

  .loading-subtitle {
    font-size: 0.65rem;
  }

  .loading-status {
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading *,
  .loading-aurora {
    animation: none !important;
    transition: none !important;
  }
}
