/* style.css */
:root {
    /* Light Theme Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* Dark Theme Colors */
body.dark-theme {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-left i {
    margin-right: 8px;
}

.top-bar-right a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: var(--transition);
}

.top-bar-right a:hover {
    opacity: 0.8;
}

/* Main Header */
.main-header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 20px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--primary-color);
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 500px;
}

.search-bar form {
    display: flex;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-bar button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    padding: 0 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.theme-toggle,
.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover,
.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

/* Main Navigation */
.main-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 78px;
    z-index: 999;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu > li > a i:first-child {
    font-size: 16px;
}

.nav-menu > li > a i.fa-chevron-down {
    font-size: 12px;
}

.nav-menu > li:hover > a,
.nav-menu > li.active > a {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding-left: 28px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Category Cards */
.categories-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 18px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--border-color);
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.category-icon i {
    font-size: 32px;
    color: white;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.tools-count {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
}

/* Tools Grid */
.tools-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-decoration: none;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.tool-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.tool-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.tool-stats i {
    margin-right: 4px;
}

.tool-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

/* Featured Banner */
.featured-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 60px 0;
    color: white;
    text-align: center;
}

.featured-banner h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.featured-banner p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary-color);
    padding: 12px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.newsletter-form button {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.footer-stats div {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-stats i {
    margin-right: 5px;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-bottom ul li a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom ul li a:hover {
    color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: var(--bg-primary);
    z-index: 2000;
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-mobile-nav {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
}

.mobile-nav-menu {
    list-style: none;
    padding: 20px;
}

.mobile-nav-menu li {
    margin-bottom: 16px;
}

.mobile-nav-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.mobile-nav-menu li a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-bar {
        max-width: 300px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        justify-content: center;
        text-align: center;
        gap: 10px;
    }
    
    .header-wrapper {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .categories-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .tool-card {
        padding: 16px;
    }
    
    .footer-stats {
        flex-wrap: wrap;
    }
}