/* Plugin Agent Marketplace - Main CSS */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Gradient Text Animation */
.gradient-text-animate {
    background-size: 200% auto;
    animation: gradient 3s linear infinite;
}

@keyframes gradient {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* Card Hover Effects */
.mechanism-card,
.category-card,
.plugin-card {
    transition: all 0.3s ease;
}

.mechanism-card:hover,
.category-card:hover,
.plugin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.3);
}

/* Counter Animation */
.counter {
    transition: all 0.3s ease;
}

/* Code Blocks */
code {
    font-family: 'JetBrains Mono', monospace;
}

pre code {
    display: block;
    padding: 1rem;
    overflow-x: auto;
}

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

::-webkit-scrollbar-track {
    background: #1F2937;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #818CF8;
}

/* Navigation Active State */
nav a.active {
    color: #6366F1;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}

#mobile-menu:not(.hidden) {
    max-height: 300px;
}

/* Pulse Animation for Live Indicator */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Table Styles */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table th,
table td {
    border-bottom: 1px solid #374151;
}

table tr:hover td {
    background-color: rgba(99, 102, 241, 0.1);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: rgba(99, 102, 241, 0.2);
    color: #818CF8;
}

.badge-secondary {
    background-color: rgba(139, 92, 246, 0.2);
    color: #A78BFA;
}

.badge-accent {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.badge-warning {
    background-color: rgba(251, 146, 60, 0.2);
    color: #FB923C;
}

/* Plugin Grid */
.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Search Input */
.search-input {
    background-color: #1F2937;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 3rem;
    width: 100%;
    color: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Filter Button */
.filter-btn {
    background-color: #1F2937;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #9CA3AF;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #6366F1;
    border-color: #6366F1;
    color: white;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.glow-accent {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mechanism-card,
    .category-card {
        padding: 1rem;
    }

    .mechanism-card .text-4xl,
    .category-card .text-3xl {
        font-size: 1.5rem;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #1F2937 25%, #374151 50%, #1F2937 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1F2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}
