/* Advanced Micro-Interactions and Animations */
/* DrawLeague - Artistic Studio Effects */

/* Enhanced Wiggle Animation for CTA Buttons */
@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg) translateX(0);
  }
  25% {
    transform: rotate(-1deg) translateX(-1px);
  }
  50% {
    transform: rotate(1deg) translateX(1px);
  }
  75% {
    transform: rotate(-1deg) translateX(-1px);
  }
}

/* Apply wiggle to high-priority CTAs on click/focus */
.btn-primary:active,
.btn-sketchy:active {
  animation: wiggle 0.3s ease-in-out;
}

/* Enhanced card hover effect - lift and rotate */
.card {
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.card:hover {
  transform: translateY(-2px) rotate(0.5deg);
}

/* Hover effect for gallery items */
.gallery-item {
  transition: all 200ms ease-in-out;
}

.gallery-item:hover {
  transform: scale(1.02) rotate(-0.5deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Enhanced navigation link hover */
header nav a:hover {
  transform: scaleX(1.05);
  transition: transform 0.2s ease;
}

/* Smooth transitions for form inputs */
input:focus,
textarea:focus,
select:focus {
  transform: scale(1.01);
  transition: all 0.2s ease;
}

/* Link hover animations */
a {
  position: relative;
}

/* Underline animation for text links */
a:not(.btn):not(.card):hover {
  color: var(--color-accent);
}

/* Button group spacing animation */
.btn-group .btn {
  margin: 0 var(--space-sm);
  transition: all 0.2s ease;
}

.btn-group .btn:hover {
  margin-left: calc(var(--space-sm) + 2px);
  margin-right: calc(var(--space-sm) - 2px);
}

/* Smooth fade-in for elements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.4s ease-out;
}

/* Smooth slide transitions */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.4s ease-out;
}

/* Pulse animation for notifications */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce animation for important elements */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* Smooth color transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: ease;
  transition-duration: 0.15s;
}

/* Prevent double transitions on interactive elements */
.btn,
a,
input,
textarea,
select {
  transition-duration: 0.2s;
}

/* Loading spinner animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

/* Enhanced footer link animation */
footer a {
  position: relative;
}

footer a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

footer a:hover::after {
  width: 100%;
}
