/* ═══════════════════════════════════════════════════════════════
   RepuVerse AI — Animations & Transitions
   ═══════════════════════════════════════════════════════════════ */

/* ── Page entrance ── */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Fade in up (staggerable) ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp var(--dur-slow) var(--ease-out) both;
}

/* Stagger delays */
.delay-1 { animation-delay: 50ms; }
.delay-2 { animation-delay: 100ms; }
.delay-3 { animation-delay: 150ms; }
.delay-4 { animation-delay: 200ms; }
.delay-5 { animation-delay: 250ms; }
.delay-6 { animation-delay: 300ms; }
.delay-7 { animation-delay: 350ms; }
.delay-8 { animation-delay: 400ms; }

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

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

.slide-in-right {
  animation: slideInRight var(--dur-slow) var(--ease-out) both;
}

.slide-out-right {
  animation: slideOutRight var(--dur-normal) var(--ease-out) both;
}

/* ── Pulse (live indicator) ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

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

/* ── Live dot ── */
@keyframes liveDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, .5); }
  50%      { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
}

.live-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: var(--radius-full);
  animation: liveDot 2s ease-in-out infinite;
  display: inline-block;
}

/* ── Shimmer loading skeleton ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ── Card hover lift ── */
.card-lift {
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out);
}

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

/* ── Typing indicator dots ── */
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

.typing-indicator {
  display: flex; gap: 4px; align-items: center;
  padding: var(--sp-3) var(--sp-4);
}

.typing-indicator span {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: .15s; }
.typing-indicator span:nth-child(3) { animation-delay: .3s; }

/* ── Notification slide-in ── */
@keyframes notifSlide {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast {
  animation: notifSlide var(--dur-slow) var(--ease-spring) both;
}

/* ── Counter roll-up ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.count-up { animation: countUp var(--dur-slow) var(--ease-out) both; }

/* ── Spin (loading) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* ── Glow pulse ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50%      { box-shadow: 0 0 24px var(--accent-glow); }
}

.glow-pulse { animation: glowPulse 3s ease-in-out infinite; }

/* ── Scale in (modals) ── */
@keyframes scaleIn {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.scale-in { animation: scaleIn var(--dur-normal) var(--ease-spring) both; }

/* ── Progress bar fill ── */
@keyframes progressFill {
  from { width: 0; }
}

.progress-animate { animation: progressFill 1s var(--ease-out) both; }

/* ── Ripple effect ── */
@keyframes ripple {
  0%   { transform: scale(0); opacity: .4; }
  100% { transform: scale(4); opacity: 0; }
}
