* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f7f8fc;
    color: #171717;
}


/* HEADER */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 7%;

    background: white;

    border-bottom: 1px solid #eee;
}

.logo {
    font-size: 25px;
    font-weight: 800;
}

nav a {
    text-decoration: none;
    color: #444;
    margin-left: 25px;
    font-size: 14px;
}

nav a:hover {
    color: #000;
}


/* HERO */

.hero {
    background: white;
    text-align: center;
    padding: 85px 20px 75px;
}

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

.badge {
    display: inline-block;

    padding: 7px 13px;

    background: #f1f1f1;

    border-radius: 20px;

    font-size: 13px;

    margin-bottom: 20px;
}

.hero h1 {
    font-size: 52px;
    line-height: 1.1;
    margin: 0;
}

.hero h1 span {
    display: block;
}

.hero p {
    max-width: 600px;

    margin: 20px auto 30px;

    color: #666;

    font-size: 18px;

    line-height: 1.6;
}


/* SEARCH */

.search-box {
    max-width: 620px;

    margin: auto;

    display: flex;

    align-items: center;

    gap: 10px;

    background: white;

    border: 1px solid #ddd;

    border-radius: 10px;

    padding: 5px 15px;

    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

.search-box span {
    font-size: 18px;
}

.search-box input {
    border: none;

    outline: none;

    width: 100%;

    padding: 13px;

    font-size: 15px;
}


/* SECTION */

.section {
    max-width: 1200px;

    margin: auto;

    padding: 70px 20px;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading small {
    font-size: 12px;

    font-weight: bold;

    letter-spacing: 2px;

    color: #777;
}

.section-heading h2 {
    margin: 7px 0;

    font-size: 32px;
}


/* POPULAR */

.popular-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;
}

.popular-card {
    text-decoration: none;

    color: #222;

    background: white;

    padding: 24px;

    border-radius: 12px;

    border: 1px solid #eee;

    transition: 0.2s;
}

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

    box-shadow:
        0 8px 25px rgba(0,0,0,0.08);
}

.popular-card div {
    font-size: 30px;
}

.popular-card h3 {
    margin: 15px 0 7px;
}

.popular-card p {
    margin: 0;

    color: #777;

    font-size: 13px;
}


/* CATEGORY BUTTONS */

.category-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 30px;
}

.category-buttons button {
    width: auto;

    background: white;

    color: #333;

    border: 1px solid #ddd;

    padding: 10px 17px;

    border-radius: 8px;
}

.category-buttons button:hover {
    background: #222;

    color: white;
}


/* TOOL GRID */

.tool-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


/* TOOL CARD */

.tool-card {
    background: white;

    padding: 23px;

    border-radius: 13px;

    border: 1px solid #eee;

    box-shadow:
        0 3px 12px rgba(0,0,0,0.04);
}

.tool-icon {
    font-size: 32px;

    margin-bottom: 10px;
}

.tool-card h3 {
    margin: 5px 0 8px;
}

.tool-card p {
    color: #666;

    font-size: 14px;

    line-height: 1.5;
}


/* INPUTS */

input,
textarea {
    width: 100%;

    padding: 12px;

    margin: 6px 0;

    border: 1px solid #ddd;

    border-radius: 7px;

    font-family: inherit;
}

textarea {
    min-height: 100px;

    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;

    border-color: #777;
}


/* BUTTON */

.tool-card button {
    width: 100%;

    padding: 11px;

    margin-top: 8px;

    border: none;

    border-radius: 7px;

    background: #222;

    color: white;

    cursor: pointer;
}

.tool-card button:hover {
    opacity: 0.85;
}

.tool-card .secondary {
    background: #777;
}


/* RESULT */

.result {
    margin-top: 10px;

    padding: 10px;

    background: #f3f4f6;

    border-radius: 7px;

    font-size: 13px;
}


/* IMAGE PREVIEW */

.image-box {
    background: #f4f4f4;

    padding: 10px;

    margin-top: 10px;

    border-radius: 8px;

    text-align: center;
}

.image-box img {
    max-width: 100%;

    max-height: 200px;

    display: block;

    margin: auto auto 8px;
}


/* QR */

.qr-result {
    text-align: center;

    margin-top: 15px;
}


/* AI */

.ai-card {
    border-top: 4px solid #222;
}


/* ABOUT */

.about {
    max-width: 850px;

    margin: auto;

    padding: 70px 20px;

    text-align: center;
}

.about h2 {
    font-size: 30px;
}

.about p {
    color: #666;

    line-height: 1.8;
}


/* FOOTER */

footer {
    background: #171717;

    color: white;

    text-align: center;

    padding: 45px 20px;
}

.footer-logo {
    font-size: 24px;

    font-weight: bold;
}

footer p {
    color: #bbb;

    font-size: 13px;
}

.footer-links {
    margin: 20px 0;
}

.footer-links a {
    color: #ddd;

    text-decoration: none;

    margin: 0 10px;

    font-size: 13px;
}

.copyright {
    margin-top: 25px;
}


/* HIDDEN SEARCH RESULTS */

.tool-card.hidden {
    display: none;
}


/* MOBILE */

@media (max-width: 900px) {

    .popular-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .tool-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


@media (max-width: 600px) {

    .header {
        padding: 15px 20px;

        flex-direction: column;

        gap: 12px;
    }

    nav a {
        margin: 0 7px;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 15px;
    }

    .popular-grid,
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 15px;
    }

}