:root {
    --primary: #2563EB;
    --accent: #3B82F6;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-soft: rgba(255,255,255,.74);
    --text: #0F172A;
    --muted: #64748B;
    --border: rgba(15, 23, 42, .09);
    --shadow: 0 24px 70px rgba(15, 23, 42, .10);
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, .08);
    --radius: 22px;
    --radius-sm: 16px;
    --container: 1160px;
}

[data-theme="dark"] {
    --bg: #020617;
    --surface: #0F172A;
    --surface-soft: rgba(15, 23, 42, .74);
    --text: #F8FAFC;
    --muted: #94A3B8;
    --border: rgba(148, 163, 184, .18);
    --shadow: 0 24px 70px rgba(0, 0, 0, .32);
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .14), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, .12), transparent 28rem),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px); background: color-mix(in srgb, var(--bg) 76%, transparent); border-bottom: 1px solid var(--border); }
.navbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #7C3AED); color: white; box-shadow: 0 12px 30px rgba(37, 99, 235, .28); }
.brand-text { font-size: 1.04rem; }
.nav-menu { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-soft); }
.nav-menu a { padding: 9px 14px; border-radius: 999px; color: var(--muted); font-size: .94rem; font-weight: 650; }
.nav-menu a:hover, .nav-menu a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.header-search, .theme-toggle, .nav-toggle { border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); border-radius: 999px; min-height: 42px; cursor: pointer; }
.header-search { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; }
.header-search svg, .theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle { width: 42px; display: grid; place-items: center; }
.nav-toggle { display: none; width: 44px; padding: 0; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); display: block; margin: 4px auto; border-radius: 99px; }

.hero-section { position: relative; padding: 92px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); background: rgba(37, 99, 235, .10); border: 1px solid rgba(37, 99, 235, .18); border-radius: 999px; padding: 8px 13px; font-weight: 760; font-size: .88rem; }
.eyebrow svg { width: 16px; height: 16px; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { font-size: clamp(3.2rem, 8vw, 6.7rem); line-height: .88; letter-spacing: -.085em; margin: 24px 0 20px; }
.hero-subtitle { font-size: clamp(1.07rem, 2vw, 1.32rem); color: var(--muted); max-width: 650px; }
.search-panel { margin-top: 30px; position: relative; max-width: 700px; }
.search-panel-inner { height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-soft); }
.search-panel-inner svg { width: 22px; height: 22px; color: var(--primary); }
.search-panel input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; font-size: 1rem; }
.search-panel button { border: 0; background: rgba(100, 116, 139, .12); color: var(--muted); width: 30px; height: 30px; border-radius: 999px; cursor: pointer; }
.search-results { position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 10px; display: none; z-index: 10; }
.search-results.is-open { display: grid; gap: 8px; }
.search-result-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-radius: 14px; }
.search-result-item:hover { background: rgba(37, 99, 235, .08); }
.search-result-item small { color: var(--muted); }
.popular-keywords { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; color: var(--muted); font-size: .93rem; }
.popular-keywords a { color: var(--text); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 0 20px; font-weight: 800; border: 1px solid var(--border); transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #7C3AED); color: white; box-shadow: 0 16px 35px rgba(37, 99, 235, .26); }
.btn-secondary { background: var(--surface); color: var(--text); }

.hero-showcase { min-height: 520px; position: relative; display: grid; place-items: center; }
.showcase-card { width: min(430px, 100%); border-radius: 34px; padding: 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), var(--surface)); border: 1px solid var(--border); box-shadow: var(--shadow); }
.showcase-top { display: flex; align-items: center; gap: 10px; font-weight: 850; margin-bottom: 18px; }
.drop-preview { min-height: 290px; border: 1.5px dashed rgba(37, 99, 235, .32); border-radius: 25px; display: grid; place-items: center; text-align: center; color: var(--muted); background: linear-gradient(135deg, rgba(37, 99, 235, .08), transparent), rgba(37, 99, 235, .04); padding: 24px; }
.drop-preview svg { width: 54px; height: 54px; color: var(--primary); }
.drop-preview strong, .drop-preview small { display: block; }
.floating-card { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-soft); backdrop-filter: blur(16px); box-shadow: var(--shadow-soft); font-weight: 800; color: var(--text); }
.floating-card svg { width: 18px; height: 18px; color: var(--primary); }
.card-a { top: 64px; left: 12px; } .card-b { right: 2px; top: 150px; } .card-c { left: 42px; bottom: 75px; }

.section { padding: 78px 0; }
.soft-section { background: color-mix(in srgb, var(--surface) 44%, transparent); border-block: 1px solid var(--border); }
.section-heading { text-align: center; max-width: 680px; margin: 0 auto 34px; }
.section-heading.align-left { text-align: left; margin-left: 0; }
.section-heading span { color: var(--primary); font-weight: 850; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.055em; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-card, .category-card, .feature-card, .trend-item, .new-tools-card, .stats-card, .cta-card, .upload-area, .result-panel, .faq-grid > div, .empty-state {
    border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-soft);
}
.tool-card { display: flex; gap: 15px; padding: 18px; border-radius: var(--radius); min-height: 174px; transition: transform .22s ease, border-color .22s ease; }
.tool-card:hover, .category-card:hover, .trend-item:hover { transform: translateY(-4px); border-color: rgba(37, 99, 235, .28); }
.tool-icon, .category-icon, .trend-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; background: rgba(37, 99, 235, .10); color: var(--primary); }
.tool-icon svg, .category-icon svg, .trend-icon svg { width: 23px; height: 23px; }
.tool-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tool-card h3, .category-card h3, .feature-card h3 { margin-bottom: 8px; font-size: 1.05rem; letter-spacing: -.02em; }
.tool-card p, .category-card p, .feature-card p { color: var(--muted); font-size: .94rem; margin-bottom: 12px; }
.badge, .trend-item em { font-style: normal; font-size: .72rem; border-radius: 999px; padding: 5px 8px; background: rgba(37, 99, 235, .10); color: var(--primary); font-weight: 850; }
.muted-badge { background: rgba(100, 116, 139, .12); color: var(--muted); }
.tool-meta { display: flex; gap: 12px; color: var(--muted); font-size: .84rem; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-card { padding: 20px; border-radius: var(--radius); min-height: 235px; display: flex; flex-direction: column; gap: 18px; transition: transform .22s ease, border-color .22s ease; }
.category-card span { color: var(--primary); font-weight: 850; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.trending-list { display: grid; gap: 12px; }
.trend-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; transition: transform .22s ease, border-color .22s ease; }
.trend-item small, .new-tools-card small { display: block; color: var(--muted); }
.new-tools-card { border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.new-tools-card.standalone { max-width: 760px; }
.new-tools-card a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; }
.new-tools-card a:hover { background: rgba(37, 99, 235, .08); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { padding: 22px; border-radius: var(--radius); }
.feature-card > svg { width: 28px; height: 28px; color: var(--primary); margin-bottom: 18px; }
.stats-card { margin-top: 22px; border-radius: 30px; padding: 28px; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stats-card strong { display: block; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.05em; }
.stats-card span { color: var(--muted); font-weight: 700; }
.cta-section { padding: 40px 0 82px; }
.cta-card { text-align: center; border-radius: 34px; padding: 56px 24px; background: radial-gradient(circle at top, rgba(37, 99, 235, .16), transparent 24rem), var(--surface); }
.cta-card > svg { width: 34px; height: 34px; color: var(--primary); }
.cta-card h2 { font-size: clamp(2rem, 5vw, 4rem); max-width: 760px; margin: 18px auto 12px; letter-spacing: -.06em; line-height: .98; }
.cta-card p { color: var(--muted); max-width: 620px; margin-inline: auto; }

.site-footer { border-top: 1px solid var(--border); padding: 52px 0 22px; background: color-mix(in srgb, var(--surface) 45%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 28px; }
.footer-brand p { color: var(--muted); max-width: 330px; }
.site-footer h4 { margin: 0 0 12px; }
.site-footer a { display: block; color: var(--muted); margin: 8px 0; }
.footer-bottom { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .92rem; }

.page-main { min-height: 64vh; }
.page-hero, .tool-hero { padding: 84px 0 20px; text-align: center; }
.page-hero.narrow, .tool-hero { max-width: 820px; }
.page-hero h1, .tool-hero h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: .9; margin: 20px 0 14px; letter-spacing: -.075em; }
.page-hero p, .tool-hero p { color: var(--muted); font-size: 1.12rem; }
.breadcrumbs { padding-top: 28px; display: flex; gap: 10px; color: var(--muted); font-size: .92rem; }
.breadcrumbs strong { color: var(--text); }

.tool-badge-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tool-workspace { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; padding-bottom: 50px; }
.upload-area, .result-panel, .faq-grid > div, .empty-state { border-radius: 28px; padding: 28px; }
.upload-area { min-height: 350px; display: grid; place-items: center; text-align: center; border-style: dashed; }
.upload-area svg { width: 54px; height: 54px; color: var(--primary); }
.result-panel p, .faq-grid p { color: var(--muted); }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 80px; }
.faq-item { border-top: 1px solid var(--border); padding: 14px 0; }
.faq-item summary { cursor: pointer; font-weight: 800; }
.related-list { display: grid; gap: 10px; }
.related-list a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(37, 99, 235, .06); }
.related-list svg { width: 18px; height: 18px; color: var(--primary); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 44px 24px; }
.empty-state p { color: var(--muted); }

.mini-tool-box { width: min(100%, 420px); display: grid; gap: 12px; margin-top: 10px; }
.mini-tool-box label { font-weight: 800; }
.mini-tool-box input[type="range"] { width: 100%; accent-color: var(--primary); }
.password-result { padding: 16px; border-radius: 16px; background: rgba(37, 99, 235, .08); color: var(--text); word-break: break-all; margin-bottom: 12px; font-weight: 800; }
