/* ==========================================
   动画关键帧与过渡效果
   ========================================== */

/* 弹跳动画 */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* 浮动动画 */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 旋转动画 */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* SVG绘制动画 */
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* 脉冲发光 */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 107, 53, 0);
  }
}

/* 摇晃动画 */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* 淡入上浮 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 淡入 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 缩放弹出 */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 应用动画类 */
.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 3s ease-in-out infinite;
  animation-delay: 1s;
}

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

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-wiggle {
  animation: wiggle 2s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-pop-in {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 延迟类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* GSAP 动画会在触发时自行控制 opacity，
   这里不预设 opacity: 0，避免动画未触发时内容不可见 */

/* 手绘虚线连接 */
.dashed-line {
  stroke-dasharray: 8 4;
  stroke: var(--stroke);
  stroke-width: 2;
  fill: none;
  opacity: 0.4;
}

/* 按钮通用过渡 */
.btn, .btn-primary, .btn-secondary {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 图标hover旋转放大 */
.icon-hover {
  transition: transform 0.3s ease;
}

.icon-hover:hover {
  transform: rotate(5deg) scale(1.1);
}

/* 区块hover上浮 */
.lift-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lift-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
