/* Custom CSS for ABHTOOL */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Tool Card Styles */
.tool-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.dark .tool-card {
    background: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
}

.dark .tool-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1e3a8a 0%, #581c87 100%);
}

.tool-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-card-image {
    transform: scale(1.05);
}

.tool-card-content {
    padding: 1.5rem;
}

.tool-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.dark .tool-card-title {
    color: #f9fafb;
}

.tool-card-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.dark .tool-card-description {
    color: #9ca3af;
}

.tool-card-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.badge-productivity {
    background: #dbeafe;
    color: #1e40af;
}

.dark .badge-productivity {
    background: #1e3a8a;
    color: #dbeafe;
}

.badge-design {
    background: #fce7f3;
    color: #9d174d;
}

.dark .badge-design {
    background: #831843;
    color: #fce7f3;
}

.badge-developer {
    background: #d1fae5;
    color: #065f46;
}

.dark .badge-developer {
    background: #064e3b;
    color: #d1fae5;
}

.badge-marketing {
    background: #fef3c7;
    color: #92400e;
}

.dark .badge-marketing {
    background: #78350f;
    color: #fef3c7;
}

.badge-utility {
    background: #e0e7ff;
    color: #3730a3;
}

.dark .badge-utility {
    background: #312e81;
    color: #e0e7ff;
}

/* Tool Card Actions */
.tool-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tool-card-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-preview {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-download {
    background: #10b981;
    color: white;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-rate {
    background: #f59e0b;
    color: white;
}

.btn-rate:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-favorite {
    background: #f3f4f6;
    color: #6b7280;
    flex: 0 0 auto;
}

.dark .btn-favorite {
    background: #374151;
    color: #9ca3af;
}

.btn-favorite:hover {
    background: #ef4444;
    color: white;
}

.btn-favorite.active {
    background: #ef4444;
    color: white;
}

.btn-share {
    background: #f3f4f6;
    color: #6b7280;
    flex: 0 0 auto;
}

.dark .btn-share {
    background: #374151;
    color: #9ca3af;
}

.btn-share:hover {
    background: #3b82f6;
    color: white;
}

/* Tool Stats */
.tool-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.dark .tool-stats {
    border-top-color: #374151;
}

.tool-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .tool-stat {
    color: #9ca3af;
}

.tool-stat i {
    width: 14px;
    height: 14px;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.125rem;
}

.rating-star {
    width: 16px;
    height: 16px;
    color: #fbbf24;
}

.rating-star.empty {
    color: #d1d5db;
}

.dark .rating-star.empty {
    color: #4b5563;
}

/* Category Filter Buttons */
.category-btn {
    transition: all 0.2s ease;
}

.category-btn:hover {
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

/* FAQ Accordion */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark .faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-answer {
    transition: all 0.3s ease;
}

/* Modal Styles */
.modal-overlay {
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    animation: slideIn 0.3s ease;
}

/* Star Rating in Modal */
.star-btn {
    transition: all 0.2s ease;
}

.star-btn:hover,
.star-btn.active {
    transform: scale(1.2);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 1000px 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-card {
        margin: 0 0.5rem;
    }
    
    .tool-card-actions {
        flex-direction: column;
    }
    
    .tool-card-btn {
        width: 100%;
    }
}

/* Ad Space */
.ad-space {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 2px dashed #d1d5db;
}

.dark .ad-space {
    background: linear-gradient(135deg, #374151, #4b5563);
    border-color: #6b7280;
}

/* Newsletter Form */
#newsletterForm input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

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

/* Hero Animation */
.hero-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 50%, #fef3c7 100%);
}

.dark .hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #581c87 50%, #78350f 100%);
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tool-card {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Toggle Animation */
#themeToggle {
    transition: transform 0.3s ease;
}

#themeToggle:hover {
    transform: rotate(180deg);
}

/* Mobile Menu Animation */
#mobileMenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.show {
    max-height: 500px;
}

/* Tool Card Image Container */
.tool-card-image-container {
    position: relative;
    overflow: hidden;
}

.tool-card-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1));
    pointer-events: none;
}

/* Search Input */
#searchInput {
    transition: all 0.3s ease;
}

#searchInput:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Statistics Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.5s ease-out;
}

/* Blog Card Hover Effect */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card-image {
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.1);
}

/* Footer Links */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Social Media Buttons */
.social-btn {
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-4px);
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
