/* 页面加载动画 */
body.page-loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.4, 1), 
                transform 0.5s cubic-bezier(0.2, 0.8, 0.4, 1);
}

body.page-loading.page-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 首次加载特殊动画 */
body.first-load {
    animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.4, 1);
}

/* 页面离开动画 */
body.page-leaving {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.4, 1), 
                transform 0.6s cubic-bezier(0.2, 0.8, 0.4, 1);
}

/* 淡入上移动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面加载动画相关样式 */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 合并背景颜色，这里使用第二个模块的背景色示例 */
  background: rgba(13, 38, 56, 0.5); /*作为覆盖层的背景颜色，可以根据需要调整透明度。*/
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease; /* 淡入淡出过渡时间 */
}

.loading-animation {
  display: flex;
  gap: 15px;
}

.loading-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  animation: pulse 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 0 15px rgba(107, 92, 231, 0.8),
    0 0 30px rgba(79, 172, 254, 0.7);
}

.loading-dot:nth-child(1) {
  background: rgba(255, 255, 255, 0.9);
  animation-delay: 0s;
}

.loading-dot:nth-child(2) {
  background: rgba(162, 155, 254, 0.9);
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  background: rgba(79, 172, 254, 0.9);
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(0.8); 
    opacity: 0.7; 
  }
  50% { 
    transform: scale(1.2); 
    opacity: 1; 
  }
}

/* 优化过渡曲线 */
body.page-loading {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

body.page-loaded {
  opacity: 1;
}

body.page-leaving {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}