/* Smooth card transitions and extra polish */
.tool-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 30px -12px rgba(79, 70, 229, 0.15);
  border-color: #c7d2fe;
}

.tool-card a {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  transition: all 0.2s ease;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
  border-radius: 0.75rem;
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.6rem 0;
}

.tool-card a:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 8px 15px rgba(79, 70, 229, 0.3);
  transform: scale(1.02);
}

.tool-card a i {
  transition: transform 0.2s;
}

.tool-card a:hover i {
  transform: translateX(4px);
}

/* Category badge inside cards */
.category-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.9rem;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  margin-bottom: 0.75rem;
  border: 1px solid #e0e7ff;
}

/* Category cards on homepage */
.category-card {
  background: white;
  border-radius: 1.25rem;
  padding: 1.5rem 0.5rem;
  text-align: center;
  border: 1px solid #f0f0f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.02);
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: calc(var(--order) * 0.05s);
}

.category-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: #a5b4fc;
  box-shadow: 0 15px 25px -8px rgba(79, 70, 229, 0.15);
}

.category-card i {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
  transition: transform 0.3s;
  display: inline-block;
}

.category-card:hover i {
  transform: scale(1.1) rotate(3deg);
}

/* Individual icon colors */
.category-card[data-category="Writing"] i { color: #3b82f6; }
.category-card[data-category="Image"] i { color: #8b5cf6; }
.category-card[data-category="Video"] i { color: #ec4899; }
.category-card[data-category="Coding"] i { color: #10b981; }
.category-card[data-category="Chatbot"] i { color: #f59e0b; }
.category-card[data-category="Voice"] i { color: #6366f1; }
.category-card[data-category="Marketing"] i { color: #ef4444; }
.category-card[data-category="Design"] i { color: #14b8a6; }
.category-card[data-category="Education"] i { color: #a855f7; }
.category-card[data-category="Research"] i { color: #6b7280; }
.category-card[data-category="Productivity"] i { color: #06b6d4; }
.category-card[data-category="Automation"] i { color: #f97316; }

.category-card h3 {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.category-card p {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}

/* Hero gradient animation */
.hero-gradient {
  background: linear-gradient(-45deg, #f0f9ff, #e0f2fe, #ede9fe, #fae8ff);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating animation for hero icons */
.floating {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* Fade up animation */
.fade-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.delay-200 {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slow pulse for search bar */
.animate-pulse-slow {
  animation: pulseSlow 3s infinite;
}

@keyframes pulseSlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1); }
}

/* Gradient text animation */
.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Underline animation for nav */
nav a {
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #818cf8;
  transition: width 0.2s ease;
}
nav a:hover::after {
  width: 100%;
}

/* Button active scale */
button:active {
  transform: scale(0.95);
}

/* Newsletter section gradient */
.newsletter-gradient {
  background: linear-gradient(120deg, #f0f9ff 0%, #f5f3ff 100%);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .category-card {
    padding: 1rem 0.25rem;
  }
  .category-card i {
    font-size: 1.8rem;
  }
}