/* ============================================================
   INFLUENCER BOOSTERX — ANIMATIONS CSS
   Keyframes, transitions, micro-interactions
   ============================================================ */

/* --- Keyframes --- */
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

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

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

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.15); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(168,85,247,0.2); }
  50%       { box-shadow: 0 0 40px rgba(168,85,247,0.5), 0 0 60px rgba(6,182,212,0.2); }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(60px) scale(0.95); }
}

@keyframes barGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

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

@keyframes spinGlow {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40%            { transform: scale(1.2); opacity: 1; }
}

@keyframes cardEntrance {
  0%   { opacity: 0; transform: translateY(20px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lineDrawLeft {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes progressGrow {
  from { width: 0; }
}

/* --- Utility Animation Classes --- */
.animate-fadeIn      { animation: fadeIn 0.4s ease forwards; }
.animate-fadeInUp    { animation: fadeInUp 0.45s cubic-bezier(0.4,0,0.2,1) forwards; }
.animate-fadeInDown  { animation: fadeInDown 0.4s ease forwards; }
.animate-slideRight  { animation: slideInRight 0.45s cubic-bezier(0.4,0,0.2,1) forwards; }
.animate-slideLeft   { animation: slideInLeft 0.45s cubic-bezier(0.4,0,0.2,1) forwards; }
.animate-scaleIn     { animation: scaleIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* Stagger delays for children */
.stagger-children > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2)  { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4)  { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6)  { animation-delay: 0.30s; }
.stagger-children > *:nth-child(7)  { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8)  { animation-delay: 0.40s; }
.stagger-children > *:nth-child(n+9) { animation-delay: 0.45s; }

/* Page transition */
.page-enter {
  animation: fadeInUp 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

/* --- Shimmer Loading --- */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-glass-strong) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* --- Glow Effects --- */
.glow-purple { animation: glowPulse 3s ease-in-out infinite; }
.glow-card { box-shadow: 0 0 30px rgba(168,85,247,0.12); }
.glow-card:hover { box-shadow: 0 0 40px rgba(168,85,247,0.22), var(--shadow-md); }

/* --- Chart Animations --- */
.chart-bar-animated {
  animation: barGrow 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
}

.chart-line-animated {
  stroke-dasharray: 1000;
  animation: drawLine 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* --- Hover Lift --- */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* --- Hover Glow --- */
.hover-glow {
  transition: box-shadow var(--transition-base);
}
.hover-glow:hover { box-shadow: var(--shadow-glow-purple); }

/* --- Floating Action --- */
.float-action {
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}
.float-action:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(168,85,247,0.4);
}
.float-action:active { transform: scale(0.96); }

/* --- Gradient Border Animated --- */
.grad-border-animated {
  position: relative;
}
.grad-border-animated::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #a855f7, #06b6d4, #ec4899, #a855f7);
  background-size: 300% 300%;
  animation: shimmer 3s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.grad-border-animated:hover::before { opacity: 1; }

/* --- Number Counter --- */
.counter-animate { animation: countUp 0.5s ease both; }

/* --- Loading Spinner --- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--purple-500);
  border-radius: 50%;
  animation: spinGlow 0.7s linear infinite;
}

/* --- Skeleton Loaders --- */
.skeleton {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  position: relative; overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg, transparent 25%, var(--bg-glass-strong) 50%, transparent 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-text { height: 14px; width: 80%; margin-bottom: 8px; }
.skeleton-text.short { width: 50%; }
.skeleton-text.long { width: 95%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-rect { border-radius: var(--radius-md); }

/* --- Notification Bounce --- */
.notif-dot {
  animation: pulse 2s ease-in-out infinite;
}

/* --- Ripple Effect --- */
.ripple {
  position: relative; overflow: hidden;
}
.ripple-wave {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0); animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* --- Progress Bar Animation --- */
.progress-bar-fill { animation: progressGrow 1s cubic-bezier(0.4,0,0.2,1) both; }

/* --- Connected Status Glow --- */
.status-glow-green {
  box-shadow: 0 0 12px rgba(52,211,153,0.5);
  animation: glowGreen 2s ease-in-out infinite alternate;
}
@keyframes glowGreen {
  from { box-shadow: 0 0 8px rgba(52,211,153,0.3); }
  to   { box-shadow: 0 0 20px rgba(52,211,153,0.7); }
}

/* --- Star Rating --- */
.star-fill { animation: scaleIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both; }

/* --- Gradient Text Shimmer --- */
.gradient-text-animate {
  background: linear-gradient(90deg, #a855f7, #06b6d4, #ec4899, #a855f7);
  background-size: 300% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

/* --- Card Entrance with Stagger --- */
.card-entrance { opacity: 0; animation: cardEntrance 0.5s cubic-bezier(0.4,0,0.2,1) forwards; }

/* --- Quick Pulse on Hover --- */
.pulse-on-hover:hover { animation: pulse 0.6s ease-in-out; }

/* --- Platform Icon Spin --- */
.icon-spin { transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1); }
.icon-spin:hover { transform: rotate(15deg) scale(1.1); }
