/* ==========================================================================
   VIBRA - Animations & Micro-Interactions
   ========================================================================== */

/* Brand Pulse Waves */
@keyframes vibraPulseRing {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.6), 0 0 0 0 rgba(186, 40, 230, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 16px rgba(255, 51, 102, 0), 0 0 0 28px rgba(186, 40, 230, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(255, 51, 102, 0), 0 0 0 0 rgba(186, 40, 230, 0);
  }
}

@keyframes waveOscillate {
  0%, 100% {
    transform: scaleY(0.4);
  }
  50% {
    transform: scaleY(1);
  }
}

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

/* Card Swipe Keyframes */
@keyframes swipeRightAnim {
  to {
    transform: translate3d(140%, 40px, 0) rotate(25deg);
    opacity: 0;
  }
}

@keyframes swipeLeftAnim {
  to {
    transform: translate3d(-140%, 40px, 0) rotate(-25deg);
    opacity: 0;
  }
}

@keyframes swipeUpAnim {
  to {
    transform: translate3d(0, -140%, 0) scale(1.08);
    opacity: 0;
  }
}

@keyframes cardEnterAnim {
  from {
    transform: scale(0.94) translateY(18px);
    opacity: 0.7;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes cardUndoAnim {
  from {
    transform: translate3d(-120%, -30px, 0) rotate(-20deg);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
}

/* Match Celebration Animations */
@keyframes matchPopIn {
  0% {
    transform: scale(0.6) rotate(-8deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.08) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes avatarOverlapLeft {
  0% {
    transform: translateX(-80px) rotate(-15deg);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(-6deg);
    opacity: 1;
  }
}

@keyframes avatarOverlapRight {
  0% {
    transform: translateX(80px) rotate(15deg);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(6deg);
    opacity: 1;
  }
}

@keyframes matchGlow {
  0%, 100% {
    filter: drop-shadow(0 0 15px rgba(255, 51, 102, 0.5)) drop-shadow(0 0 35px rgba(0, 242, 254, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(255, 51, 102, 0.8)) drop-shadow(0 0 55px rgba(0, 242, 254, 0.7));
  }
}

/* Screen and Modal Transitions */
@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

@keyframes scaleInModal {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Audio Wave Bar Animation */
.wave-bar {
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--brand-accent);
  border-radius: 2px;
  animation: waveOscillate 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; height: 22px; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; height: 12px; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; height: 26px; }
.wave-bar:nth-child(5) { animation-delay: 0.3s; height: 18px; }

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

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }
