#app-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 48%),
    rgba(15, 23, 42, 0.24);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

#app-loading-overlay.is-visible {
  display: flex;
}

.app-loading-card {
  min-width: 320px;
  max-width: 392px;
  padding: 24px 26px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  text-align: center;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(231, 237, 244, 0.96);
}

.app-loading-title {
  margin-top: 14px;
  color: #243447;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-loading-subtitle {
  margin-top: 6px;
  color: #6b7785;
  font-size: 12px;
  line-height: 1.65;
}

.app-loading-scene {
  position: relative;
  width: 236px;
  height: 168px;
  margin: 0 auto;
}

.app-loading-scene::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(36, 52, 71, 0.12);
  filter: blur(7px);
}

.app-loading-badge {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #35506b;
  background: rgba(242, 247, 252, 0.94);
  box-shadow: 0 10px 18px rgba(87, 114, 142, 0.12);
}

.app-loading-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f8a44d;
  box-shadow: 0 0 0 rgba(248, 164, 77, 0.45);
  animation: hamster-badge-pulse 1.2s ease-out infinite;
}

.app-loading-asset-shell {
  position: absolute;
  inset: 12px 0 26px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
}

.app-loading-asset {
  width: 214px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(43, 58, 73, 0.16));
  transform-origin: center bottom;
  animation: hamster-asset-float 1.1s ease-in-out infinite;
}

.app-loading-lane {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 24px;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #dbe4ef 0%, #bfcede 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.58);
}

.app-loading-lane::before {
  content: "";
  position: absolute;
  inset: 5px 12px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.92) 0 14px,
      rgba(255, 255, 255, 0.22) 14px 28px
    );
  animation: hamster-lane-flow 0.8s linear infinite;
}

.app-loading-lane::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.3));
}

.app-loading-spark {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 156px;
  height: 100px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 219, 172, 0.42) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 1;
  animation: hamster-spark-breathe 1.5s ease-in-out infinite;
}

@keyframes hamster-asset-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

@keyframes hamster-lane-flow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-28px);
  }
}

@keyframes hamster-badge-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 164, 77, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(248, 164, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(248, 164, 77, 0);
  }
}

@keyframes hamster-spark-breathe {
  0%, 100% {
    opacity: 0.78;
    transform: translateX(-50%) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
}
