/* Enhanced animations and transitions */
.keyword-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyword-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* View transition animations */
#grid-container, #cloud-container, #list-container {
    transition: opacity 0.3s ease-in-out;
}

/* Tag cloud hover effects */
#tag-cloud a {
    transition: all 0.2s ease;
}

#tag-cloud a:hover {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .grid {
        gap: 1rem;
    }

    .keyword-card {
        transform: none !important;
    }

    .keyword-card:hover {
        transform: translateY(-2px) !important;
    }

    #tag-cloud {
        text-align: center;
    }

    #tag-cloud a {
        margin: 0.25rem;
    }

    .text-4xl { font-size: 2rem; }
    .text-3xl { font-size: 1.75rem; }
    .text-2xl { font-size: 1.5rem; }
    .text-xl { font-size: 1.25rem; }
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.keyword-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Enhanced search input */
#keyword-search:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Category section hover effects */
.category-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

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

/* Smooth transitions for all interactive elements */
button, a, .keyword-card, .category-section {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
button:focus, a:focus, input:focus, select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Glass morphism effect for containers */
.bg-white {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
