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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #F9FAFB;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E40AF;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    background: #FFFFFF;
}

.search-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #3B82F6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.search-btn:hover {
    background: #1E40AF;
    transform: translateY(-50%) scale(1.02);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.submit-tool-btn {
    background: #22C55E;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.submit-tool-btn:hover {
    background: #16A34A;
    transform: scale(1.02);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.main-nav {
    display: flex;
    justify-content: center;
    padding: 1rem 2rem;
    border-top: 1px solid #e5e7eb;
    gap: 2rem;
}

.nav-item {
    text-decoration: none;
    color: #6B7280;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.nav-item:hover {
    color: #1E40AF;
    background: rgba(59, 130, 246, 0.05);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: #3B82F6;
    transition: transform 0.2s ease-in-out;
}

.nav-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #5B21B6 0%, #1E40AF 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #EAB308;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.cta-primary, .cta-secondary {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    font-size: 1rem;
}

.cta-primary {
    background: white;
    color: #1E40AF;
    border: none;
}

.cta-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cta-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.cta-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Categories Grid */
.categories-grid {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #111827;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    border: 1px solid #E5E7EB;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3B82F6;
    text-decoration: none;
    color: inherit;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.category-card * {
    text-decoration: none !important;
}

a.category-card,
a.category-card:hover,
a.category-card:visited,
a.category-card:focus,
a.category-card:active {
    text-decoration: none !important;
    color: inherit !important;
}

.category-card p {
    font-weight: 600;
    color: #3B82F6;
    margin-bottom: 0.5rem;
}

.category-desc {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Featured Tools */
.featured-tools, .trending-tools {
    padding: 4rem 0;
    background: #f9fafb;
}

.trending-tools {
    background: white;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    border: 1px solid #E5E7EB;
}

.tool-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3B82F6;
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 1rem;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tool-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: #111827;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stars {
    color: #EAB308;
}

.rating-text {
    font-size: 0.9rem;
    color: #6b7280;
}

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

.tool-features {
    margin-bottom: 1rem;
}

.features-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #22C55E;
    margin-bottom: 0.5rem;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: #ecfdf5;
    color: #065f46;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-comparison {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.comparison-text {
    color: #92400e;
    font-weight: 500;
}

.tool-actions {
    display: flex;
    gap: 0.75rem;
}

.visit-btn {
    flex: 1;
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.visit-btn:hover {
    background: #1d4ed8;
}

.save-btn, .share-btn {
    background: #f3f4f6;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.save-btn:hover, .share-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto 1rem;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
}

.newsletter-form button {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #059669;
}

.newsletter-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #f9fafb;
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #d1d5db;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .search-container {
        margin: 0 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
        max-width: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid, .featured-tools, .trending-tools {
        padding: 2rem 0;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
button:focus, input:focus, a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
