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

:root {
    --background: #f7f8f5;
    --surface: #ffffff;

    --text: #17172a;
    --muted: #707080;

    --border: #e7e7ed;

    --primary: #5b5ce2;
    --primary-hover: #4d4ed0;

    --accent: #8b5cf6;

    --soft: #f0efff;

    --shadow:
        0 12px 40px rgba(23, 23, 42, 0.06);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;

    background:
        radial-gradient(circle at 50% -20%,
            rgba(91, 92, 226, 0.10),
            transparent 35%),
        var(--background);

    color: var(--text);

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
}


/* ================= NAVBAR ================= */

.navbar {
    width: 100%;
    max-width: 1160px;

    margin: auto;

    padding: 24px 22px;

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

.brand {
    display: flex;
    align-items: center;

    gap: 10px;

    color: var(--text);

    text-decoration: none;
}

.brand-logo {
    width: 31px;
    height: 31px;

    display: block;
}

.brand span {
    font-size: 20px;

    font-weight: 800;

    letter-spacing: -0.8px;
}

.nav-link {
    color: var(--muted);

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition: color 0.2s ease;
}

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


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

.hero {
    max-width: 850px;

    margin: 105px auto 70px;

    padding: 0 20px;

    text-align: center;
}

.hero h1 {
    font-size: clamp(48px, 7vw, 82px);

    line-height: 0.98;

    letter-spacing: -5px;

    font-weight: 800;

    margin-bottom: 30px;
}

.hero .highlight {
    display: inline-block;

    padding: 2px 13px 5px;

    background: var(--primary);

    color: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 8px 25px rgba(91, 92, 226, 0.20);
}

.hero p {
    max-width: 590px;

    margin: auto;

    color: var(--muted);

    font-size: 18px;

    line-height: 1.7;
}


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

.tool {
    width: 100%;
    max-width: 1160px;

    margin: auto;

    padding: 0 20px;
}

.editor-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;
}

.editor-box {
    overflow: hidden;

    background: var(--surface);

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

    border-radius: 18px;

    box-shadow: var(--shadow);

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

.editor-box:focus-within {
    border-color: rgba(91, 92, 226, 0.45);

    box-shadow:
        0 15px 45px rgba(23, 23, 42, 0.08),
        0 0 0 4px rgba(91, 92, 226, 0.08);
}

.editor-header {
    height: 55px;

    padding: 0 18px;

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

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

.editor-header span {
    font-size: 13px;

    font-weight: 700;
}

.editor-header button {
    border: none;

    background: transparent;

    color: var(--muted);

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: color 0.2s ease;
}

.editor-header button:hover {
    color: var(--primary);
}

textarea {
    display: block;

    width: 100%;

    height: 320px;

    padding: 20px;

    resize: vertical;

    border: none;

    outline: none;

    background: transparent;

    color: var(--text);

    font-family: "JetBrains Mono", monospace;

    font-size: 14px;

    line-height: 1.7;
}

textarea::placeholder {
    color: #aaaab7;
}

/* ================= TOOL CONTROLS ================= */

.options {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 20px 0 14px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 9px 12px;

    background: rgba(255, 255, 255, 0.8);

    border: 1px solid #e2e2ea;

    border-radius: 8px;

    color: #555566;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    user-select: none;

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

.options label:hover {
    background: #f4f3ff;

    border-color: #c9c7f5;

    color: #3d3e9f;
}

.options input {
    appearance: none;

    width: 15px;
    height: 15px;

    margin: 0;

    border: 1.5px solid #b9b9c5;

    border-radius: 4px;

    background: #ffffff;

    display: grid;
    place-content: center;

    cursor: pointer;
}

.options input::before {
    content: "";

    width: 7px;
    height: 7px;

    transform: scale(0);

    border-radius: 2px;

    background: #ffffff;

    transition: transform 0.12s ease;
}

.options input:checked {
    background: var(--primary);

    border-color: var(--primary);
}

.options input:checked::before {
    transform: scale(1);
}


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

.tool-actions {
    display: flex;

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

    gap: 8px;

    margin-top: 12px;
}

.clean-btn {
    min-width: 145px;

    padding: 12px 22px;

    border: none;

    border-radius: 9px;

    background: var(--primary);

    color: #ffffff;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 5px 15px rgba(91, 92, 226, 0.16);

    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.clean-btn:hover {
    background: var(--primary-hover);

    transform: translateY(-1px);

    box-shadow:
        0 7px 18px rgba(91, 92, 226, 0.22);
}

.clean-btn:active {
    transform: translateY(0);
}


.swap-btn {
    min-width: 82px;

    padding: 11px 18px;

    border: 1px solid #dedee7;

    border-radius: 9px;

    background: #ffffff;

    color: #292936;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

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

.swap-btn:hover {
    background: #f4f3ff;

    border-color: #c9c7f5;

    color: var(--primary);
}


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

@media (max-width: 700px) {

    .options {
        justify-content: flex-start;

        gap: 7px;
    }

    .options label {
        flex: 1 1 auto;

        padding: 9px 11px;

        font-size: 12px;
    }

    .tool-actions {
        display: grid;

        grid-template-columns: 1fr auto;

        gap: 8px;

        width: 100%;
    }

    .clean-btn {
        width: 100%;

        min-width: 0;
    }

    .swap-btn {
        min-width: 78px;
    }

}

/* ================= STATS ================= */

.stats {
    display: flex;

    justify-content: center;

    gap: 90px;

    padding: 35px 0;
}

.stats div {
    text-align: center;
}

.stats strong {
    display: block;

    font-size: 22px;

    font-weight: 750;

    letter-spacing: -0.5px;
}

.stats span {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 12px;
}


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

.how {
    max-width: 1050px;

    margin: 115px auto;

    padding: 0 20px;
}

.how h2 {
    margin-bottom: 45px;

    text-align: center;

    font-size: 34px;

    letter-spacing: -1.8px;
}

.steps {
    display: grid;

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

    gap: 18px;
}

.steps>div {
    padding: 30px;

    background: var(--surface);

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

    border-radius: 16px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.steps>div:hover {
    transform: translateY(-4px);

    box-shadow: var(--shadow);
}

.steps span {
    color: var(--primary);

    font-family: "JetBrains Mono", monospace;

    font-size: 12px;

    font-weight: 600;
}

.steps h3 {
    margin: 14px 0 8px;

    font-size: 18px;

    letter-spacing: -0.4px;
}

.steps p {
    color: var(--muted);

    font-size: 14px;

    line-height: 1.7;
}


/* ================= SATISFACTION ================= */

.satisfaction {
    max-width: 1050px;

    margin: 0 auto 110px;

    padding: 0 20px;
}

.satisfaction-card {
    padding: 55px 30px;

    background:
        linear-gradient(135deg,
            #f1efff,
            #ffffff);

    border: 1px solid #dfddf5;

    border-radius: 20px;

    text-align: center;
}

.satisfaction-label,
.faq-label {
    display: inline-block;

    margin-bottom: 14px;

    color: var(--primary);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.3px;
}

.satisfaction-card h2 {
    margin-bottom: 9px;

    font-size: 29px;

    letter-spacing: -1.2px;
}

.satisfaction-card p {
    margin-bottom: 27px;

    color: var(--muted);

    font-size: 14px;
}

.feedback-buttons {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}

.feedback-btn {
    padding: 11px 18px;

    background: #ffffff;

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

    border-radius: 9px;

    color: var(--text);

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

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

.feedback-btn:hover {
    background: var(--soft);

    border-color: rgba(91, 92, 226, 0.3);

    color: var(--primary);
}

.feedback-message {
    min-height: 20px;

    margin-top: 18px;

    color: var(--primary);

    font-size: 13px;

    font-weight: 600;
}


/* ================= FAQ ================= */

.faq {
    max-width: 850px;

    margin: 0 auto 110px;

    padding: 0 20px;
}

.faq-header {
    margin-bottom: 42px;

    text-align: center;
}

.faq-header h2 {
    margin-bottom: 10px;

    font-size: 34px;

    letter-spacing: -1.7px;
}

.faq-header p {
    color: var(--muted);

    font-size: 14px;
}

.faq-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.faq-item {
    overflow: hidden;

    background: var(--surface);

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

    border-radius: 13px;
}

.faq-item summary {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 20px;

    cursor: pointer;

    list-style: none;

    font-size: 15px;

    font-weight: 650;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary span {
    color: var(--muted);

    font-size: 22px;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.faq-item[open] summary span {
    color: var(--primary);

    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 20px 20px;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.7;
}


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

footer {
    padding: 35px 20px;

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

    text-align: center;

    color: var(--muted);

    font-size: 13px;
}

footer a {
    color: var(--text);

    font-weight: 700;

    text-decoration: none;

    transition: color 0.2s ease;
}

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

    text-decoration: underline;
}


/* ================= TOAST ================= */

.toast {
    position: fixed;

    left: 50%;
    bottom: 25px;

    transform: translate(-50%, 20px);

    padding: 12px 17px;

    background: var(--text);

    color: #ffffff;

    border-radius: 9px;

    font-size: 13px;

    font-weight: 600;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;

    z-index: 1000;
}

.toast.show {
    opacity: 1;

    transform: translate(-50%, 0);
}


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

@media (max-width: 700px) {

    .navbar {
        padding: 18px 16px;
    }

    .brand span {
        font-size: 18px;
    }

    .hero {
        margin: 65px auto 50px;
    }

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

        letter-spacing: -3.5px;
    }

    .hero .highlight {
        padding: 2px 9px 4px;

        border-radius: 7px;
    }

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

    .editor-grid {
        grid-template-columns: 1fr;
    }

    textarea {
        height: 235px;
    }

    .options {
        flex-direction: column;
    }

    .options label {
        width: 100%;
    }

    .tool-actions {
        flex-direction: column;
    }

    .swap-btn {
        padding: 14px;
    }

    .stats {
        gap: 35px;
    }

    .how {
        margin: 80px auto;
    }

    .how h2,
    .faq-header h2 {
        font-size: 29px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .satisfaction {
        margin-bottom: 80px;
    }

    .satisfaction-card {
        padding: 40px 20px;
    }

    .satisfaction-card h2 {
        font-size: 25px;
    }

    .feedback-buttons {
        flex-direction: column;
    }

    .feedback-btn {
        width: 100%;
    }

    .faq {
        margin-bottom: 80px;
    }

    .faq-item summary {
        padding: 17px;

        font-size: 14px;
    }

    .faq-item p {
        padding: 0 17px 17px;
    }
}


/* ================= SMALL MOBILE ================= */

@media (max-width: 380px) {

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

    .stats {
        gap: 20px;
    }

    .stats strong {
        font-size: 19px;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }

}


/* ================= 404 PAGE ================= */
.error-page {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.error-content {
    width: 100%;
    max-width: 700px;
    text-align: center;
}

/* ================= 404 NUMBER ================= */
.error-code {
    margin-bottom: 28px;
    color: var(--primary);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(100px, 19vw, 175px);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -10px;
    text-shadow: 0 12px 35px rgba(91, 92, 226, 0.12);
}

/* ================= LABEL ================= */
.error-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 7px 11px;
    background: var(--soft);
    border: 1px solid #dfddf5;
    border-radius: 7px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

/* ================= TITLE ================= */
.error-content h1 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.1;
    letter-spacing: -1.8px;
    font-weight: 800;
}

/* ================= DESCRIPTION ================= */
.error-description {
    max-width: 500px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ================= ACTIONS ================= */
.error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
}

/* ================= PRIMARY BUTTON ================= */
.error-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(91, 92, 226, 0.16);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.error-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(91, 92, 226, 0.22);
}

.error-button:active {
    transform: translateY(0);
}

/* ================= SECONDARY BUTTON ================= */
.error-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #dedee7;
    border-radius: 9px;
    background: #ffffff;
    color: #292936;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.error-secondary:hover {
    background: var(--soft);
    border-color: #c9c7f5;
    color: var(--primary);
}

/* ================= MOBILE ================= */
@media (max-width: 700px) {
    .error-page {
        min-height: calc(100vh - 130px);
        padding: 60px 16px;
    }

    .error-code {
        margin-bottom: 22px;
        font-size: clamp(90px, 27vw, 135px);
        letter-spacing: -7px;
    }

    .error-label {
        margin-bottom: 13px;
        font-size: 10px;
    }

    .error-content h1 {
        font-size: 29px;
        letter-spacing: -1px;
    }

    .error-description {
        font-size: 14px;
        line-height: 1.65;
        margin-bottom: 26px;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
    }

    .error-button,
    .error-secondary {
        width: 100%;
        max-width: 280px;
    }
}

/* ================= SMALL MOBILE ================= */
@media (max-width: 380px) {
    .error-code {
        font-size: 90px;
        letter-spacing: -6px;
    }

    .error-content h1 {
        font-size: 26px;
    }
}
