/* 页面转场动画样式 */

/* 页面加载动画 */
body {
  animation: pageIn 0.6s ease-out;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 页面转场遮罩 */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-transition.active {
  opacity: 1;
  visibility: visible;
}

/* 转场动画内容 */
.transition-content {
  text-align: center;
  color: white;
}

.transition-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.transition-logo svg {
  width: 100%;
  height: 100%;
}

.transition-logo .logo-ring {
  fill: none;
  stroke: white;
  stroke-width: 2;
  opacity: 0.3;
  animation: pulse-ring 2s ease-in-out infinite;
}

.transition-logo .logo-center {
  fill: none;
  stroke: white;
  stroke-width: 2;
  opacity: 0.6;
  animation: pulse-ring 2s ease-in-out infinite 0.3s;
}

.transition-logo .logo-dot {
  fill: white;
  animation: pulse-dot-white 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

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

.transition-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.transition-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* 加载进度条 */
.transition-progress {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}

.transition-progress-bar {
  height: 100%;
  background: white;
  border-radius: 3px;
  animation: progressBar 1s ease-in-out infinite;
  transform-origin: left;
}

@keyframes progressBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* 页面淡出效果 */
body.page-fade-out {
  animation: pageOut 0.4s ease-in forwards;
}

@keyframes pageOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* 轻量级转场（快速切换） */
.page-transition.quick {
  background: rgba(155, 89, 244, 0.95);
}

.page-transition.quick .transition-content {
  animation: quickFade 0.3s ease-in-out;
}

@keyframes quickFade {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(0.95);
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .transition-logo {
    width: 60px;
    height: 60px;
  }
  
  .transition-text {
    font-size: 1.2rem;
  }
  
  .transition-progress {
    width: 150px;
  }
}
