/* Custom styles for GlideToolHub */

/* Custom TailwindCSS configuration */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom animations and effects */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }
  50% { box-shadow: 0 0 30px rgba(6, 182, 212, 0.6); }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Utility classes */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out forwards;
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

.animate-fade-in-scale {
  animation: fadeInScale 0.5s ease-out forwards;
}

.animate-bounce-in {
  animation: bounceIn 0.8s ease-out forwards;
}

/* Category button styles */
.category-btn {
  transition: all 0.3s ease;
}

.category-btn.active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Search input focus styles */
#tool-search:focus {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Statistics counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-counter {
  animation: countUp 0.8s ease-out forwards;
  animation-delay: calc(var(--delay) * 0.1s);
}

/* Tool card hover effects */
.tool-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
  transition: left 0.5s;
}

.tool-card:hover::before {
  left: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.7);
}

/* Mobile menu animation */
#mobile-menu {
  transition: all 0.3s ease-in-out;
  transform: translateY(-100%);
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
}

#mobile-menu.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tool-card {
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 3rem !important;
  }

  .hero-section {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
}

/* Loading animation */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-radius: 50%;
  border-top-color: #06b6d4;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .tool-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  nav,
  footer {
    display: none !important;
  }
}
