/* New UI Animation Styles */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.99);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes aurora {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.4;
  }

  50% {
    transform: translate(-2%, 2%) rotate(2deg);
    opacity: 0.6;
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.4;
  }
}

@keyframes blob {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

.animate-fadeInDown {
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fadeIn {
  animation: fadeIn 0.15s ease-out;
}

.animate-aurora {
  animation: aurora 20s infinite alternate linear;
}

.animate-blob {
  animation: blob 10s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Slide in from right animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slideInRight {
  animation: slideInRight 0.3s ease-out;
}

/* Gradient Flow Animation - 渐变流动效果 */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient-flow {
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
}

/* Page Transition Animation - 页面切换动画 */
/* 注意：不可使用 transform，因为子组件中有 fixed 定位元素（如 StoryboardStageShell 的悬浮按钮），
   transform 会创建新的 containing block 导致 fixed 失效并产生跳动 */
@keyframes pageSlideIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pageSlideOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.animate-page-enter {
  animation: pageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-page-exit {
  animation: pageSlideOut 0.3s ease-out forwards;
}

/* Shimmer effect for gradient text */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

.animate-shimmer {
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}
