:root {

    --ink: #141414;
    --muted: #6c6c6c;
    --line: #e8e8e8;
    --paper: #fafaf8;
    --accent: #6d4aff;
    --accent-dark: #5134dc;
    --accent-light: #f0edff;
    --bg-white: #ffffff;
    --shadow-color: rgba(0,0,0,0.06);
    --shadow-hover: rgba(0,0,0,0.08);

}


* {

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    margin: 0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:
        var(--ink);

    background:
        var(--paper);

    transition: background 0.3s, color 0.3s;

}


/* ============================================================
   DARK THEME — DEEPER, RICHER
============================================================ */

body.dark {

    --ink: #e8e8e8;
    --muted: #9ca3af;
    --line: #2d2d2d;
    --paper: #0a0a0a;
    --bg-white: #141414;
    --shadow-color: rgba(0,0,0,0.8);
    --shadow-hover: rgba(0,0,0,0.9);
    --accent-light: #1a142b;

}


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

.topbar {

    height: 72px;

    border-bottom:
        1px solid var(--line);

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    padding:
        0 6vw;

    background:
        var(--bg-white);

    position:
        sticky;

    top:
        0;

    z-index:
        100;

    transition: background 0.3s, border-color 0.3s;

}


.brand {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    font-size:
        20px;

    font-weight:
        800;

}


.logo {

    width:
        36px;

    height:
        36px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        10px;

    background:
        var(--accent);

    color:
        white;

    transition: background 0.3s;

}


nav {

    display:
        flex;

    gap:
        28px;

    align-items: center;

}


nav a {

    text-decoration:
        none;

    color:
        var(--muted);

    font-size:
        14px;

    transition: color 0.3s;

}


nav a:hover {

    color:
        var(--accent);

}


/* ============================================================
   THEME TOGGLE BUTTON
============================================================ */

.theme-toggle {
    background: none;
    border: 1px solid var(--line);
    border-radius: 9999px;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 12px;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    background: var(--bg-white);
    color: var(--ink);
    line-height: 1;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    transform: scale(1.05);
}

.theme-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


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

main {

    max-width:
        1180px;

    margin:
        auto;

    padding:
        70px 24px;

}


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

.hero {

    text-align:
        center;

    max-width:
        800px;

    margin:
        0 auto 55px;

}


.pill {

    display:
        inline-block;

    border:
        1px solid var(--line);

    background:
        var(--bg-white);

    padding:
        8px 15px;

    border-radius:
        100px;

    font-size:
        12px;

    margin-bottom:
        20px;

    color: var(--muted);

    transition: background 0.3s, border-color 0.3s;

}


.hero h1 {

    margin:
        0;

    font-size:
        clamp(48px, 8vw, 86px);

    line-height:
        .94;

    letter-spacing:
        -.065em;

    color: var(--ink);

}


.hero h1 span {

    color:
        var(--accent);

}


.hero p {

    color:
        var(--muted);

    font-size:
        18px;

    margin-top:
        25px;

}


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

.tool-grid {

    display:
        grid;

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

    gap:
        12px;

    margin-bottom:
        26px;

}


.tool {

    border:
        1px solid var(--line);

    background:
        var(--bg-white);

    border-radius:
        16px;

    padding:
        19px;

    text-align:
        left;

    cursor:
        pointer;

    transition: 0.2s;

}


.tool:hover {

    border-color:
        var(--accent);

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 25px var(--shadow-hover);

}


.tool.active {

    background:
        var(--accent-light);

    border-color:
        var(--accent);

}


.tool b {

    display:
        block;

    margin-bottom:
        7px;

    font-size:
        15px;

    color: var(--ink);

}


.tool small {

    color:
        var(--muted);

    line-height:
        1.4;

}


/* ============================================================
   CONVERTER
============================================================ */

.converter {

    background:
        var(--bg-white);

    border:
        1px solid var(--line);

    border-radius:
        24px;

    padding:
        30px;

    box-shadow:
        0 20px 50px var(--shadow-color);

    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;

}


.converter-head {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    margin-bottom:
        22px;

}


.eyebrow {

    color:
        var(--muted);

    font-size:
        11px;

    text-transform:
        uppercase;

    letter-spacing:
        .12em;

}


.converter h2 {

    margin:
        5px 0 6px;

    font-size:
        28px;

    letter-spacing:
        -.03em;

    color: var(--ink);

}


.converter-head p {

    margin:
        0;

    color:
        var(--muted);

}


.filetype {

    padding:
        9px 12px;

    border:
        1px solid var(--line);

    border-radius:
        10px;

    font-size:
        12px;

    font-weight:
        700;

    color: var(--muted);

    transition: border-color 0.3s;

}


/* ============================================================
   COMPRESSION
============================================================ */

.compression-settings {

    background:
        var(--accent-light);

    border:
        1px solid var(--line);

    border-radius:
        14px;

    padding:
        18px;

    margin-bottom:
        20px;

    transition: background 0.3s, border-color 0.3s;

}


.compression-settings label {

    display:
        flex;

    flex-direction:
        column;

    gap:
        9px;

    font-size:
        13px;

    font-weight:
        700;

    color: var(--ink);

}


.compression-settings select {

    width:
        100%;

    padding:
        12px;

    border:
        1px solid var(--line);

    border-radius:
        10px;

    background:
        var(--bg-white);

    font-size:
        14px;

    cursor:
        pointer;

    outline:
        none;

    color: var(--ink);

    transition: border-color 0.3s, background 0.3s;

}


.compression-settings select:focus {

    border-color:
        var(--accent);

}


/* ============================================================
   DROPZONE
============================================================ */

.dropzone {

    min-height:
        230px;

    border:
        2px dashed var(--line);

    border-radius:
        18px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    text-align:
        center;

    transition: 0.2s;

    background: var(--paper);

    padding: 30px 20px;

}


.dropzone.drag {

    border-color:
        var(--accent);

    background:
        var(--accent-light);

}


.upload-icon {

    width:
        54px;

    height:
        54px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        15px;

    background:
        var(--accent-light);

    color:
        var(--accent);

    font-size:
        28px;

    font-weight:
        800;

    transition: background 0.3s, color 0.3s;

}


.dropzone h3 {

    margin:
        14px 0 4px;

    color: var(--ink);

}


.dropzone p {

    margin:
        0 0 12px;

    color:
        var(--muted);

}


.choose {

    background:
        var(--accent);

    color:
        white;

    padding:
        11px 17px;

    border-radius:
        10px;

    cursor:
        pointer;

    font-size:
        14px;

    font-weight: 600;

    transition: background 0.3s;

}


.choose:hover {

    background:
        var(--accent-dark);

}


.file-info {

    max-width:
        90%;

    margin-top:
        15px;

    color:
        var(--muted);

    font-size:
        12px;

    word-break:
        break-word;

}


/* ============================================================
   BUTTONS
============================================================ */

.actions {

    display:
        flex;

    gap:
        10px;

    margin-top:
        20px;

}


.primary,
.secondary {

    border:
        0;

    border-radius:
        11px;

    padding:
        13px 18px;

    font-weight:
        700;

    cursor:
        pointer;

    transition: background 0.3s, color 0.3s, opacity 0.3s;

}


.primary {

    background:
        var(--accent);

    color:
        white;

}


.primary:hover {

    background:
        var(--accent-dark);

}


.primary:disabled {

    opacity:
        .6;

    cursor:
        wait;

}


.secondary {

    background:
        var(--line);

    color:
        var(--ink);

}


.secondary:hover {

    background:
        var(--muted);

    color: var(--bg-white);

}


/* ============================================================
   STATUS
============================================================ */

.status {

    min-height:
        20px;

    margin-top:
        16px;

    font-size:
        14px;

    color: var(--muted);

}


.status.error {

    color:
        #c52222;

}


.download {

    display:
        inline-block;

    margin-top:
        12px;

    color:
        var(--accent);

    font-weight:
        800;

    text-decoration:
        none;

}


.download:hover {

    text-decoration:
        underline;

}


/* ============================================================
   HOW
============================================================ */

.how {

    padding:
        80px 0 30px;

}


.how h2 {

    text-align:
        center;

    font-size:
        38px;

    color: var(--ink);

}


.steps {

    display:
        grid;

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

    gap:
        18px;

    margin-top:
        28px;

}


.steps div {

    background:
        var(--bg-white);

    border:
        1px solid var(--line);

    padding:
        24px;

    border-radius:
        18px;

    transition: background 0.3s, border-color 0.3s;

}


.steps span {

    color:
        var(--accent);

    font-size:
        12px;

    font-weight:
        800;

}


.steps b {

    display:
        block;

    margin:
        13px 0 5px;

    color: var(--ink);

}


.steps p {

    margin:
        0;

    color:
        var(--muted);

    font-size:
        14px;

}


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

footer {

    text-align:
        center;

    padding:
        28px;

    border-top:
        1px solid var(--line);

    background:
        var(--bg-white);

    color:
        var(--muted);

    font-size:
        12px;

    transition: background 0.3s, border-color 0.3s;

}


/* ============================================================
   FOOTER — ATTRACTIVE DESIGN
============================================================ */

footer {
    border-top: 1px solid var(--line);
    background: var(--bg-white);
    color: var(--muted);
    font-size: 13px;
    padding: 0;
    transition: background 0.3s, border-color 0.3s;
}

.footer-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 24px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.footer-logo {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 16px;
    font-weight: 800;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

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

.footer-links a:hover::after {
    width: 100%;
}

.footer-copy {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

.footer-copy a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-copy a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.footer-copy .separator {
    margin: 0 6px;
    color: var(--line);
}

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

@media (max-width: 560px) {
    .footer-container {
        padding: 30px 16px 24px;
        gap: 14px;
    }

    .footer-brand {
        font-size: 16px;
    }

    .footer-logo {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .footer-links {
        gap: 16px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .footer-copy {
        font-size: 11px;
    }

    .footer-copy .separator {
        margin: 0 4px;
    }
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (
    max-width: 850px
) {

    .tool-grid {

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

    }

}


@media (
    max-width: 560px
) {

    main {

        padding:
            45px 15px;

    }


    .tool-grid,
    .steps {

        grid-template-columns:
            1fr;

    }


    .hero h1 {

        font-size:
            52px;

    }


    .converter {

        padding:
            20px;

    }


    .converter-head {

        gap:
            15px;

    }


    nav a {

        display: none;

    }

    .theme-toggle {
        font-size: 1rem;
        padding: 4px 10px;
        min-width: 38px;
    }

}
