/* ═══════════════════════════════════════════════════════════════════════════
   SanNgachViral - Animations CSS
   Keyframes, transitions, and animation utilities
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── KEYFRAMES ──────────────────────────────────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes bar-fill {
  from { width: 0%; }
}

@keyframes scroll-wheel {
  0%   { transform: translateY(0); opacity: 1; }
  80%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes popup-in {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

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

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

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ─── ANIMATE ON LOAD ────────────────────────────────────────────────────── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: slide-up 0.7s cubic-bezier(0.16,1,0.3,1) forwards;
}

/* ─── SKELETON / SHIMMER ─────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ─── LOADING SPINNER ────────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ─── TOAST NOTIFICATION ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 40px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #f1f5f9;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slide-up 0.4s cubic-bezier(0.16,1,0.3,1) both;
  white-space: nowrap;
}
.toast--success { border-color: rgba(16,185,129,0.4); }
.toast--error   { border-color: rgba(239,68,68,0.4); }
.toast--info    { border-color: rgba(59,130,246,0.4); }
.toast.is-removing { animation: fade-in 0.3s ease reverse both; }

/* ─── PAGE TRANSITION ────────────────────────────────────────────────────── */
.page-transition {
  animation: fade-in 0.4s ease both;
}

/* ─── HOVER GLOW EFFECT ──────────────────────────────────────────────────── */
.hover-glow {
  transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 20px rgba(16,185,129,0.3);
}

/* ─── TYPING CURSOR ──────────────────────────────────────────────────────── */
.typing-cursor::after {
  content: '|';
  animation: blink 1s ease-in-out infinite;
  color: var(--clr-primary, #10b981);
}

/* ─── COUNTER ANIMATION ──────────────────────────────────────────────────── */
.counter-animated {
  animation: count-up 0.5s ease both;
}

/* ─── REDUCE MOTION ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-orb { display: none; }
}
