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

:root {
    --primary: #6c5ce7;
    --primary-dark: #5546d8;
    --secondary: #00cec9;
    --pink: #fd79a8;

    --bg: #f7f8fc;
    --card: #ffffff;
    --text: #1e1b4b;
    --muted: #6b7280;
    --border: #e5e7eb;

    --shadow: 0 15px 45px rgba(31, 38, 135, 0.10);
}

body.dark {
    --bg: #0f1020;
    --card: #18192d;
    --text: #f5f5ff;
    --muted: #a5a6bd;
    --border: #2d2e45;

    --shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    color: var(--text);
    background: var(--bg);

    transition:
        background 0.3s ease,
        color 0.3s ease;
}


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

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

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

    border-bottom: 1px solid rgba(229, 231, 235, 0.8);

    backdrop-filter: blur(15px);
}

.dark .site-header {
    background: rgba(15, 16, 32, 0.85);
    border-color: var(--border);
}

.nav-container {
    width: 92%;
    max-width: 1250px;

    margin: auto;

    height: 72px;

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

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;

    color: var(--text);

    font-size: 19px;
    font-weight: 800;
}

.brand-icon {
    width: 38px;
    height: 38px;

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

    border-radius: 11px;

    color: white;

    font-weight: 900;

    background:
        linear-gradient(135deg,
            var(--primary),
            var(--secondary));

    box-shadow:
        0 7px 18px rgba(108, 92, 231, 0.3);
}

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

.desktop-nav a {
    text-decoration: none;
    color: var(--muted);

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

    transition: color 0.2s ease;
}

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

.github-btn {
    padding: 9px 16px;

    border-radius: 9px;

    color: white !important;

    background: #17152e;
}

.theme-btn {
    border: 0;

    background: transparent;

    font-size: 20px;

    cursor: pointer;
}


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

.hero {
    width: 92%;
    max-width: 900px;

    margin: auto;

    padding: 85px 0 50px;

    text-align: center;
}

.hero-badge {
    display: inline-block;

    padding: 8px 15px;

    border-radius: 50px;

    color: var(--primary);

    background: rgba(108, 92, 231, 0.10);

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

    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 68px);

    line-height: 1.08;

    letter-spacing: -2px;

    font-weight: 900;

    margin-bottom: 20px;
}

.hero h1 span {
    display: block;

    background:
        linear-gradient(90deg,
            var(--primary),
            #0984e3,
            var(--secondary),
            var(--pink));

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 650px;

    margin: auto;

    color: var(--muted);

    font-size: 18px;

    line-height: 1.7;
}


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

.tool-section {
    width: 92%;
    max-width: 1250px;

    margin: auto;
}

.editor-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 24px;
}

.editor-card {
    padding: 22px;

    background: var(--card);

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

    border-radius: 20px;

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

.output-card {
    border-top: 3px solid var(--secondary);
}

.editor-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}

.editor-header h2 {
    font-size: 19px;

    margin-bottom: 4px;
}

.editor-header span {
    color: var(--muted);

    font-size: 12px;
}

textarea {
    width: 100%;

    height: 340px;

    padding: 18px;

    resize: vertical;

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

    border-radius: 14px;

    background: var(--bg);

    color: var(--text);

    outline: none;

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size: 14px;

    line-height: 1.7;

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

textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(108, 92, 231, 0.12);
}

textarea::placeholder {
    color: #9ca3af;
}

.editor-footer {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 11px;

    color: var(--muted);

    font-size: 12px;
}


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

button,
.upload-btn {
    cursor: pointer;

    border: none;

    font-family: inherit;

    font-weight: 700;
}

.small-btn,
.upload-btn,
.copy-btn {
    padding: 9px 14px;

    border-radius: 9px;

    font-size: 12px;
}

.small-btn {
    background: rgba(253, 121, 168, 0.10);

    color: #e84393;
}

.upload-btn {
    background: rgba(108, 92, 231, 0.10);

    color: var(--primary);
}

.copy-btn {
    color: #008f89;

    background: rgba(0, 206, 201, 0.11);
}

.small-btn:hover,
.upload-btn:hover,
.copy-btn:hover {
    transform: translateY(-2px);
}


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

.clean-action {
    text-align: center;

    margin: 30px 0 15px;
}

#cleanBtn {
    padding: 16px 36px;

    border-radius: 12px;

    color: white;

    font-size: 16px;

    background:
        linear-gradient(135deg,
            var(--primary),
            #0984e3);

    box-shadow:
        0 12px 30px rgba(108, 92, 231, 0.30);

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

#cleanBtn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 18px 38px rgba(108, 92, 231, 0.4);
}

#cleanBtn:disabled {
    opacity: 0.6;

    cursor: not-allowed;

    transform: none;
}


/* ================= MESSAGE ================= */

.message {
    min-height: 22px;

    text-align: center;

    color: var(--primary);

    font-size: 13px;

    font-weight: 700;
}


/* ================= FEATURES ================= */

.features-section {
    width: 92%;
    max-width: 1150px;

    margin: 110px auto 0;
}

.section-heading {
    text-align: center;

    margin-bottom: 40px;
}

.section-heading>span,
.section-label {
    color: var(--primary);

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

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

    font-size: 34px;
}

.section-heading p {
    color: var(--muted);

    font-size: 16px;
}

.feature-grid {
    display: grid;

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

    gap: 20px;
}

.feature-card {
    padding: 25px;

    border-radius: 17px;

    background: var(--card);

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

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

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

.feature-card:hover {
    transform: translateY(-5px);

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

.feature-icon {
    width: 45px;
    height: 45px;

    display: flex;

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

    border-radius: 12px;

    background:
        linear-gradient(135deg,
            rgba(108, 92, 231, 0.15),
            rgba(0, 206, 201, 0.15));

    font-size: 21px;

    margin-bottom: 17px;
}

.feature-card h3 {
    margin-bottom: 9px;

    font-size: 17px;
}

.feature-card p {
    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


/* ================= INFO / SEO ================= */

.info-section {
    width: 92%;
    max-width: 900px;

    margin: 100px auto;
}

.info-content {
    padding: 45px;

    border-radius: 20px;

    background:
        linear-gradient(135deg,
            rgba(108, 92, 231, 0.08),
            rgba(0, 206, 201, 0.08));

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

.info-content h2 {
    margin: 10px 0 20px;

    font-size: 30px;
}

.info-content p {
    margin-bottom: 15px;

    color: var(--muted);

    line-height: 1.8;

    font-size: 15px;
}


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

.site-footer {
    margin-top: 100px;

    padding: 55px 0 20px;

    background: #111126;

    color: white;
}

.footer-container {
    width: 92%;
    max-width: 1150px;

    margin: auto;

    display: grid;

    grid-template-columns:
        2fr 1fr 1fr;

    gap: 50px;
}

.footer-brand .brand {
    color: white;
}

.footer-brand p {
    max-width: 330px;

    margin-top: 15px;

    color: #a5a6bd;

    line-height: 1.7;

    font-size: 14px;
}

.footer-links {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.footer-links h3 {
    font-size: 14px;

    margin-bottom: 5px;
}

.footer-links a {
    color: #a5a6bd;

    text-decoration: none;

    font-size: 13px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    width: 92%;
    max-width: 1150px;

    margin: 40px auto 0;

    padding-top: 20px;

    border-top: 1px solid #292943;

    display: flex;

    justify-content: space-between;

    color: #777895;

    font-size: 12px;
}


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

.toast {
    position: fixed;

    bottom: 25px;

    right: 25px;

    padding: 13px 18px;

    border-radius: 10px;

    background: #17152e;

    color: white;

    font-size: 13px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2);

    transform: translateY(100px);

    opacity: 0;

    pointer-events: none;

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

    z-index: 999;
}

.toast.show {
    transform: translateY(0);

    opacity: 1;
}


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

@media (max-width: 900px) {

    .desktop-nav a:not(.github-btn) {
        display: none;
    }

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

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

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}


@media (max-width: 600px) {

    .nav-container {
        height: 65px;
    }

    .brand {
        font-size: 16px;
    }

    .hero {
        padding: 60px 0 35px;
    }

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

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

    .editor-card {
        padding: 16px;
    }

    textarea {
        height: 270px;
    }

    .editor-header {
        align-items: flex-start;
    }

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

    .section-heading h2 {
        font-size: 27px;
    }

    .info-content {
        padding: 28px 22px;
    }

    .info-content h2 {
        font-size: 25px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;

        gap: 8px;
    }
}