/* Animaciones iOS */

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Slide Up */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

/* Scale In */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Pulse */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 1s infinite;
}

/* Bounce */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.bounce {
  animation: bounce 1s;
}

/* Rotate */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* Shake */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s;
}

/* Loading Spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ios-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ios-border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ios-spinner-large {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* Progress Bar Animation */
@keyframes progressStripes {
  0% {
    background-position: 40px 0;
  }
  100% {
    background-position: 0 0;
  }
}

.ios-progress-animated .ios-progress-bar {
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progressStripes 1s linear infinite;
}

/* Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(107, 58, 160, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
  animation: ripple 0.4s ease-out;
}

/* Card Flip */
@keyframes cardFlip {
  0% {
    transform: perspective(1000px) rotateY(0);
  }
  100% {
    transform: perspective(1000px) rotateY(180deg);
  }
}

.card-flip {
  animation: cardFlip 0.6s;
}

/* Slide Down */
@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

.slide-down {
  animation: slideDown 0.3s ease-out;
}

/* Notification Badge Animation */
@keyframes badgePop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.badge-pop {
  animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Logo Animation */
@keyframes logoReveal {
  0% {
    transform: scale(0.3) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.logo-reveal {
  animation: logoReveal 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Lion Walking Animation */
@keyframes lionWalk {
  0%, 100% {
    transform: translateX(0) scaleX(1);
  }
  25% {
    transform: translateX(10px) scaleX(1);
  }
  50% {
    transform: translateX(20px) scaleX(-1);
  }
  75% {
    transform: translateX(10px) scaleX(-1);
  }
}

.lion-walk {
  animation: lionWalk 4s ease-in-out infinite;
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--primary-color);
  animation: typing 3s steps(30, end), blink 0.75s step-end infinite;
}

/* Success Check Animation */
@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--success-color);
  fill: none;
  animation: checkmark 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmark 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

/* Parallax Scroll */
.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-element {
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Swipe Hint */
@keyframes swipeHint {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateX(-20px);
    opacity: 1;
  }
}

.swipe-hint {
  animation: swipeHint 2s ease-in-out infinite;
}

/* Glow Effect */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--primary-color);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
  }
  100% {
    box-shadow: 0 0 5px var(--primary-color);
  }
}

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

/* Transition Classes */
.transition-all {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.transition-transform {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.transition-opacity {
  transition: opacity 0.3s ease-in-out;
}

.transition-colors {
  transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

/* Page Transitions */
.page-enter {
  animation: slideInRight 0.3s ease-out;
}

.page-exit {
  animation: slideOutLeft 0.3s ease-in;
}

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

/* iOS Spring Physics */
.ios-spring-bounce {
  animation: springBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes springBounce {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.2);
  }
  40% {
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.1);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(107, 58, 160, 0.2);
}