/* ============================================================
   工具站主题 v2（2026-10）：工具首页 / 分类页 / 工具页头 / 付费墙
   设计语言：墨紫深色 Hero + 暖白底 + 品牌紫点缀 + 大留白
   ============================================================ */

:root {
    --th-ink: #15122b;
    --th-ink-2: #1e1944;
    --th-brand: #667eea;
    --th-brand-deep: #764ba2;
    --th-gold: #e6b86d;
    --th-paper: #faf8f5;
    --th-line: #ece7e0;
    --th-ink-text: #211d3d;
    --th-muted: #7b7794;
    --th-radius: 16px;
    --th-shadow-soft: 0 2px 12px rgba(28, 22, 64, .06);
    --th-shadow-lift: 0 14px 40px rgba(28, 22, 64, .12);
}

/* ============ 工具首页 Hero ============ */
.th-hero {
    position: relative;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(118, 75, 162, .45), transparent 60%),
        radial-gradient(900px 480px at 8% 10%, rgba(102, 126, 234, .38), transparent 55%),
        linear-gradient(180deg, var(--th-ink) 0%, var(--th-ink-2) 100%);
    color: #fff;
    padding: 76px 0 96px;
    overflow: hidden;
}
.th-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.th-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.th-glow-a { width: 420px; height: 420px; right: -80px; top: -120px; background: #8b5cf6; }
.th-glow-b { width: 360px; height: 360px; left: -100px; bottom: -160px; background: #4f46e5; opacity: .4; }
.th-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}
.th-hero-inner { position: relative; text-align: center; max-width: 860px; }
.th-kicker {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px; border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 13px; letter-spacing: .08em; color: #cfd0ff;
    backdrop-filter: blur(8px);
}
.th-title {
    font-size: clamp(34px, 5.4vw, 56px);
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.15;
    margin: 22px 0 18px;
    background: linear-gradient(180deg, #ffffff 30%, #c7c9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.th-sub {
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.8;
    color: rgba(231, 230, 255, .78);
    max-width: 620px;
    margin: 0 auto 34px;
}
.th-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}
.th-search input {
    width: 100%;
    height: 58px;
    padding: 0 84px 0 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 15px;
    backdrop-filter: blur(12px);
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.th-search input::placeholder { color: rgba(220, 220, 245, .55); }
.th-search input:focus {
    border-color: rgba(165, 180, 255, .7);
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, .25);
}
.th-search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); font-size: 20px; color: rgba(220, 220, 245, .7); }
.th-search-kbd {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    padding: 3px 9px; border-radius: 8px; font-size: 12px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
    color: rgba(230, 230, 250, .8);
}
.th-stats {
    margin-top: 26px;
    display: flex; justify-content: center; align-items: center; gap: 16px;
    font-size: 14px; color: rgba(225, 225, 248, .72);
}
.th-stats strong { color: #fff; font-size: 17px; font-weight: 700; margin-right: 2px; }
.th-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .3); }

/* ============ 区块标题 ============ */
.th-section { padding-top: 56px; }
.th-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 22px;
}
.th-section-head h2 {
    font-size: 26px; font-weight: 800; color: var(--th-ink-text);
    margin: 0 0 6px; letter-spacing: .01em;
}
.th-section-head p { margin: 0; color: var(--th-muted); font-size: 14px; }
.th-more {
    color: var(--th-brand); text-decoration: none; font-size: 14px;
    font-weight: 600; white-space: nowrap;
}
.th-more:hover { color: var(--th-brand-deep); }

/* ============ 分类大卡 ============ */
.th-catcard {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    padding: 22px 18px 18px;
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    text-decoration: none;
    color: var(--th-ink-text);
    height: 100%;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.th-catcard::after {
    content: ""; position: absolute; right: -30px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: var(--cat, var(--th-brand)); opacity: .08;
    transition: transform .3s ease, opacity .3s ease;
}
.th-catcard:hover {
    transform: translateY(-4px);
    box-shadow: var(--th-shadow-lift);
    border-color: transparent;
    color: var(--th-ink-text);
}
.th-catcard:hover::after { transform: scale(2.2); opacity: .14; }
.th-catcard-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    background: linear-gradient(135deg, var(--cat, var(--th-brand)), color-mix(in srgb, var(--cat, var(--th-brand)) 55%, #15122b));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--cat, var(--th-brand)) 35%, transparent);
}
.th-catcard-name { font-weight: 700; font-size: 15px; }
.th-catcard-count { font-size: 12.5px; color: var(--th-muted); }
.th-catcard-arrow {
    position: absolute; right: 16px; bottom: 16px;
    font-size: 16px; color: var(--cat, var(--th-brand));
    opacity: 0; transform: translateX(-6px);
    transition: opacity .25s ease, transform .25s ease;
}
.th-catcard:hover .th-catcard-arrow { opacity: 1; transform: translateX(0); }

/* 分类配色（精心调配，非平均彩虹） */
.cat-crypto { --cat: #7c5cf5; }
.cat-converter { --cat: #2f9ed6; }
.cat-web { --cat: #20b28a; }
.cat-images-videos { --cat: #e06a9a; }
.cat-development { --cat: #5b6b8c; }
.cat-network { --cat: #e08a3e; }
.cat-math { --cat: #d6456b; }
.cat-measurement { --cat: #3aa6a0; }
.cat-text { --cat: #8a63d2; }
.cat-data { --cat: #4a7bd6; }

/* ============ 工具卡 v2（整卡可点） ============ */
.tcv2 {
    position: relative;
    display: flex; align-items: flex-start; gap: 12px;
    padding: 18px 16px;
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--th-ink-text);
    height: 100%;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.tcv2:hover {
    transform: translateY(-3px);
    box-shadow: var(--th-shadow-lift);
    border-color: rgba(102, 126, 234, .45);
    color: var(--th-ink-text);
}
.tcv2-icon {
    flex: 0 0 auto;
    width: 42px; height: 42px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    color: var(--th-brand);
    background: linear-gradient(135deg, rgba(102, 126, 234, .13), rgba(118, 75, 162, .13));
    transition: transform .22s ease;
}
.tcv2:hover .tcv2-icon { transform: scale(1.08) rotate(-3deg); }
.tcv2-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 20px; }
.tcv2-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.tcv2-desc {
    font-size: 12.5px; line-height: 1.55; color: var(--th-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.tcv2-go {
    position: absolute; right: 12px; top: 14px;
    font-size: 15px; color: var(--th-brand);
    opacity: 0; transform: translateX(-4px);
    transition: opacity .2s, transform .2s;
}
.tcv2:hover .tcv2-go { opacity: 1; transform: translateX(0); }
.tcv2-fee {
    position: absolute; right: 10px; bottom: 10px;
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; line-height: 1.5;
}
.tcv2-fee.free { background: #e8f7ef; color: #1a8a52; }
.tcv2-fee.paid { background: #fff1e3; color: #c26a17; }
.tcv2-fee .tcv2-fee-text { white-space: nowrap; }

.th-tool-group { margin-bottom: 40px; }
.th-tool-group-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--th-line);
}
.th-tool-group-head i { font-size: 20px; color: var(--th-brand); }
.th-tool-group-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--th-ink-text); }
.th-tool-group-count {
    font-size: 12px; font-weight: 700; color: var(--th-brand);
    background: rgba(102, 126, 234, .1); border-radius: 999px; padding: 2px 9px;
}
.th-tool-group-more { margin-left: auto; font-size: 13px; color: var(--th-muted); text-decoration: none; }
.th-tool-group-more:hover { color: var(--th-brand); }
.th-empty { text-align: center; padding: 60px 0; color: var(--th-muted); }
.th-empty i { font-size: 44px; display: block; margin-bottom: 12px; }

/* ============ 工具页头 ============ */
.tool-page-head { padding: 6px 0 22px; margin-bottom: 26px; }
.tool-breadcrumb { margin-bottom: 18px; font-size: 13px; }
.tool-breadcrumb .breadcrumb { --bs-breadcrumb-divider: '›'; }
.tool-breadcrumb .breadcrumb-item { color: var(--th-muted); }
.tool-breadcrumb a { color: var(--th-muted); text-decoration: none; transition: color .15s; }
.tool-breadcrumb a:hover { color: var(--th-brand); }
.tool-breadcrumb .breadcrumb-item.active { color: var(--th-ink-text); font-weight: 600; }

.tool-hero {
    display: flex; align-items: center; gap: 20px;
    background: linear-gradient(135deg, #fff 0%, #f7f6ff 100%);
    border: 1px solid var(--th-line);
    border-radius: 20px;
    padding: 26px 28px;
    position: relative;
    overflow: hidden;
}
.tool-hero::before {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, .14), transparent 70%);
}
.tool-hero-icon {
    flex: 0 0 auto;
    width: 64px; height: 64px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #fff;
    background: linear-gradient(135deg, var(--th-brand), var(--th-brand-deep));
    box-shadow: 0 10px 24px rgba(102, 126, 234, .35);
}
.tool-hero-text { min-width: 0; position: relative; }
.tool-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tool-hero-cat {
    display: inline-flex; align-items: center;
    padding: 3px 12px; border-radius: 999px;
    background: rgba(102, 126, 234, .1);
    color: var(--th-brand);
    font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.tool-hero-cat:hover { background: rgba(102, 126, 234, .18); color: var(--th-brand-deep); }
.tool-fee-badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.tool-fee-badge.free { background: #e8f7ef; color: #1a8a52; }
.tool-fee-badge.paid { background: #fff1e3; color: #c26a17; }
.tool-hero-text h1 {
    margin: 0 0 6px;
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 800;
    color: var(--th-ink-text);
    letter-spacing: .01em;
}
.tool-hero-desc { margin: 0; color: var(--th-muted); font-size: 14.5px; line-height: 1.7; }

/* ============ 分类页 Hero ============ */
.cat-hero-band {
    background:
        radial-gradient(800px 300px at 90% -20%, rgba(118, 75, 162, .35), transparent 60%),
        linear-gradient(180deg, var(--th-ink) 0%, var(--th-ink-2) 100%);
    color: #fff;
    padding: 26px 0 54px;
}
.cat-hero-band .tool-breadcrumb a,
.cat-hero-band .tool-breadcrumb .breadcrumb-item { color: rgba(225, 225, 248, .65); }
.cat-hero-band .tool-breadcrumb .breadcrumb-item.active { color: #fff; }
.cat-hero-inner { display: flex; align-items: center; gap: 22px; margin-top: 14px; }
.cat-hero-icon {
    width: 72px; height: 72px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: #fff;
    background: linear-gradient(135deg, var(--th-brand), var(--th-brand-deep));
    box-shadow: 0 12px 30px rgba(102, 126, 234, .4);
}
.cat-hero-inner h1 { margin: 0 0 4px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.cat-hero-inner p { margin: 0; color: rgba(225, 225, 248, .72); font-size: 14.5px; }

.cat-switch {
    margin-top: 56px; padding: 28px;
    background: #fff; border: 1px solid var(--th-line); border-radius: var(--th-radius);
}
.cat-switch-title { font-weight: 700; margin-bottom: 16px; color: var(--th-ink-text); }
.cat-switch-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cat-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; border-radius: 999px;
    background: var(--th-paper); border: 1px solid var(--th-line);
    color: var(--th-ink-text); font-size: 13.5px; text-decoration: none;
    transition: all .2s;
}
.cat-chip:hover { border-color: var(--th-brand); color: var(--th-brand); transform: translateY(-2px); }
.cat-back { color: var(--th-muted); text-decoration: none; font-size: 14px; }
.cat-back:hover { color: var(--th-brand); }

/* ============ 付费墙 ============ */
.paywall-page {
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(118, 75, 162, .18), transparent 60%),
        var(--th-paper);
    min-height: 70vh;
    padding: 28px 0 70px;
}
.paywall-card {
    position: relative;
    max-width: 560px;
    margin: 26px auto 0;
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: 24px;
    padding: 44px 40px 36px;
    text-align: center;
    box-shadow: var(--th-shadow-lift);
    overflow: hidden;
}
.paywall-glow {
    position: absolute; left: 50%; top: -120px; transform: translateX(-50%);
    width: 320px; height: 240px;
    background: radial-gradient(ellipse, rgba(102, 126, 234, .25), transparent 70%);
    pointer-events: none;
}
.paywall-icon {
    position: relative;
    width: 72px; height: 72px; margin: 0 auto 18px;
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: #fff;
    background: linear-gradient(135deg, var(--th-brand), var(--th-brand-deep));
    box-shadow: 0 12px 30px rgba(102, 126, 234, .4);
}
.paywall-kicker {
    position: relative;
    display: inline-block; font-size: 12.5px; letter-spacing: .12em;
    color: var(--th-brand); font-weight: 700; text-transform: uppercase;
}
.paywall-card h1 { position: relative; font-size: 24px; font-weight: 800; color: var(--th-ink-text); margin: 10px 0 4px; }
.paywall-tool { position: relative; font-size: 15px; color: var(--th-muted); font-weight: 600; margin: 0 0 18px; }
.paywall-desc { position: relative; color: var(--th-muted); font-size: 14.5px; line-height: 1.8; margin: 0 0 24px; }
.paywall-meta {
    position: relative;
    display: flex; justify-content: center; gap: 14px; margin-bottom: 22px;
}
.paywall-meta-item {
    flex: 1; max-width: 180px;
    border: 1px solid var(--th-line); border-radius: 14px;
    padding: 14px 10px;
}
.paywall-meta-item .k { display: block; font-size: 12.5px; color: var(--th-muted); margin-bottom: 6px; }
.paywall-meta-item .v { font-size: 24px; font-weight: 800; color: var(--th-ink-text); }
.paywall-meta-item .v.price { color: var(--th-brand); }
.paywall-rule {
    position: relative;
    background: var(--th-paper); border-radius: 10px;
    padding: 10px 14px; font-size: 12.5px; color: var(--th-muted);
    line-height: 1.7; text-align: left; margin: 0 0 26px;
}
.paywall-actions { position: relative; display: flex; flex-direction: column; gap: 10px; }
.btn-paywall-primary {
    height: 50px; border: 0; border-radius: 999px;
    background: linear-gradient(135deg, var(--th-brand), var(--th-brand-deep));
    color: #fff; font-weight: 700; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(102, 126, 234, .4);
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn-paywall-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(102, 126, 234, .5); }
.btn-paywall-ghost {
    height: 46px; border-radius: 999px;
    border: 1px solid var(--th-line); background: #fff;
    color: var(--th-ink-text); font-size: 14px;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.btn-paywall-ghost:hover { border-color: var(--th-brand); color: var(--th-brand); }

/* ============ 导航增强 ============ */
.navbar .nav-link { font-weight: 600; }
.nav-cat-menu {
    padding: 10px;
    border: 1px solid var(--th-line);
    border-radius: 14px;
    box-shadow: var(--th-shadow-lift);
    min-width: 200px;
}
.nav-cat-item {
    display: flex; align-items: center; gap: 10px;
    border-radius: 9px;
    padding: 8px 12px;
    font-size: 14px;
}
.nav-cat-item i { font-size: 17px; color: var(--th-brand); width: 20px; text-align: center; }
.nav-cat-item:hover { background: rgba(102, 126, 234, .08); }
.side-menu-label {
    padding: 8px 16px 4px;
    font-size: 12px; font-weight: 700; letter-spacing: .1em;
    color: var(--th-muted); text-transform: uppercase;
}

/* ============ 响应式 ============ */
@media (max-width: 767.98px) {
    .th-hero { padding: 52px 0 64px; }
    .th-search input { height: 52px; }
    .th-stats { flex-wrap: wrap; gap: 10px; }
    .th-section { padding-top: 40px; }
    .th-section-head h2 { font-size: 21px; }
    .tool-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
    .paywall-card { padding: 34px 22px 28px; margin-top: 14px; }
    .cat-hero-inner { gap: 14px; }
    .cat-hero-icon { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
    .tcv2 { padding: 14px 12px; gap: 10px; }
    .tcv2-icon { width: 38px; height: 38px; font-size: 19px; }
    .tcv2-body { padding-right: 8px; }
    .tcv2-fee { position: static; margin-top: 2px; align-self: flex-start; }
    .tcv2-go { display: none; }
}
