body {
    padding-top: 70px; /* Prevents content from hiding behind header */
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 /* === THEME VARIABLES === */

:root {
    /* light theme (default) */
    --bg1: #ffe7f2;
    --bg2: #e6f7ff;
    --text: #0b1220;

    --card-bg: #ffffff;
    --card-border: #e4e4e7;
    --muted-bg: #f4f4f5;
    --linebox-bg: #fdfdfd;

    --accent: #ff66b2;
    --accent2: #60e0ff;
    --danger: #ff6b6b;
    --success: #22c55e;

    --chip-border: rgba(15,23,42,0.08);
    --scrollbar: #cbd5e1;
}

/* DARK THEME VARIABLES */
:root[data-theme="dark"] {
    --bg1: #020617;
    --bg2: #030712;
    --text: #e5e7eb;

    --card-bg: #020617;
    --card-border: #1e293b;
    --muted-bg: #020617;
    --linebox-bg: #020617;

    --accent: #f97316;
    --accent2: #ec4899;
    --danger: #fb7185;
    --success: #22c55e;

    --chip-border: rgba(148,163,184,0.35);
    --scrollbar: #475569;
}

/* base body */
/*body {
    margin: 0;
    padding: 0px;
    background: linear-gradient(135deg, var(--bg1), var(--bg2));
    font-family: Poppins, Arial, sans-serif;
    font-size: 15px;
    color: var(--text);
}*/

/* base body */
body {
    margin: 0;
    padding: 0px; /* top padding for sticky header */
    background: linear-gradient(135deg, var(--bg1), var(--bg2));
    font-family: Poppins, Arial, sans-serif;
    font-size: 15px;
    color: var(--text);
}


textarea::placeholder {
    color: #6b7280;
}

/* layout shell */
.wrap {
    max-width: 1100px;
    margin: 0 auto 40px auto;
}

/* title row */
h1 {
    font-size: 22px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;

}

.brandTag {
    background: #fff;
    padding: 4px 10px;
    border-radius: 20px;
}

/* hint + labels */
.hint {
    font-size: 11px;
    color: #4b5563;
    margin-top: 4px;
    flex-basis: 100%; /* new line under toolbar */
}

.muted {
    font-size: 13px;
    color: #4b5563;
}

/* toolbar row */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* columns */
.cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.resultCols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* cards */
.card {
    background: var(--card-bg);
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    border: 1px solid var(--card-border);
    margin-bottom: 20px;
    /* 👇 ADD THIS */
    color: var(--text);
}

/* textarea */
textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    resize: vertical;
    background: var(--linebox-bg);
    color: var(--text);
}

textarea:focus {
    outline: none;
    border-color: var(--accent2);
    box-shadow: 0 0 0 1px var(--accent2);
}

/* controls under textarea */
.controls {
    margin-top: 8px;
    margin-bottom: 4px;
}

.controls button {
    margin-right: 8px;
}

/* buttons */
button {
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    background: #fff;
    transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}

button:hover {
    box-shadow: 0 4px 16px rgba(15,23,42,0.25);
    transform: translateY(-1px);
}

button.primary {
    background: linear-gradient(120deg, var(--accent), var(--accent2));
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.55);
}

/* stats chips */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
}

.stat {
    background: var(--muted-bg);
    padding: 6px 10px;
    border-radius: 20px;
}

/* line index & file list */
.lineBox {
    white-space: pre-wrap;
    background: var(--linebox-bg);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    max-height: 220px;
    overflow: auto;
}

/* comparison result output */
.out {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    max-height: 220px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
}

/* partition between A and B result */
.resultCols > div:first-child {
    border-right: 1px solid var(--chip-border);
    padding-right: 16px;
}

.resultCols > div:last-child {
    padding-left: 16px;
}

/* tokens inside result */
.out span {
    display: inline-block;
    margin: 2px 3px;
}

/* scrollbars */
.out::-webkit-scrollbar,
.lineBox::-webkit-scrollbar {
    width: 6px;
}

.out::-webkit-scrollbar-thumb,
.lineBox::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 20px;
}

/* match / diff pills */
.match {
    background: rgba(34, 197, 94, 0.18);
    color: #14532d;
    padding: 3px 7px;
    border-radius: 10px;
}

.diff {
    background: rgba(255, 107, 107, 0.20);
    color: #b91c1c;
    padding: 3px 7px;
    border-radius: 10px;
}

/* uploaded file item */
.file-item {
    padding: 6px 10px;
    margin-bottom: 4px;
    background: #f4f8ff;
    border-radius: 8px;
    font-size: 13px;
    border-left: 4px solid var(--accent);
}

/* Dark mode toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    /*margin-left: auto;*/ /* pushes toggle to right end of toolbar row */
    margin-left: 0; /* we control position with header-right container */
}

.theme-toggle input {
    display: none;
}

.theme-slider {
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    transition: background 0.2s ease;
}

.theme-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
}

/* checked (dark) state */
.theme-toggle input:checked + .theme-slider {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.theme-toggle input:checked + .theme-slider::after {
    transform: translateX(18px);
}

.file-empty {
    color: #888;
    font-style: italic;
    padding: 4px 0;
}

.out:empty::before {
    content: "No text found";
    color: #888;
    font-style: italic;
}

.toolbarstyle {
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 15px;
    padding: 10px;
}

/* =========================================
   DARK MODE POLISH
   ========================================= */

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, #0f172a 0, #020617 40%, #020617 100%);
}

/* title + brand */
:root[data-theme="dark"] h1 {
    color: #e5e7eb;
}

:root[data-theme="dark"] .spark {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

:root[data-theme="dark"] .brandTag {
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.4);
}

/* toolbar – glass pill */
:root[data-theme="dark"] .toolbar {
    background: linear-gradient(120deg, rgba(15,23,42,0.95), rgba(15,23,42,0.8));
    padding: 10px 16px;
    border-radius:15px;
    border: 1px solid rgba(51,65,85,0.9);
    box-shadow: 0 18px 42px rgba(15,23,42,0.95);
}

/* selects + file input */
:root[data-theme="dark"] select,
:root[data-theme="dark"] input[type="file"] {
    background-color: #020617;
    color: #e5e7eb;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 4px 10px;
}

/* cards – floating */
:root[data-theme="dark"] .card {
    background:
        radial-gradient(circle at top left, rgba(148,163,184,0.18), transparent 60%),
        #020617;
    border-color: #1e293b;
    box-shadow:
        0 24px 55px rgba(15,23,42,0.95),
        0 0 0 1px rgba(15,23,42,0.9);
}

/* text areas + output + lineBox */
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .lineBox,
:root[data-theme="dark"] .out {
    background:
        radial-gradient(circle at top left, rgba(30,64,175,0.35), #020617);
    border-color: #1f2937;
    color: #e5e7eb;
}

/* hints & muted text */
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .hint,
:root[data-theme="dark"] .muted {
    background-color: transparent;
    color: #9ca3af;
}

/* non-primary buttons in dark */
:root[data-theme="dark"] button:not(.primary) {
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #1f2937;
    box-shadow: 0 10px 26px rgba(15,23,42,0.95);
}

:root[data-theme="dark"] button:not(.primary):hover {
    background: #111827;
    border-color: #334155;
}

/* primary Compare button – neon */
:root[data-theme="dark"] button.primary {
    background: linear-gradient(120deg, var(--accent), var(--accent2));
    color: #ffffff;
    /* box-shadow:
        0 0 26px rgba(236, 72, 153, 0.8),
        0 14px 32px rgba(15,23,42,0.98); */
        box-shadow: 0 4px 18px rgba(236, 72, 153, 0.35);

}

/* copy/download */
:root[data-theme="dark"] #copyResult,
:root[data-theme="dark"] #downloadTxt {
    background: #020617;
    color: #e5e7eb;
}

/* match & diff on dark */
:root[data-theme="dark"] .match {
    background: rgba(34,197,94,0.25);
    color: #bbf7d0;
}

:root[data-theme="dark"] .diff {
    background: rgba(248,113,113,0.3);
    color: #fecaca;
}

/* uploaded files */
:root[data-theme="dark"] .file-item {
    background: linear-gradient(90deg, rgba(15,23,42,0.95), rgba(15,23,42,0.85));
    border-left-color: var(--accent);
    color: #e5e7eb;
}

/* scrollbars in dark */
:root[data-theme="dark"] .out::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .lineBox::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
}

/* dark mode label */
:root[data-theme="dark"] .theme-label {
    color: #e5e7eb;
}

/* Header logo + nav */
.site-header .header-logo {
    height: 32px;
    width: auto;
}

.header-nav .nav-link {
    font-weight: 500;
    color: #333;
}

    .header-nav .nav-link:hover {
        text-decoration: underline;
    }

/* Footer links */
.site-footer .footer-nav .nav-link {
    font-size: 0.9rem;
    color: #666;
}

    .site-footer .footer-nav .nav-link:hover {
        text-decoration: underline;
    }

.header-right {
    gap: 16px;
}

.header-controls {
    font-size: 13px;
}

.header-lang-select {
    width: auto;
    min-width: 110px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 13px;
}
/* === PREMIUM HEADER (GEN-Z LIGHT MODE) =================== */
.site-header {
    background: radial-gradient(circle at top left, rgba(255,255,255,0.92), rgba(255,255,255,0.75));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 18px 45px rgba(148,163,184,0.35);
}

.navbar-brand {
    font-size: 20px;
    letter-spacing: 0.03em;
}

.header-right {
    gap: 18px;
}

.header-nav .nav-link {
    padding: 0 10px;
    font-weight: 500;
    font-size: 14px;
    color: #4b5563;
    position: relative;
}

    /* pastel underline on hover – very gen-z */
    .header-nav .nav-link::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -4px;
        width: 0;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, #ff9ae2, #a5b4ff, #6ee7ff);
        transform: translateX(-50%);
        transition: width 0.18s ease;
    }

    .header-nav .nav-link:hover {
        color: #111827;
        text-decoration: none;
    }

        .header-nav .nav-link:hover::after {
            width: 60%;
        }

/* language + dark toggle block */
.header-controls {
    font-size: 13px;
    padding-left: 14px;
    border-left: 1px solid rgba(148,163,184,0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-lang-select {
    width: auto;
    min-width: 110px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 13px;
}

/* keep dark toggle compact in header */
.theme-toggle {
    margin-left: 0;
}
/* === PREMIUM TOOLBAR (RESET PARENT DIV) ================== */
.toolbarstyle {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.92);
    border-radius: 18px;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.95);
    box-shadow: 0 20px 50px rgba(148,163,184,0.35), 0 0 0 1px rgba(226,232,240,0.9);
}

    /* soft pastel border glow */
    .toolbarstyle::before {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(120deg, #ff9ae2, #a5b4ff, #6ee7ff);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0.8;
    }

    /* keep actual content above the gradient border */
    .toolbarstyle > * {
        position: relative;
        z-index: 1;
    }

/* align Reset at right end */
#btnReset {
    margin-left: auto;
}

/* ghost style for Reset (premium) */
#btnReset {
    background: #ffffff;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    border: 1px solid rgba(209,213,219,0.9);
    box-shadow: none;
}

    #btnReset:hover {
        background: #f9fafb;
        box-shadow: 0 4px 16px rgba(148,163,184,0.7);
    }

/* hint – small and calm */
.hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}
.wrap {
    max-width: 1100px;
    margin: 18px auto 40px auto;
    padding: 20px 22px 26px;
    border-radius: 26px;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.7), rgba(255,255,255,0.08)), rgba(255,255,255,0.35);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 24px 60px rgba(15,23,42,0.22), 0 0 0 1px rgba(148,163,184,0.2);
}

h1 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 18px;
}

.brandTag {
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    padding: 4px 14px;
    border: 1px solid rgba(148,163,184,0.6);
    font-size: 13px;
}

/* ============================================
   PREMIUM DARK MODE (ADD AT VERY BOTTOM)
   ============================================ */

/* === DARK HEADER ======================================= */
:root[data-theme="dark"] .site-header {
    background: linear-gradient(135deg, #020617 0%, #020617 60%, #020617 100%);
    border-bottom: 1px solid #020617;
    box-shadow: 0 18px 40px rgba(0,0,0,0.9);
}

:root[data-theme="dark"] .navbar-brand {
    color: #e5e7eb !important;
}

:root[data-theme="dark"] .header-nav .nav-link {
    color: #cbd5f5 !important;
}

    :root[data-theme="dark"] .header-nav .nav-link:hover {
        color: #ffffff !important;
    }

/* header right box */
:root[data-theme="dark"] .header-controls {
    border-left: 1px solid rgba(51,65,85,0.9);
}

:root[data-theme="dark"] .header-lang-select {
    background-color: #020617;
    border: 1px solid #1f2937;
    color: #e5e7eb;
}

/* === MAIN WRAP PANEL ==================================== */
:root[data-theme="dark"] .wrap {
    background: radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%), radial-gradient(circle at bottom right, rgba(236,72,153,0.22), transparent 55%), #020617;
    border-radius: 26px;
    border: 1px solid rgba(30,64,175,0.7);
    box-shadow: 0 32px 80px rgba(0,0,0,0.95), 0 0 0 1px rgba(15,23,42,0.95);
    padding-top: 22px;
}

/* title text */
:root[data-theme="dark"] h1 {
    color: #e5e7eb;
}

:root[data-theme="dark"] .brandTag {
    background: rgba(15,23,42,0.95);
    border-color: rgba(148,163,184,0.7);
}

/* === TOOLBAR GLASS EFFECT =============================== */
:root[data-theme="dark"] .toolbarstyle {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(148,163,184,0.25), transparent 55%), #020617;
    border-radius: 18px;
    border: 1px solid rgba(51,65,85,0.95);
    box-shadow: 0 24px 60px rgba(0,0,0,0.95), 0 0 0 1px rgba(15,23,42,0.9);
}

    /* neon border ring */
    :root[data-theme="dark"] .toolbarstyle::before {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(120deg, #f97316, #ec4899, #22d3ee);
        opacity: 0.4;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
    }

    :root[data-theme="dark"] .toolbarstyle > * {
        position: relative;
        z-index: 1;
    }

/* Reset button moves right */
:root[data-theme="dark"] #btnReset {
    margin-left: auto;
}

/* === RESET BUTTON PREMIUM NEON ========================== */
:root[data-theme="dark"] #btnReset {
    background: radial-gradient(circle at 20% 0, #f97316, #ec4899 45%, #0f172a 70%);
    color: #f9fafb;
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 13px;
    border: 1px solid rgba(248,250,252,0.18);
    box-shadow: 0 0 18px rgba(0,0,0,0.55), 0 12px 30px rgba(0,0,0,0.9);
    /* box-shadow: 0 6px 16px rgba(0,0,0,0.55); */
}

    :root[data-theme="dark"] #btnReset:hover {
        filter: brightness(1.1);
    }

/* === CARDS ============================================== */
:root[data-theme="dark"] .card {
    background: radial-gradient(circle at top left, rgba(30,64,175,0.55), transparent 60%), #020617;
    border-radius: 20px;
}

/* === TEXTAREAS ========================================== */
:root[data-theme="dark"] textarea {
    background: radial-gradient(circle at top left, rgba(15,23,42,0.9), #020617);
    border-radius: 16px;
    color: #e5e7eb;
}

/* buttons (Clear / Example / Swap) */
:root[data-theme="dark"] button:not(.primary):not(#btnReset) {
    background: #020617;
   /* border-radius: 20px;*/
    border: 1px solid #1f2937;
    box-shadow: 0 6px 18px rgba(0,0,0,0.9);
    color: #e5e7eb;
}
/* =============================
   STICKY HEADER (always visible)
   ============================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    backdrop-filter: blur(12px);
}

/* for dark mode header transparency */
:root[data-theme="dark"] .site-header {
    backdrop-filter: blur(18px);
}
/* =========================================
   RESPONSIVE LAYOUT
   ========================================= */

/* Tablets and small laptops */
@media (max-width: 1024px) {
    .wrap {
        max-width: 100%;
        margin: 20px 16px 32px 16px;
        padding: 18px 16px 22px;
    }

    .cols {
        gap: 16px;
    }

    .card {
        padding: 12px 12px;
    }
}

/* Phones / narrow screens */
@media (max-width: 768px) {

    body {
        padding-top: 60px; /* header a bit smaller on mobile */
        font-size: 14px;
    }

    /* main panel */
    .wrap {
        margin: 16px 10px 28px 10px;
        padding: 14px 12px 20px;
        border-radius: 18px;
    }

    /* title */
    h1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 22px;
        margin-bottom: 14px;
    }

    /* two-column areas become single column */
    .cols,
    .resultCols {
        grid-template-columns: 1fr;
        gap: 16px;
    }

        .resultCols > div:first-child {
            border-right: none;
            padding-right: 0;
            border-bottom: 1px solid var(--chip-border);
            padding-bottom: 12px;
            margin-bottom: 8px;
        }

        .resultCols > div:last-child {
            padding-left: 0;
        }

    /* textarea smaller height on phones */
    textarea {
        height: 160px;
    }

    /* toolbar stack nicely */
    .toolbarstyle {
        flex-direction: column;
        align-items: flex-start;
    }

        .toolbarstyle label,
        .toolbarstyle select,
        .toolbarstyle input[type="file"] {
            margin-right: 6px;
        }

    /* Reset button stays to the right but on its own row */
    #btnReset {
        margin-left: 0;
        align-self: flex-end;
        margin-top: 4px;
    }

    /* header nav wrap on small screens */
    .header-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-controls {
        padding-left: 0;
        border-left: none;
    }

    .header-nav .nav-link {
        padding: 0 6px;
        font-size: 13px;
    }
}

/* Very small phones */
@media (max-width: 480px) {

    .header-nav {
        font-size: 12px;
    }

    .header-lang-select {
        min-width: 90px;
    }

    button,
    #btnReset,
    button.primary {
        font-size: 12px;
        padding: 6px 12px;
    }

    textarea {
        height: 140px;
    }
}
:root[data-theme="dark"] textarea::placeholder {
    color: #e5e7eb;
}
/* === Active nav link styling (highlight current page) === */
.header-nav .nav-link.active {
    color: #111827;               /* dark text for active (light theme) */
    font-weight: 700;
    position: relative;
}

.header-nav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 60%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9ae2, #a5b4ff, #6ee7ff);
    transform: translateX(-50%);
    box-shadow: 0 6px 18px rgba(165,180,255,0.12);
}

/* Dark theme tweak */
:root[data-theme="dark"] .header-nav .nav-link.active {
    color: #ffffff;
}

/* ---------- Mobile nav toggle styles ---------- */

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    margin-right: 6px;
    cursor: pointer;
    align-self: center;
}

.nav-toggle .hamburger {
    display: inline-block;
    width: 22px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
}
.nav-toggle .hamburger::before { top: -7px; }
.nav-toggle .hamburger::after  { top: 7px; }

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Mobile behavior */
@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; color: var(--text); }

    .nav-wrap {
        position: absolute;
        right: 12px;
        top: 64px; /* adjust slightly if your header is taller */
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(15,23,42,0.12);
        padding: 12px;
        display: none;
        flex-direction: column;
        min-width: 200px;
        z-index: 99999;
    }

    .nav-wrap .header-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin: 0;
    }

    .nav-wrap .header-nav .nav-link {
        padding: 8px 10px;
        font-size: 14px;
        color: var(--text);
    }

    .nav-wrap .header-controls {
        display: flex;
        gap: 10px;
        margin-top: 8px;
        border-top: 1px solid rgba(0,0,0,0.04);
        padding-top: 8px;
    }

    .site-header.nav-open .nav-wrap {
        display: flex;
        animation: navFadeIn .18s ease-out;
    }

    @keyframes navFadeIn {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .site-header .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}
/* === FIX TOP SPACE ON MOBILE (ONLY) === */
@media (max-width: 768px) {

    body {
        padding-top: 0 !important;     /* remove extra body padding on mobile */
    }

    .wrap {
        margin-top: 0 !important;      /* remove gap above main card */
    }

    main {
        padding-top: 0 !important;     /* stop <main> from pushing content down */
    }
}
/* ===== FINAL TOOL-ALIGNED SEO CONTENT FIX ===== */
/* ===== FINAL PROFESSIONAL CONTENT LAYOUT ===== */



/* Align with tool width */
.tool-aligned-content .about-tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Proper readable column */
.tool-aligned-content .seo-box {
    max-width: 1084px;      /* tighter = more professional */
    margin: 0 auto;
}

/* Main heading */
.tool-aligned-content h1 {
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 14px;
    color: #0f172a;
}

/* Intro paragraph */
.tool-aligned-content h1 + p {
    margin-bottom: 32px;
}

/* Section headings */
.tool-aligned-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 42px;
    margin-bottom: 12px;
    color: #111827;
}

/* Paragraphs */
.tool-aligned-content p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #374151;
    margin-bottom: 16px;
}

/* Lists */
.tool-aligned-content ul {
    padding-left: 22px;
    margin-bottom: 20px;
}

.tool-aligned-content li {
    margin-bottom: 8px;
    line-height: 1.65;
    color: #374151;
}

/* Dividers */
.tool-aligned-content hr {
    margin: 36px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* Mobile polish */
@media (max-width: 768px) {
    .tool-aligned-content {
        padding: 44px 0 56px;
    }

    .tool-aligned-content .seo-box {
        max-width: 100%;
    }

    .tool-aligned-content h1 {
        font-size: 1.8rem;
    }
}
.tool-aligned-content h1 + p {
    max-width: 700px;
}

/* ===== PROFESSIONAL FAQ POLISH (CSS ONLY) ===== */

/* .faq-section {
    padding: 72px 0;
} */

/* FAQ container alignment */
.faq-section .about-tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Readable FAQ column */
.faq-section .faq-box {
    max-width: 1064px;
    margin: 0 auto;
}

/* FAQ main heading */
.faq-section h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 36px;
    color: #0f172a;
}

/* Question styling */
.faq-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 28px;
    color: #111827;
}

/* Answer styling */
.faq-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 18px;
}

/* Subtle divider between FAQ items */
.faq-section h3:not(:first-of-type) {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Mobile refinement */
@media (max-width: 768px) {
    .faq-section {
        padding: 56px 0;
    }

    .faq-section h2 {
        font-size: 1.6rem;
    }
}
