/* ========================================
   AI Tools Directory — Custom Styles
   ======================================== */

/* Dark mode transitions */
html { scroll-behavior: smooth; }
body { transition: background-color 0.3s ease, color 0.3s ease; }

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
.dark ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Glassmorphism card variant */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.dark .glass {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated gradient background */
.gradient-bg {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtle float animation */
.float-animation {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Pulse glow effect */
.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.6); }
}

/* Card hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.dark .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Line clamp utilities */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Prose dark mode overrides */
.dark .prose { color: #cbd5e1; }
.dark .prose h1, .dark .prose h2, .dark .prose h3, .dark .prose h4 { color: #f1f5f9; }
.dark .prose a { color: #818cf8; }
.dark .prose strong { color: #f1f5f9; }
.dark .prose code { color: #e2e8f0; background: #334155; }
.dark .prose blockquote { border-left-color: #475569; color: #94a3b8; }

/* Screenshot lightbox */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.9);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 12px; }

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}
.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}
@keyframes skeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Focus ring */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    header, footer, nav, .no-print, #newsletter { display: none !important; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
}
