/* ==========================================================
   Base64 • MD5 • SHA-256
   style.css
========================================================== */

:root{

    --primary:#4f46e5;
    --primary-hover:#4338ca;

    --success:#16a34a;
    --danger:#dc2626;
    --warning:#f59e0b;

    --text:#111827;
    --text-light:#6b7280;

    --background:#f6f8fc;
    --surface:#ffffff;

    --border:#e5e7eb;

    --shadow-sm:0 2px 8px rgba(15,23,42,.05);
    --shadow:0 10px 30px rgba(15,23,42,.08);
    --shadow-lg:0 20px 50px rgba(15,23,42,.12);

    --radius-sm:10px;
    --radius:16px;
    --radius-lg:24px;

    --transition:.25s ease;

    --container:1180px;

    --font:-apple-system,
           BlinkMacSystemFont,
           "Segoe UI",
           Roboto,
           Arial,
           sans-serif;

}

/* ========================================================== */

*,
*::before,
*::after{

    margin:0;
    padding:0;

    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    font-family:var(--font);

    background:var(--background);

    color:var(--text);

    line-height:1.6;

    font-size:16px;

    -webkit-font-smoothing:antialiased;

    text-rendering:optimizeLegibility;

}

img{

    max-width:100%;

    display:block;

}

button{

    border:none;

    background:none;

    cursor:pointer;

    font:inherit;

}

input,
textarea{

    font:inherit;

}

textarea{

    resize:vertical;

}

a{

    color:inherit;

    text-decoration:none;

}

ul{

    list-style:none;

}

/* ========================================================== */

.background-grid{

    position:fixed;

    inset:0;

    pointer-events:none;

    z-index:-2;

    background-image:

        linear-gradient(rgba(79,70,229,.03) 1px, transparent 1px),

        linear-gradient(90deg, rgba(79,70,229,.03) 1px, transparent 1px);

    background-size:42px 42px;

}

.page{

    min-height:100vh;

}

.container{

    width:min(var(--container),calc(100% - 40px));

    margin:auto;

}

/* ========================================================== */

.hero{

    padding:72px 0 56px;

}

.hero-top{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:24px;

    margin-bottom:28px;

}

.hero-left{

    display:flex;

    align-items:center;

    gap:18px;

}

.hero-label{

    display:inline-flex;

    align-items:center;

    padding:7px 14px;

    border-radius:999px;

    background:#eef2ff;

    color:var(--primary);

    font-size:13px;

    font-weight:600;

}

.hero-tags{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

}

.hero-tags span{

    padding:6px 12px;

    border-radius:999px;

    background:#fff;

    border:1px solid var(--border);

    font-size:13px;

    font-weight:600;

    box-shadow:var(--shadow-sm);

}

.hero-status{

    display:flex;

    align-items:center;

    gap:10px;

    color:var(--text-light);

    font-size:14px;

}

.status-dot{

    width:10px;

    height:10px;

    border-radius:50%;

    background:var(--success);

}

.hero h1{

    font-size:clamp(38px,5vw,58px);

    line-height:1.1;

    margin-bottom:22px;

    letter-spacing:-1px;

}

.hero-description{

    max-width:760px;

    color:var(--text-light);

    font-size:19px;

}

.hero-features{

    display:flex;

    flex-wrap:wrap;

    gap:16px;

    margin-top:42px;

}

.hero-feature{

    display:flex;

    align-items:center;

    gap:10px;

    padding:14px 18px;

    background:#fff;

    border:1px solid var(--border);

    border-radius:var(--radius);

    box-shadow:var(--shadow-sm);

}

.hero-feature svg{

    width:20px;

    height:20px;

    fill:var(--primary);

}

/* ========================================================== */

.tool{

    background:#fff;

    border-radius:28px;

    box-shadow:var(--shadow);

    padding:42px;

    margin-bottom:56px;

}

.tool-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    margin-bottom:36px;

}

/* ========================================================== */

.segment-control{

    display:inline-flex;

    background:#f3f4f6;

    border-radius:14px;

    padding:4px;

}

.segment-control__item{

    min-width:120px;

    padding:12px 22px;

    border-radius:10px;

    color:var(--text-light);

    font-weight:600;

    transition:var(--transition);

}

.segment-control__item:hover{

    color:var(--text);

}

.segment-control__item.is-active{

    background:#fff;

    color:var(--primary);

    box-shadow:var(--shadow-sm);

}

/* ========================================================== */

.switch{

    display:flex;

    align-items:center;

    gap:14px;

    user-select:none;

}

.switch input{

    display:none;

}

.switch-slider{

    width:52px;

    height:30px;

    border-radius:999px;

    background:#d1d5db;

    position:relative;

    transition:var(--transition);

}

.switch-slider::before{

    content:"";

    position:absolute;

    top:4px;

    left:4px;

    width:22px;

    height:22px;

    border-radius:50%;

    background:#fff;

    transition:var(--transition);

    box-shadow:0 2px 5px rgba(0,0,0,.18);

}

.switch input:checked + .switch-slider{

    background:var(--primary);

}

.switch input:checked + .switch-slider::before{

    transform:translateX(22px);

}

.switch-label{

    font-size:15px;

    color:var(--text-light);

}

/* ==========================================================
   Workspace
========================================================== */

.workspace{
    display:grid;
    grid-template-columns:minmax(0,2fr) 340px;
    gap:28px;
    margin-bottom:28px;
    align-items:start;
}

.workspace + .workspace{
    margin-top:24px;
}

.workspace-arrow{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:42px;
    color:var(--primary);
    margin:18px 0;
    user-select:none;
}

.workspace__editor,
.workspace__result,
.workspace__info{
    min-width:0;
}

/* ==========================================================
   Card
========================================================== */

.card,
.algorithm-panel{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:20px;
    box-shadow:var(--shadow-sm);
    overflow:hidden;
}

.card__header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    padding:22px 24px 18px;
    border-bottom:1px solid var(--border);
}

.card__header h2{
    font-size:22px;
    margin-bottom:4px;
}

.card__header p{
    color:var(--text-light);
    font-size:14px;
}

.stats{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:10px;
}

.stats span{
    background:#f3f4f6;
    color:var(--text-light);
    font-size:13px;
    font-weight:600;
    padding:6px 10px;
    border-radius:999px;
}

/* ==========================================================
   Textarea
========================================================== */

textarea{
    width:100%;
    min-height:280px;
    border:none;
    outline:none;
    background:transparent;
    padding:24px;
    color:var(--text);
    font-size:16px;
    line-height:1.7;
}

textarea::placeholder{
    color:#9ca3af;
}

textarea[readonly]{
    background:#fafafa;
}

/* ==========================================================
   Toolbar
========================================================== */

.toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    padding:18px 24px 24px;
    border-top:1px solid var(--border);
}

.toolbar-btn{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:11px 18px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#fff;
    color:var(--text);
    transition:var(--transition);
    font-weight:600;
}

.toolbar-btn:hover{
    border-color:var(--primary);
    color:var(--primary);
    transform:translateY(-1px);
    box-shadow:var(--shadow-sm);
}

.toolbar-btn svg{
    width:18px;
    height:18px;
    fill:currentColor;
}

.toolbar-btn--swap{
    margin-left:auto;
}

/* ==========================================================
   Algorithm panel
========================================================== */

.algorithm-panel{
    padding:28px;
    position:sticky;
    top:24px;
}

.algorithm-panel__badge{
    display:inline-flex;
    padding:6px 12px;
    border-radius:999px;
    background:#eef2ff;
    color:var(--primary);
    font-size:12px;
    font-weight:700;
    margin-bottom:18px;
}

.algorithm-panel h3{
    font-size:30px;
    margin-bottom:12px;
}

.algorithm-panel p{
    color:var(--text-light);
    margin-bottom:22px;
}

#algorithmFacts{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-bottom:24px;
}

#algorithmFacts li{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    background:#f8fafc;
    border-radius:12px;
    border:1px solid var(--border);
    font-size:15px;
}

.algorithm-note{
    padding:18px;
    border-radius:14px;
    background:#eef2ff;
    color:#3730a3;
    font-size:14px;
    line-height:1.7;
}

/* ==========================================================
   Primary actions
========================================================== */

.primary-actions{
    display:flex;
    justify-content:center;
    margin-top:36px;
}

.primary-actions__group{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.hidden{
    display:none !important;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:180px;
    height:54px;
    padding:0 28px;
    border-radius:14px;
    font-size:16px;
    font-weight:700;
    transition:var(--transition);
    border:1px solid transparent;
}

.btn-primary{
    background:var(--primary);
    color:#fff;
}

.btn-primary:hover{
    background:var(--primary-hover);
    transform:translateY(-2px);
    box-shadow:var(--shadow);
}

.btn-secondary{
    background:#fff;
    border-color:var(--border);
    color:var(--text);
}

.btn-secondary:hover{
    border-color:var(--primary);
    color:var(--primary);
    transform:translateY(-2px);
}

/* ==========================================================
   Toast
========================================================== */

.toast{
    position:fixed;
    left:50%;
    bottom:28px;
    transform:translateX(-50%) translateY(120%);
    background:#111827;
    color:#fff;
    padding:14px 22px;
    border-radius:14px;
    box-shadow:var(--shadow-lg);
    font-size:14px;
    font-weight:600;
    opacity:0;
    transition:.3s ease;
    z-index:9999;
    pointer-events:none;
}

.toast.show{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

/* ==========================================================
   SEO article
========================================================== */

.seo-article{
    margin-top:72px;
    line-height:1.8;
}

.seo-article h2{
    margin:56px 0 18px;
    font-size:34px;
    line-height:1.25;
}

.seo-article h3{
    margin:34px 0 12px;
    font-size:24px;
}

.seo-article p{

    margin:16px 0;

    color:var(--text-light);

}

.seo-article ul,
.seo-article ol{

    margin:20px 0 20px 24px;

}

.seo-article li{

    margin:10px 0;

}

.seo-article strong{

    color:var(--text);

}

/* ==========================================================
   Tables
========================================================== */

.seo-table,
.comparison-table{

    width:100%;

    border-collapse:collapse;

    margin:32px 0;

    background:#fff;

    border-radius:16px;

    overflow:hidden;

    box-shadow:var(--shadow-sm);

}

.seo-table th,
.comparison-table th{

    background:#eef2ff;

    color:var(--primary);

    text-align:left;

    padding:18px;

}

.seo-table td,
.comparison-table td{

    padding:18px;

    border-top:1px solid var(--border);

}

.table-wrapper{

    overflow-x:auto;

}

/* ==========================================================
   Usage section
========================================================== */

.usage-section{

    margin-top:80px;

}

.usage-section h2{

    margin-bottom:20px;

    font-size:34px;

}

.usage-section>p{

    color:var(--text-light);

    margin-bottom:36px;

}

.usage-grid{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:24px;

    margin:36px 0 48px;

}

.usage-card{

    background:#fff;

    border:1px solid var(--border);

    border-radius:20px;

    padding:28px;

    box-shadow:var(--shadow-sm);

    transition:var(--transition);

}

.usage-card:hover{

    transform:translateY(-4px);

    box-shadow:var(--shadow);

}

.usage-card h3{

    margin-bottom:16px;

    font-size:24px;

}

.usage-card p{

    color:var(--text-light);

    margin-bottom:18px;

}

.usage-card ul{

    margin-left:18px;

}

.usage-card li{

    margin:10px 0;

}

/* ==========================================================
   FAQ
========================================================== */

.faq-section{

    margin-top:70px;

}

.faq-section details{

    background:#fff;

    border:1px solid var(--border);

    border-radius:16px;

    padding:20px 24px;

    margin-bottom:18px;

    transition:var(--transition);

}

.faq-section details:hover{

    box-shadow:var(--shadow-sm);

}

.faq-section summary{

    cursor:pointer;

    font-weight:600;

    list-style:none;

}

.faq-section summary::-webkit-details-marker{

    display:none;

}

.faq-section p{

    margin-top:18px;

    color:var(--text-light);

}

/* ==========================================================
   Comparison section
========================================================== */

.comparison-section{

    margin-top:70px;

}

.section-heading{

    margin-bottom:28px;

}

.section-heading h2{

    font-size:34px;

    margin-bottom:10px;

}

.section-heading p{

    color:var(--text-light);

}

/* ==========================================================
   Badges
========================================================== */

.badge{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:5px 12px;

    border-radius:999px;

    font-size:13px;

    font-weight:700;

}

.badge-success{

    background:#dcfce7;

    color:#166534;

}

.badge-danger{

    background:#fee2e2;

    color:#991b1b;

}

/* ==========================================================
   Footer
========================================================== */

.footer{

    margin-top:90px;

    padding:40px 0;

    border-top:1px solid var(--border);

}

.footer__content{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

}

.footer__content p{

    color:var(--text-light);

}

.footer__links{

    display:flex;

    gap:20px;

}

.footer__links a{

    color:var(--text-light);

    transition:var(--transition);

}

.footer__links a:hover{

    color:var(--primary);

}

/* ==========================================================
   Responsive
========================================================== */

@media (max-width:1100px){

    .workspace{

        grid-template-columns:1fr;

    }

    .algorithm-panel{

        position:static;

    }

    .usage-grid{

        grid-template-columns:1fr;

    }

}

@media (max-width:900px){

    .tool{

        padding:24px;

    }

    .tool-header{

        flex-direction:column;

        align-items:flex-start;

    }

    .hero{

        padding:56px 0 42px;

    }

    .hero-top{

        flex-direction:column;

        align-items:flex-start;

    }

    .card__header{

        flex-direction:column;

    }

    .stats{

        justify-content:flex-start;

    }

    .footer__content{

        flex-direction:column;

        align-items:flex-start;

    }

}

@media (max-width:700px){

    .container{

        width:min(100% - 24px,1180px);

    }

    .hero h1{

        font-size:36px;

    }

    .hero-description{

        font-size:16px;

    }

    .segment-control{

        width:100%;

    }

    .segment-control__item{

        flex:1;

        min-width:0;

        padding:12px;

    }

    .toolbar{

        flex-direction:column;

    }

    .toolbar-btn{

        width:100%;

        justify-content:center;

    }

    .toolbar-btn--swap{

        margin-left:0;

    }

    .primary-actions__group{

        width:100%;

        flex-direction:column;

    }

    .btn{

        width:100%;

    }

    .seo-table th,
    .seo-table td,
    .comparison-table th,
    .comparison-table td{

        white-space:nowrap;

    }

}

.faq-section{

    margin-top:70px;

}

.faq-section h2{

    font-size:34px;

    margin-bottom:28px;

}

.faq-section details{

    background:#fff;

    border:1px solid var(--border);

    border-radius:16px;

    margin-bottom:16px;

    overflow:hidden;

    transition:var(--transition);

}

.faq-section details:hover{

    box-shadow:var(--shadow-sm);

}

.faq-section details[open]{

    border-color:#d4d4ff;

}

.faq-section summary{

    position:relative;

    cursor:pointer;

    list-style:none;

    padding:22px 56px 22px 24px;

    font-weight:600;

    font-size:17px;

}

.faq-section summary::-webkit-details-marker{

    display:none;

}

.faq-section summary::after{

    content:"+";

    position:absolute;

    right:24px;

    top:50%;

    transform:translateY(-50%);

    font-size:26px;

    color:var(--primary);

    transition:.25s;

}

.faq-section details[open] summary::after{

    transform:translateY(-50%) rotate(45deg);

}

.faq-section details p{

    padding:0 24px 22px;

    color:var(--text-light);

    line-height:1.8;

}