/* ============================================================
   MiniTools — Premium SaaS Frontend v2.0
   Bootstrap 5 + Figma Style + Dark Mode
   ============================================================ */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --bg: #ffffff;
    --bg-soft: #fafbff;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --border: #e2e8f0;
    --border-soft: #f1f5f9;

    --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
    --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
    --shadow-md: 0 8px 24px rgba(15,23,42,.08);
    --shadow-lg: 0 20px 50px rgba(15,23,42,.12);
    --shadow-glow: 0 10px 40px rgba(99,102,241,.3);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --header-h: 74px;
    --transition: cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
    --bg: #0a0b14;
    --bg-soft: #0f111a;
    --bg-elevated: #151824;
    --surface: #151824;
    --surface-hover: #1a1e2e;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-soft: #64748b;
    --border: #252a3d;
    --border-soft: #1e2235;
    --primary-light: rgba(99,102,241,.12);

    --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,.4);
    --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
    --shadow-glow: 0 10px 40px rgba(99,102,241,.4);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg); color: var(--text);
    line-height: 1.6; font-size: 15px; font-weight: 400;
    -webkit-font-smoothing: antialiased;
    transition: background .3s var(--transition), color .3s var(--transition);
    overflow-x: hidden; padding-bottom: 80px;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

.container-mt { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ========== HEADER ========== */
.mt-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-soft);
    transition: background .3s;
}
[data-theme="dark"] .mt-header { background: rgba(10,11,20,.72); }

.mt-nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.mt-logo {
    display: flex; align-items: center; gap: 12px;
    font-weight: 800; font-size: 20px; letter-spacing: -.5px;
    color: var(--text);
}
.mt-logo-ico {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--gradient); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 900;
    box-shadow: var(--shadow-glow);
    position: relative;
}
.mt-logo-ico::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,.25), transparent);
}

.mt-nav-links {
    display: flex; align-items: center; gap: 4px;
    list-style: none;
    background: var(--bg-soft);
    padding: 6px; border-radius: 50px;
    border: 1px solid var(--border-soft);
}
.mt-nav-links a {
    padding: 9px 18px;
    font-weight: 500; font-size: 14px;
    color: var(--text-muted);
    border-radius: 50px;
    transition: all .25s var(--transition);
}
.mt-nav-links a:hover { color: var(--text); background: var(--surface); }
.mt-nav-links a.active { background: var(--text); color: var(--bg); }

.mt-nav-actions { display: flex; align-items: center; gap: 10px; }

.mt-icon-btn {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all .2s var(--transition);
}
.mt-icon-btn:hover { background: var(--surface-hover); transform: translateY(-1px); border-color: var(--border); }
.mt-icon-btn svg { width: 20px; height: 20px; }

.mt-theme-toggle .sun { display: block; }
.mt-theme-toggle .moon { display: none; }
[data-theme="dark"] .mt-theme-toggle .sun { display: none; }
[data-theme="dark"] .mt-theme-toggle .moon { display: block; }

.mt-menu-toggle { display: none; }

/* ========== HERO ========== */
.mt-hero {
    position: relative; padding: 100px 0 80px;
    text-align: center; overflow: hidden;
}
.mt-hero::before {
    content: ''; position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99,102,241,.15), transparent 60%),
      radial-gradient(ellipse 80% 50% at 80% 20%, rgba(236,72,153,.12), transparent 60%),
      radial-gradient(ellipse 80% 60% at 50% 80%, rgba(139,92,246,.1), transparent 60%);
    pointer-events: none; z-index: -1;
}
[data-theme="dark"] .mt-hero::before {
    background:
      radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99,102,241,.25), transparent 60%),
      radial-gradient(ellipse 80% 50% at 80% 20%, rgba(236,72,153,.18), transparent 60%),
      radial-gradient(ellipse 80% 60% at 50% 80%, rgba(139,92,246,.15), transparent 60%);
}

.mt-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 16px 7px 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px; font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 28px;
    box-shadow: var(--shadow-xs);
}
.mt-hero-badge .dot {
    padding: 2px 10px;
    background: var(--gradient); color: white;
    border-radius: 50px;
    font-size: 11px; font-weight: 700; letter-spacing: .3px;
}

.mt-hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    font-weight: 800; letter-spacing: -2px;
    line-height: 1.05; margin-bottom: 22px;
    color: var(--text);
}
.mt-hero h1 .grad {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.mt-hero p.lead {
    font-size: 18px; color: var(--text-muted);
    max-width: 620px; margin: 0 auto 40px;
    line-height: 1.7;
}

.mt-hero-search {
    max-width: 620px; margin: 0 auto;
    display: flex; gap: 8px;
    background: var(--surface);
    padding: 8px; border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
}
.mt-hero-search::before {
    content: ''; position: absolute; inset: -3px;
    background: var(--gradient); border-radius: 19px;
    opacity: 0; z-index: -1;
    filter: blur(20px); transition: opacity .3s;
}
.mt-hero-search:focus-within::before { opacity: .3; }
.mt-hero-search input {
    flex: 1; padding: 14px 18px;
    border: 0; background: transparent;
    font-size: 15px; outline: 0;
    color: var(--text); font-family: inherit;
}
.mt-hero-search input::placeholder { color: var(--text-soft); }

/* ========== BUTTONS ========== */
.mt-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border: 0; border-radius: 12px;
    background: var(--gradient); color: white;
    font-weight: 600; font-size: 14px;
    cursor: pointer; font-family: inherit;
    transition: all .25s var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99,102,241,.25);
}
.mt-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(99,102,241,.4); }
.mt-btn:active { transform: translateY(0); }
.mt-btn-lg { padding: 16px 32px; font-size: 15px; border-radius: 14px; }
.mt-btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.mt-btn-ghost {
    background: var(--surface); color: var(--text);
    border: 1.5px solid var(--border); box-shadow: none;
}
.mt-btn-ghost:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 4px 14px rgba(99,102,241,.15); }

/* ========== SECTIONS ========== */
.mt-section { padding: 80px 0; }
.mt-section-title { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.mt-section-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light); color: var(--primary);
    border-radius: 50px;
    font-size: 12px; font-weight: 700;
    letter-spacing: .5px; text-transform: uppercase;
    margin-bottom: 16px;
}
.mt-section-title h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800; letter-spacing: -1.2px;
    line-height: 1.15; margin-bottom: 16px;
    color: var(--text);
}
.mt-section-title p { color: var(--text-muted); font-size: 16px; line-height: 1.7; }

/* ========== FEATURES ========== */
.mt-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.mt-feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all .35s var(--transition);
    position: relative; overflow: hidden;
}
.mt-feature::before {
    content: ''; position: absolute; inset: 0;
    background: var(--gradient); opacity: 0;
    transition: opacity .35s; z-index: 0;
}
.mt-feature > * { position: relative; z-index: 1; transition: color .35s; }
.mt-feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.mt-feature:hover::before { opacity: 1; }
.mt-feature:hover h3, .mt-feature:hover p { color: white; }
.mt-feature:hover .mt-feature-ico { background: rgba(255,255,255,.2); color: white; transform: scale(1.1) rotate(-6deg); }
.mt-feature-ico {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    transition: all .35s var(--transition);
}
.mt-feature-ico svg { width: 28px; height: 28px; stroke-width: 1.8; }
.mt-feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.3px; color: var(--text); }
.mt-feature p { color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* ========== TOOL TABS & GRID ========== */
.mt-tab-nav {
    display: flex; gap: 8px; flex-wrap: wrap;
    justify-content: center; margin-bottom: 40px;
    padding: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    max-width: fit-content;
    margin-left: auto; margin-right: auto;
}
.mt-tab-nav button {
    padding: 10px 20px;
    border: 0; background: transparent;
    color: var(--text-muted);
    font-weight: 600; font-size: 13.5px;
    border-radius: 10px; cursor: pointer;
    transition: all .2s var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit;
}
.mt-tab-nav button:hover { color: var(--text); background: var(--surface); }
.mt-tab-nav button.active {
    background: var(--gradient); color: white;
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
}

.mt-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mt-tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all .3s var(--transition);
    cursor: pointer; position: relative; overflow: hidden;
    display: block; color: var(--text);
}
.mt-tool-card::after {
    content: '→'; position: absolute;
    top: 24px; right: 24px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-soft); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 600;
    transition: all .3s var(--transition);
}
.mt-tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.mt-tool-card:hover::after { background: var(--primary); color: white; transform: translate(4px, -4px) rotate(-45deg); }

.mt-tool-ico {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white; margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.mt-tool-ico::before {
    content: ''; position: absolute; inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,.25), transparent);
}
.mt-tool-ico svg { width: 26px; height: 26px; stroke-width: 1.8; position: relative; }

.mt-tool-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.2px; color: var(--text); }
.mt-tool-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.mt-tool-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; color: var(--text-soft);
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}
.mt-tool-meta .chip {
    padding: 3px 10px;
    background: var(--bg-soft);
    border-radius: 50px;
    font-weight: 600; color: var(--text-muted);
}

/* ========== BLOG ========== */
.mt-blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.mt-blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .3s var(--transition);
    color: var(--text); display: block;
}
.mt-blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.mt-blog-thumb {
    aspect-ratio: 16/10;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.95);
    font-size: 56px; overflow: hidden; position: relative;
}
.mt-blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-blog-body { padding: 24px; }
.mt-blog-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; }
.mt-blog-cat {
    padding: 4px 12px;
    background: var(--primary-light); color: var(--primary);
    border-radius: 50px;
    font-weight: 700; font-size: 11.5px;
    letter-spacing: .3px; text-transform: uppercase;
}
.mt-blog-card h3 { font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -.3px; margin-bottom: 10px; color: var(--text); }
.mt-blog-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.mt-blog-card .read-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--primary); }

/* ========== FOOTER ========== */
.mt-footer {
    margin-top: 120px;
    padding: 80px 0 40px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border-soft);
    position: relative;
}
.mt-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px; margin-bottom: 56px;
}
.mt-footer-brand p { color: var(--text-muted); font-size: 14px; margin: 16px 0; max-width: 300px; line-height: 1.7; }
.mt-footer-social { display: flex; gap: 10px; }
.mt-footer-social a {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: all .2s;
}
.mt-footer-social a:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-2px); }
.mt-footer h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 18px; letter-spacing: .5px; text-transform: uppercase; }
.mt-footer ul { list-style: none; }
.mt-footer ul li { margin-bottom: 10px; }
.mt-footer ul a { color: var(--text-muted); font-size: 14px; }
.mt-footer ul a:hover { color: var(--primary); }
.mt-footer-bottom { padding-top: 28px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--text-muted); font-size: 13px; }

/* ========== MOBILE BOTTOM NAV ========== */
.mt-bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-soft);
    padding: 8px 6px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 200; justify-content: space-around;
}
[data-theme="dark"] .mt-bottom-nav { background: rgba(10,11,20,.92); }
.mt-bottom-nav a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px;
    color: var(--text-soft);
    font-size: 10.5px; font-weight: 600;
    border-radius: 12px;
    transition: all .2s;
}
.mt-bottom-nav a svg { width: 22px; height: 22px; }
.mt-bottom-nav a.active { color: var(--primary); background: var(--primary-light); }

/* ========== TOOL PAGE ========== */
.mt-tool-hero {
    padding: 50px 0 36px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-soft);
    position: relative; overflow: hidden;
}
.mt-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; }
.mt-breadcrumb a { color: var(--primary); font-weight: 500; }
.mt-tool-hero-row { display: flex; align-items: center; gap: 24px; position: relative; }
.mt-tool-hero-ico {
    width: 84px; height: 84px;
    border-radius: 22px;
    color: white;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    position: relative;
}
.mt-tool-hero-ico::before {
    content: ''; position: absolute; inset: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.25), transparent);
}
.mt-tool-hero-ico svg { width: 40px; height: 40px; position: relative; stroke-width: 1.8; }
.mt-tool-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 6px; color: var(--text); }
.mt-tool-hero p { color: var(--text-muted); font-size: 15px; max-width: 600px; }

.mt-tool-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding: 40px 0; align-items: start; }
.mt-tool-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.mt-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
.mt-sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.mt-sidebar-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.2px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.mt-related-list { display: flex; flex-direction: column; gap: 4px; }
.mt-related-list a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; transition: all .2s; color: var(--text); }
.mt-related-list a:hover { background: var(--bg-soft); }
.mt-related-list .mt-tool-ico { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 0; }
.mt-related-list .mt-tool-ico svg { width: 18px; height: 18px; }
.mt-related-list span { font-size: 13px; font-weight: 600; }
.mt-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-share-btns a {
    flex: 1; min-width: 70px;
    padding: 10px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 12px; font-weight: 600;
    text-align: center; color: var(--text);
    transition: all .2s;
}
.mt-share-btns a:hover { background: var(--primary); color: white; border-color: var(--primary); }
.mt-stats-list { display: flex; flex-direction: column; }
.mt-stats-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    list-style: none;
    font-size: 13px; color: var(--text-muted);
}
.mt-stats-list li:last-child { border: 0; }
.mt-stats-list li strong { color: var(--text); font-weight: 700; }

/* ========== TOOL UI ELEMENTS ========== */
.mt-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.mt-input, .mt-textarea, .mt-select {
    width: 100%; padding: 13px 16px;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--text);
    transition: all .2s;
}
.mt-input:focus, .mt-textarea:focus, .mt-select:focus {
    outline: 0; border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.mt-textarea { min-height: 220px; resize: vertical; line-height: 1.7; font-size: 14px; }

.mt-dropzone {
    display: block;
    padding: 50px 30px;
    background: var(--bg-soft);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center; cursor: pointer;
    transition: all .25s var(--transition);
    position: relative;
}
.mt-dropzone:hover, .mt-dropzone.drag {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}
.mt-dropzone-ico {
    width: 72px; height: 72px;
    border-radius: 20px;
    margin: 0 auto 16px;
    background: var(--gradient); color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-glow);
}
.mt-dropzone-ico svg { width: 36px; height: 36px; }
.mt-dropzone-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.mt-dropzone-sub { font-size: 13px; color: var(--text-muted); }

.mt-range-wrap {
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.mt-range-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mt-range-header .title { font-size: 13px; font-weight: 600; color: var(--text); }
.mt-range-header .value {
    font-size: 15px; font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 12px; border-radius: 50px;
}
.mt-range {
    width: 100%; height: 6px;
    border-radius: 50px;
    background: var(--border);
    outline: 0; appearance: none; -webkit-appearance: none;
    cursor: pointer;
}
.mt-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%; background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99,102,241,.4);
    transition: transform .15s;
}
.mt-range::-webkit-slider-thumb:active { transform: scale(1.2); }
.mt-range::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%; background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
}

.mt-toggle-group {
    display: inline-flex;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 4px; border-radius: 12px;
    gap: 2px;
}
.mt-toggle-group button {
    padding: 9px 20px;
    border: 0; background: transparent;
    font-weight: 600; font-size: 13px;
    color: var(--text-muted);
    border-radius: 9px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all .2s var(--transition);
    font-family: inherit;
}
.mt-toggle-group button.active {
    background: var(--gradient); color: white;
    box-shadow: 0 4px 12px rgba(99,102,241,.3);
}

.mt-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 20px; }
.mt-stat-box {
    padding: 18px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    text-align: center;
    transition: all .2s;
}
.mt-stat-box:hover { border-color: var(--primary); transform: translateY(-2px); }
.mt-stat-box .num {
    font-size: 28px; font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1; letter-spacing: -.5px; margin-bottom: 4px;
}
.mt-stat-box .lbl { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

.mt-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.mt-compare-card {
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    text-align: center;
}
.mt-compare-card.highlight {
    background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(236,72,153,.05));
    border-color: var(--primary);
}
.mt-compare-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.mt-compare-label.accent { color: var(--primary); }
.mt-compare-value { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.mt-compare-card img { max-width: 100%; max-height: 180px; margin: 0 auto; border-radius: 10px; object-fit: contain; }

.mt-savings-banner {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 14px; color: white;
    text-align: center;
    font-weight: 700; font-size: 16px;
    box-shadow: 0 8px 24px rgba(16,185,129,.3);
}

.mt-copy-btn {
    padding: 9px 14px;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 12.5px; font-weight: 600;
    color: var(--text); cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    display: inline-flex; align-items: center; gap: 5px;
    white-space: nowrap;
}
.mt-copy-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.mt-copy-btn.ok { background: #10b981; color: white; border-color: #10b981; }

.mt-color-preview {
    aspect-ratio: 1.6;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.15), inset 0 2px 4px rgba(255,255,255,.2);
    margin-bottom: 16px;
    transition: background .3s;
    position: relative; overflow: hidden;
}
.mt-color-preview::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent 50%);
}

.mt-color-code-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    margin-bottom: 10px;
}
.mt-color-code-row .kind { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; min-width: 40px; }
.mt-color-code-row .val { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; color: var(--text); font-weight: 600; }

.mt-palette { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 8px; }
.mt-palette div {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    box-shadow: var(--shadow-xs);
}
.mt-palette div:hover { transform: scale(1.15); z-index: 2; box-shadow: var(--shadow-md); }

.mt-alert { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.mt-alert.ok { background: rgba(16,185,129,.1); color: #10b981; border: 1px solid rgba(16,185,129,.2); }
.mt-alert.err { background: rgba(239,68,68,.1); color: #ef4444; border: 1px solid rgba(239,68,68,.2); }

/* ========== BLOG POST ========== */
.mt-blog-hero { padding: 80px 0 40px; text-align: center; }
.mt-blog-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 14px; color: var(--text); }
.mt-blog-hero p { color: var(--text-muted); font-size: 17px; }

.mt-post-content { max-width: 760px; margin: 0 auto; padding: 40px 0 80px; }
.mt-post-content h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1.2px; line-height: 1.15; margin-bottom: 20px; }
.mt-post-content .body { font-size: 17px; line-height: 1.85; color: var(--text); }
.mt-post-content .body p { margin-bottom: 20px; }
.mt-post-content .body h2 { font-size: 26px; font-weight: 700; margin: 32px 0 14px; letter-spacing: -.5px; }
.mt-post-content .body h3 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; }
.mt-post-content .body a { color: var(--primary); font-weight: 600; }
.mt-post-content .body img { border-radius: 12px; margin: 24px 0; }
.mt-post-content .body blockquote {
    padding: 20px 24px;
    border-left: 4px solid var(--primary);
    background: var(--bg-soft);
    border-radius: 0 12px 12px 0;
    margin: 24px 0; font-style: italic;
    color: var(--text-muted);
}
.mt-post-content .body code {
    padding: 2px 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px; color: var(--primary);
}

/* Search empty */
.mt-search-empty { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.mt-search-empty .ico {
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-soft);
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-soft);
}

/* Pagination */
.mt-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 50px; }
.mt-pagination a {
    min-width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface); color: var(--text-muted);
    font-weight: 600; font-size: 14px;
    transition: all .2s; padding: 0 12px;
}
.mt-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.mt-pagination a.active { background: var(--gradient); color: white; border-color: transparent; box-shadow: var(--shadow-glow); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.mt-fade-in { animation: fadeInUp .6s var(--transition) both; }

/* Responsive */
@media (max-width: 991px) {
    .mt-tool-layout { grid-template-columns: 1fr; }
    .mt-sidebar { position: static; }
    .mt-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .mt-nav-links { display: none; }
    .mt-menu-toggle { display: flex !important; }
    .mt-bottom-nav { display: flex; }
    .mt-hero { padding: 60px 0 40px; }
    .mt-section { padding: 50px 0; }
    .mt-footer { margin-top: 70px; padding: 50px 0 30px; }
    .mt-footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .mt-tool-hero-row { flex-direction: column; text-align: center; }
    .mt-tool-box { padding: 22px; }
    .mt-compare-grid { grid-template-columns: 1fr; }
    .mt-palette { grid-template-columns: repeat(5, 1fr); }
    .mt-hero-search { flex-direction: column; padding: 10px; }
    .mt-hero-search .mt-btn { width: 100%; justify-content: center; }
    .mt-footer-bottom { flex-direction: column; text-align: center; }
    .container-mt { padding: 0 18px; }
}
@media (max-width: 480px) {
    .mt-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile drawer */
.mt-drawer {
    position: fixed; top: 0; right: -100%;
    width: 85%; max-width: 340px; height: 100vh;
    background: var(--surface);
    box-shadow: -20px 0 60px rgba(0,0,0,.2);
    z-index: 2000; padding: 24px;
    transition: right .3s var(--transition);
    overflow-y: auto;
}
.mt-drawer.open { right: 0; }
.mt-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1999;
    opacity: 0; visibility: hidden;
    transition: all .3s;
}
.mt-drawer-backdrop.open { opacity: 1; visibility: visible; }
.mt-drawer-close {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--bg-soft); border: 0; cursor: pointer;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    margin-left: auto; margin-bottom: 20px;
}
.mt-drawer-links { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mt-drawer-links a {
    display: block; padding: 14px 18px;
    border-radius: 12px; color: var(--text);
    font-weight: 600; transition: all .2s;
}
.mt-drawer-links a:hover, .mt-drawer-links a.active { background: var(--primary-light); color: var(--primary); }
