:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;

    --text-main: #111827;
    --text-muted: #6b7280;

    --border: #e5e7eb;
    --background: #ffffff;
    --background-soft: #f9fafb;

    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
    color: var(--text-main);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

/* Navbar */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 750;
    letter-spacing: -0.7px;
    color: var(--text-main);
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--primary);
    border-radius: 11px;
    font-size: 1.2rem;
}

.navbar .nav-link {
    color: #4b5563;
    font-weight: 500;
    font-size: 0.94rem;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: var(--primary);
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-button:hover {
    color: #fff;
    background: var(--primary-hover);
}

/* Hero */

.hero {
    padding: 90px 0 65px;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(79, 70, 229, 0.09),
            transparent 58%
        ),
        #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    margin-bottom: 25px;
    color: #4338ca;
    background: var(--primary-light);
    border: 1px solid #e0e7ff;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
}

.hero-badge i {
    font-size: 0.95rem;
}

.hero h1 {
    max-width: 800px;
    margin: 0 auto 22px;
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -2.8px;
}

.hero h1 span {
    color: var(--primary);
}

.hero-description {
    max-width: 610px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Search */

.search-wrapper {
    max-width: 590px;
    margin: 35px auto 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 19px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-box > i {
    color: #9ca3af;
    font-size: 1.2rem;
}

.search-box input {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: none;
    color: var(--text-main);
    background: transparent;
    font-size: 0.95rem;
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-button {
    padding: 11px 20px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.search-button:hover {
    background: var(--primary-hover);
}

.search-hint {
    margin-top: 14px;
    color: #9ca3af;
    font-size: 0.82rem;
}

/* Categories */

.category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.category-button {
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: #fff;
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
}

.category-button:hover,
.category-button.active {
    color: var(--primary);
    border-color: #c7d2fe;
    background: var(--primary-light);
}

/* Tools section */

.tools-section {
    padding: 65px 0 90px;
    background: var(--background-soft);
    border-top: 1px solid #f3f4f6;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-weight: 750;
    letter-spacing: -0.8px;
}

.section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tool-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Tool cards */

.tool-card {
    height: 100%;
    padding: 25px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: #c7d2fe;
    box-shadow: 0 12px 35px rgba(17, 24, 39, 0.07);
}

.tool-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.tool-card-link:hover {
    color: inherit;
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 22px;
    border-radius: 13px;
    font-size: 1.5rem;
}

.icon-purple {
    color: #5b4be8;
}

.icon-green {
    color: #059669;
    background: #d1fae5;
}

.icon-blue {
    color: #2563eb;
    background: #dbeafe;
}

.icon-orange {
    color: #ea580c;
    background: #ffedd5;
}

.icon-pink {
    color: #db2777;
    background: #fce7f3;
}

.icon-cyan {
    color: #0891b2;
    background: #cffafe;
}

.tool-category {
    display: inline-block;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.tool-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.tool-card p {
    min-height: 48px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 650;
}

.tool-link i {
    transition: transform 0.2s;
}

.tool-card:hover .tool-link i {
    transform: translateX(4px);
}

.tool-card-link:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
    border-radius: var(--radius);
}

/* No results */

.no-results {
    padding: 45px 20px;
    text-align: center;
    color: var(--text-muted);
}

.no-results i {
    display: block;
    margin-bottom: 15px;
    color: #9ca3af;
    font-size: 2rem;
}

.no-results h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Bottom CTA */

.bottom-cta {
    padding: 65px 0;
    background: #fff;
}

.cta-box {
    padding: 45px 30px;
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    background:
        radial-gradient(
            ellipse at top right,
            rgba(79, 70, 229, 0.08),
            transparent 55%
        ),
        #f8faff;
    text-align: center;
}

.cta-box h2 {
    margin-bottom: 12px;
    font-size: 1.8rem;
    font-weight: 750;
    letter-spacing: -0.8px;
}

.cta-box p {
    max-width: 540px;
    margin: 0 auto 23px;
    color: var(--text-muted);
    line-height: 1.8;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.2s;
}

.primary-button:hover {
    color: #fff;
    background: var(--primary-hover);
}

/* Footer */

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-brand {
    color: var(--text-main);
    font-weight: 750;
    letter-spacing: -0.4px;
}

.footer-copy {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.83rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 22px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.87rem;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive */

@media (max-width: 767.98px) {
    .hero {
        padding: 65px 0 50px;
    }

    .hero h1 {
        letter-spacing: -1.7px;
    }

    .hero-description {
        font-size: 1rem;
    }

    .tools-section {
        padding: 48px 0 60px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 10px;
    }

    .tool-card {
        padding: 21px;
    }

    .tool-card p {
        min-height: auto;
    }

    .cta-box {
        padding: 35px 22px;
    }

    .footer-links {
        justify-content: start;
        margin-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
