/* 加载动画样式 */
#app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #fff0f8 0%, #f5eeff 35%, #eef2ff 65%, #fff0f8 100%);
  z-index: 9999;
  transition: opacity 0.3s ease-out;
}

#app-loading.loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 12px;
  border-radius: 28px;
  box-shadow:
    0 16px 48px rgba(155, 126, 217, 0.35),
    0 8px 24px rgba(255, 107, 157, 0.25);
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-12px) scale(1.02);
  }
}

.loading-text {
  font-size: 16px;
  font-weight: 600;
  color: #9b7ed9;
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 4px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: #ff6b9d;
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  #app-loading {
    background: linear-gradient(160deg, #1a0a14 0%, #0d0a14 35%, #0a0a14 65%, #1a0a14 100%);
  }

  .loading-text {
    color: #c77dff;
  }
}
