/* =========================================================
   AnishTools - Complete Professional CSS
   ========================================================= */

/* ---------- RESET ---------- */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f8fc;
    color: #171717;
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.25s ease, color 0.25s ease;
}

button,
input {
    font-family: inherit;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    width: 100%;
    min-height: 68px;

    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;

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

    padding: 0 18px;

    position: sticky;
    top: 0;
    z-index: 1000;

    transition: background 0.25s ease, border-color 0.25s ease;
}


/* ---------- LOGO ---------- */

.logo {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo span {
    color: #6c3df5;
}


/* ---------- NAVIGATION ---------- */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-menu a {
    color: #222222;
    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: #6c3df5;
}


/* ---------- HEADER BUTTONS ---------- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-btn,
.menu-btn {
    width: 42px;
    height: 42px;

    border: 1px solid #dddddd;
    background: #ffffff;
    color: #222222;

    border-radius: 10px;

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

    cursor: pointer;

    font-size: 18px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.theme-btn:hover,
.menu-btn:hover {
    background: #f4f1ff;
    border-color: #d7ccff;
}

.theme-btn:active,
.menu-btn:active {
    transform: scale(0.95);
}


/* =========================================================
   MAIN
   ========================================================= */

main {
    width: 100%;
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.hero {
    max-width: 900px;

    margin: 0 auto;

    text-align: center;

    padding: 60px 18px 40px;
}

.hero h1 {
    font-size: clamp(36px, 8vw, 58px);

    line-height: 1.1;

    font-weight: 800;

    letter-spacing: -1.5px;

    margin-bottom: 16px;
}

.hero p {
    max-width: 620px;

    margin: 0 auto 28px;

    color: #666666;

    font-size: 17px;

    line-height: 1.6;
}


/* =========================================================
   SEARCH BOX
   ========================================================= */

.search-box {
    width: 100%;
    max-width: 640px;

    margin: 0 auto;

    display: flex;
    align-items: center;

    gap: 8px;

    background: #ffffff;

    padding: 7px;

    border: 1px solid #dddddd;

    border-radius: 14px;

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

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.search-box input {
    flex: 1;

    min-width: 0;

    height: 46px;

    border: none;
    outline: none;

    background: transparent;

    padding: 0 14px;

    color: #222222;

    font-size: 16px;
}

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

.search-box button {
    min-height: 46px;

    border: none;

    background: #6c3df5;
    color: #ffffff;

    padding: 0 21px;

    border-radius: 9px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.15s ease;
}

.search-box button:hover {
    background: #5930d8;
}

.search-box button:active {
    transform: scale(0.97);
}


/* =========================================================
   TOOLS SECTION
   ========================================================= */

.tools-section {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    padding: 25px 18px 70px;
}

.tools-section h2 {
    text-align: center;

    font-size: 30px;

    line-height: 1.2;

    font-weight: 800;

    margin-bottom: 30px;
}


/* =========================================================
   TOOLS GRID
   ========================================================= */

.tools-grid {
    display: grid;

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

    gap: 18px;
}


/* =========================================================
   TOOL CARD
   ========================================================= */

.tool-card {
    background: #ffffff;

    border: 1px solid #e7e7e7;

    border-radius: 15px;

    padding: 22px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.25s ease;
}

.tool-card:hover {
    transform: translateY(-3px);

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);

    border-color: #d8ccff;
}

.tool-card h3 {
    font-size: 20px;

    line-height: 1.3;

    margin-bottom: 8px;

    font-weight: 750;
}

.tool-card p {
    color: #6b6b6b;

    font-size: 14px;

    line-height: 1.6;

    margin-bottom: 17px;
}

.tool-card a {
    display: inline-block;

    color: #6c3df5;

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    transition: color 0.2s ease;
}

.tool-card a:hover {
    color: #4e25c4;

    text-decoration: underline;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    width: 100%;

    background: #ffffff;

    border-top: 1px solid #e8e8e8;

    text-align: center;

    padding: 28px 15px;

    color: #777777;

    font-size: 14px;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}


/* =========================================================
   DARK MODE
   ========================================================= */

body.dark-mode {
    background: #111318;
    color: #f5f5f5;
}


/* ---------- Dark Header ---------- */

body.dark-mode .header {
    background: #181a20;
    border-color: #292c34;
}

body.dark-mode .logo {
    color: #ffffff;
}

body.dark-mode .nav-menu a {
    color: #eeeeee;
}

body.dark-mode .nav-menu a:hover {
    color: #9b7aff;
}


/* ---------- Dark Buttons ---------- */

body.dark-mode .theme-btn,
body.dark-mode .menu-btn {
    background: #22252d;
    color: #ffffff;
    border-color: #383c46;
}

body.dark-mode .theme-btn:hover,
body.dark-mode .menu-btn:hover {
    background: #2b2f39;
}


/* ---------- Dark Hero ---------- */

body.dark-mode .hero p {
    color: #b8bac2;
}


/* ---------- Dark Search ---------- */

body.dark-mode .search-box {
    background: #1b1e25;
    border-color: #343741;

    box-shadow: none;
}

body.dark-mode .search-box input {
    color: #ffffff;
}

body.dark-mode .search-box input::placeholder {
    color: #9699a3;
}


/* ---------- Dark Cards ---------- */

body.dark-mode .tool-card {
    background: #1b1e25;

    border-color: #30333c;

    box-shadow: none;
}

body.dark-mode .tool-card:hover {
    border-color: #51417e;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

body.dark-mode .tool-card h3 {
    color: #ffffff;
}

body.dark-mode .tool-card p {
    color: #b5b7bf;
}

body.dark-mode .tool-card a {
    color: #9b7aff;
}


/* ---------- Dark Footer ---------- */

body.dark-mode footer {
    background: #181a20;

    border-color: #292c34;

    color: #a8aab2;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 700px) {

    .header {
        min-height: 62px;

        padding: 0 14px;
    }


    /* Mobile Menu */

    .nav-menu {
        position: absolute;

        top: 70px;

        left: 14px;
        right: 14px;

        display: none;

        flex-direction: column;

        align-items: stretch;

        gap: 0;

        background: #ffffff;

        border: 1px solid #e5e5e5;

        border-radius: 12px;

        padding: 8px;

        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 13px 14px;

        border-radius: 8px;
    }

    .nav-menu a:hover {
        background: #f4f1ff;
    }


    /* Dark Mobile Menu */

    body.dark-mode .nav-menu {
        background: #1b1e25;

        border-color: #30333c;
    }

    body.dark-mode .nav-menu a:hover {
        background: #272b34;
    }


    /* Hero */

    .hero {
        padding: 45px 15px 30px;
    }

    .hero h1 {
        font-size: 38px;

        letter-spacing: -0.8px;
    }

    .hero p {
        font-size: 15px;

        margin-bottom: 22px;
    }


    /* Search */

    .search-box {
        padding: 5px;

        border-radius: 12px;
    }

    .search-box input {
        height: 44px;

        padding: 0 10px;

        font-size: 15px;
    }

    .search-box button {
        min-height: 44px;

        padding: 0 15px;

        font-size: 14px;
    }


    /* Tools */

    .tools-section {
        padding: 20px 14px 50px;
    }

    .tools-section h2 {
        font-size: 25px;

        margin-bottom: 22px;
    }

    .tools-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .tool-card {
        padding: 18px;

        border-radius: 13px;
    }

    .tool-card h3 {
        font-size: 19px;
    }


    /* Footer */

    footer {
        padding: 24px 14px;

        font-size: 13px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .logo {
        font-size: 20px;
    }

    .header-actions {
        gap: 5px;
    }

    .theme-btn,
    .menu-btn {
        width: 39px;
        height: 39px;

        font-size: 17px;
    }

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

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

    .search-box {
        flex-direction: column;

        align-items: stretch;
    }

    .search-box input {
        width: 100%;
    }

    .search-box button {
        width: 100%;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 701px) and (max-width: 950px) {

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

    .hero {
        padding-top: 50px;
    }
}


/* =========================================================
   ACCESSIBILITY / FOCUS
   ========================================================= */

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(108, 61, 245, 0.25);

    outline-offset: 2px;
}


/* =========================================================
   HIDDEN STATE
   ========================================================= */

.hidden {
    display: none !important;
}