/**
 * ============================================
 * 动画效果库 (Animations)
 * ============================================
 * 
 * 学生管理模块动画系统
 * 复制自 special-education 标杆
 * 
 * @author 廖斌
 * @version 1.0.0
 * @date 2026-03-18
 */

/* ==================== 入场动画 ==================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.animate-slideInDown { animation: slideInDown 0.6s ease-out; }

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

.animate-slideInUp { animation: slideInUp 0.6s ease-out; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.animate-scaleIn { animation: scaleIn 0.6s ease-out; }

/* ==================== 延迟入场 ==================== */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* ==================== 悬停动画 ==================== */

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover { transform: scale(1.05); }

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover { box-shadow: var(--shadow-glow-primary-lg); }

/* ==================== 加载动画 ==================== */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin { animation: spin 1s linear infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ==================== 响应式动画控制 ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .hover-lift:hover, .hover-scale:hover { transform: none; }
}
