/* 加载动画样式 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 10005;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(102, 126, 234, 0.15);
  backdrop-filter: blur(15px);
  animation: fadeIn 0.3s ease;
}

.loading-content {
  text-align: center;
  background: var(--bg-card);
  padding: 50px 40px;
  border-radius: 25px;
  box-shadow: 0 25px 50px rgba(102, 126, 234, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  min-width: 300px;
}

/* 现代化加载器 */
.loading-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.loading-spinner::before {
  width: 80px;
  height: 80px;
  border: 4px solid transparent;
  border-top: 4px solid var(--primary-color);
  border-right: 4px solid #764ba2;
  animation: spin 1.5s linear infinite;
}

.loading-spinner::after {
  width: 60px;
  height: 60px;
  border: 3px solid transparent;
  border-bottom: 3px solid #f093fb;
  border-left: 3px solid #f5576c;
  animation: spin 1s linear infinite reverse;
}

/* 脉冲圆点 */
.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 25px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-gradient);
  animation: pulse 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  animation: textGlow 2s ease-in-out infinite alternate;
}

/* 进度条 */
.loading-progress {
  width: 100%;
  height: 6px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 20px;
  position: relative;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  background-size: 200% 100%;
  border-radius: 3px;
  animation: progressMove 2s ease-in-out infinite;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.loading-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 1.5s ease-in-out infinite;
}

/* 进度百分比显示 */
.loading-progress-text {
  position: absolute;
  top: -25px;
  right: 0;
  font-size: 12px;
  font-weight: 600;
  color: #667eea;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

/* 动画定义 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes textGlow {
  0% {
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
  }
  100% {
    text-shadow: 0 0 20px rgba(118, 75, 162, 0.5);
  }
}

@keyframes progressMove {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes progressShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
