/* ✨ 简洁加载页面样式 */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-1, #ffffff); /* ✅ 使用CSS变量，支持主题切换 */
  z-index: 9999;
  transition: background-color 0.3s ease; /* ✅ 平滑过渡效果 */
}

/* 🎨 Logo + 圆环容器 */
.loading-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ⭕ 旋转圆环 */
.loading-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid var(--color-fill-3, #e5e7eb); /* ✅ 使用CSS变量 */
  border-top-color: rgb(var(--primary-6, 64, 158, 255)); /* ✅ 使用主题色 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 🌟 Logo图片 - 立即显示，无动画 */
.loading-logo {
  width: 140px;
  height: auto;
  position: relative;
  z-index: 1;
  opacity: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

/* 📝 标题文字 - 立即显示 */
.loading-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-1, #1f2937); /* ✅ 使用CSS变量 */
  text-align: center;
  margin-bottom: 8px;
  opacity: 1;
}

/* 💬 副标题 - 立即显示 */
.loading-subtitle {
  font-size: 14px;
  color: var(--color-text-2, #6b7280); /* ✅ 使用CSS变量 */
  text-align: center;
  opacity: 1;
}


/* 📱 响应式适配 */
@media (max-width: 768px) {
  .loading-wrapper {
    width: 150px;
    height: 150px;
  }
  
  .loading-logo {
    width: 120px;
  }
  
  .loading-title {
    font-size: 18px;
  }
  
  .loading-subtitle {
    font-size: 13px;
  }
}

/* 🌙 暗色主题适配 */
@media (prefers-color-scheme: dark) {
  .loading-container {
    background: #1f2937;
  }
  
  .loading-title {
    color: #f9fafb;
  }
  
  .loading-subtitle {
    color: #9ca3af;
  }
  
  .loading-ring {
    border-color: #374151;
    border-top-color: #60a5fa;
  }
  
  .loading-logo {
    filter: drop-shadow(0 4px 12px rgba(96, 165, 250, 0.2));
  }
}

/* 淡出动画 - 优化版 */
.loading-fade-out {
  animation: fadeOut 0.3s ease-out forwards;
  pointer-events: none;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.98);
    visibility: hidden;
  }
}
