/* animations.css */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

/* Transitions */
.tool-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.1);
}

/* Error message */
.error-message {
  background: #FEE2E2;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 8px 0;
  animation: fadeIn 0.3s ease-out;
}

/* Success message */
.success-message {
  background: #D1FAE5;
  color: #065F46;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 8px 0;
  animation: fadeIn 0.3s ease-out;
}

/* Result content */
.result-content {
  animation: slideInUp 0.3s ease-out;
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Button states */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Page transitions */
.page-container {
  animation: fadeIn 0.5s ease-out;
}

/* Hero section animations */
.hero-content > * {
  opacity: 0;
}

.hero-title {
  animation: slideInUp 0.8s ease-out forwards;
}

.hero-description {
  animation: slideInUp 0.8s ease-out 0.2s forwards;
}

.hero-cta {
  animation: slideInUp 0.8s ease-out 0.4s forwards;
}

/* Feature and Tool animations */
.feature-card,
.tool-card {
  opacity: 0;
  animation: slideInUp 0.6s ease-out forwards;
}

.tools-grid {
  animation: fadeIn 0.5s ease-out;
}

/* Stats animations */
.stat-card {
  opacity: 0;
  animation: scaleIn 0.6s ease-out forwards;
}

.stat-number {
  animation: pulse 2s ease-in-out infinite;
}

/* Intersection Observer animations */
.fade-in:not(.visible),
.slide-up:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
}

.fade-in.visible,
.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}