/* ============================================
   VISION TV v2.0 — ANIMATIONS
   Micro-interactions & Transitions
   ============================================ */

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

/* ============================================
   CARD ENTRANCE (staggered)
   ============================================ */
.animate-cards .section-card,
.animate-cards .product-card,
.animate-cards .profile-card {
  animation: fadeInUp 0.4s ease backwards;
}

.animate-cards > :nth-child(1) { animation-delay: 0.03s; }
.animate-cards > :nth-child(2) { animation-delay: 0.06s; }
.animate-cards > :nth-child(3) { animation-delay: 0.09s; }
.animate-cards > :nth-child(4) { animation-delay: 0.12s; }
.animate-cards > :nth-child(5) { animation-delay: 0.15s; }
.animate-cards > :nth-child(6) { animation-delay: 0.18s; }
.animate-cards > :nth-child(7) { animation-delay: 0.21s; }
.animate-cards > :nth-child(8) { animation-delay: 0.24s; }
.animate-cards > :nth-child(9) { animation-delay: 0.27s; }
.animate-cards > :nth-child(10) { animation-delay: 0.30s; }
.animate-cards > :nth-child(11) { animation-delay: 0.33s; }
.animate-cards > :nth-child(12) { animation-delay: 0.36s; }

/* ============================================
   LIKE ANIMATION (heart burst)
   ============================================ */
@keyframes heartBurst {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.like-anim {
  animation: heartBurst 0.4s var(--ease-spring);
}

/* ============================================
   GOLD GLOW PULSE
   ============================================ */
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(212, 175, 55, 0.2); }
  50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }
}

.glow-pulse {
  animation: goldPulse 2s ease infinite;
}

/* ============================================
   CONFETTI (purchase/membership celebration)
   ============================================ */
@keyframes confettiFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiFall 3s ease forwards;
}

/* ============================================
   NOTIFICATION BELL SHAKE
   ============================================ */
@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(15deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
}

.bell-shake {
  animation: bellShake 0.6s ease;
}

/* ============================================
   TYPING INDICATOR (chat)
   ============================================ */
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: var(--space-sm);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: var(--radius-full);
  animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ============================================
   PROGRESS BAR
   ============================================ */
@keyframes progressFill {
  from { width: 0; }
}

.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 2px;
  animation: progressFill 0.6s ease;
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-full);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
