/* ======================================================================
 *  热门工具榜 /hot
 *  依赖 home.css 的全局变量（--c-*）
 * ====================================================================== */

/* ---------- 面包屑 ---------- */
.hot-crumb-wrap { padding: 18px 0 4px; }
.hot-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--c-text-muted);
}
.hot-crumb a { color: var(--c-text-sub); text-decoration: none; transition: color 0.16s ease; }
.hot-crumb a:hover { color: var(--c-primary); }
.hot-crumb .sep { opacity: 0.6; }
.hot-crumb .current { font-weight: 700; color: var(--c-text); }

/* ---------- Hero ---------- */
.hot-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 30px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(239, 68, 68, 0.07) 45%, rgba(99, 102, 241, 0.10));
    border-bottom: 1px solid var(--c-border);
}
.hot-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -60% -10%;
    height: 200px;
    background: radial-gradient(50% 100% at 50% 100%, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0) 70%);
    pointer-events: none;
}
.hot-hero-inner { position: relative; max-width: 820px; }
.hot-hero-badge {
    display: inline-block;
    padding: 5px 13px;
    margin-bottom: 12px;
    font-size: 12.5px;
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 99px;
}
.hot-hero h1 {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--c-text);
}
.hot-lead {
    margin-top: 12px;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--c-text-sub);
}
.hot-lead b { color: var(--c-text); }

.hot-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hot-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-text-sub);
    text-decoration: none;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.16s ease;
}
.hot-quick-btn:hover { color: var(--c-primary); border-color: var(--c-primary); transform: translateY(-1px); }
.hot-quick-btn.is-primary {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: transparent;
    box-shadow: 0 5px 16px rgba(239, 68, 68, 0.26);
}
.hot-quick-btn.is-primary:hover { color: #fff; filter: brightness(1.06); }

.hot-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
    max-width: 640px;
}
.hot-stat {
    padding: 14px 12px;
    text-align: center;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}
.hot-stat b { display: block; font-size: 20px; font-weight: 900; color: var(--c-primary); letter-spacing: -0.01em; }
.hot-stat span { display: block; margin-top: 3px; font-size: 12px; color: var(--c-text-muted); }

.hot-realnote {
    max-width: 640px;
    margin: 14px 0 0;
    padding: 9px 13px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--c-text-muted);
    background: color-mix(in srgb, var(--c-primary) 6%, transparent);
    border: 1px dashed color-mix(in srgb, var(--c-primary) 26%, transparent);
    border-radius: 10px;
}
.hot-realnote b { color: var(--c-primary); }

/* ---------- 锚点导航 ---------- */
.hot-anchor {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--c-bg-card);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.hot-anchor-inner {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.hot-anchor-inner::-webkit-scrollbar { display: none; }
.hot-anchor a {
    flex: 0 0 auto;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-sub);
    text-decoration: none;
    white-space: nowrap;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    transition: all 0.16s ease;
}
.hot-anchor a:hover { color: var(--c-primary); border-color: var(--c-primary); }

/* ---------- 通用区块 ---------- */
.hot-section { padding: 34px 0 6px; scroll-margin-top: 68px; }
.hot-section--scene { padding-top: 30px; }
.hot-head { margin-bottom: 18px; }
.hot-head h2 {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--c-text);
}
.hot-head p { margin-top: 6px; font-size: 13.5px; color: var(--c-text-muted); }
.hot-empty { padding: 30px 0; text-align: center; font-size: 14px; color: var(--c-text-muted); }

/* ---------- 榜单 TOP 12 ---------- */
.hot-rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.rank-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    text-decoration: none;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: all 0.18s ease;
}
.rank-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07); }
.rank-card.is-top { border-color: rgba(245, 158, 11, 0.5); }
.rank-card.is-top::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.09), rgba(245, 158, 11, 0) 60%);
    pointer-events: none;
}

.rank-no {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-size: 13px;
    font-weight: 900;
    color: var(--c-text-muted);
    background: var(--c-surface-soft);
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}
.rank-card.is-top .rank-no { color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.rank-icon { flex: 0 0 auto; font-size: 22px; line-height: 1; }
.rank-body { flex: 1 1 auto; min-width: 0; }
.rank-body b {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-body small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--c-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rank-meter {
    display: block;
    height: 4px;
    margin-top: 8px;
    border-radius: 99px;
    background: var(--c-surface-soft);
    overflow: hidden;
}
.rank-meter i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #fbbf24, #ef4444);
}
.rank-cat {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-text-muted);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    white-space: nowrap;
}

/* ---------- 场景导航 ---------- */
.hot-scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}
.scene-card {
    padding: 18px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease;
}
.scene-card:hover { border-color: var(--c-primary); }
.scene-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.scene-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    font-size: 19px;
    border-radius: 12px;
    background: var(--c-primary-soft);
}
.scene-title b { display: block; font-size: 15px; font-weight: 800; color: var(--c-text); }
.scene-title small { display: block; margin-top: 2px; font-size: 12px; color: var(--c-text-muted); }
.scene-links { display: flex; flex-wrap: wrap; gap: 8px; }
.scene-links a {
    padding: 6px 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text-sub);
    text-decoration: none;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 9px;
    transition: all 0.16s ease;
}
.scene-links a:hover { color: var(--c-primary); border-color: var(--c-primary); background: var(--c-primary-soft); }

/* ---------- 分类筛选 ---------- */
.hot-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 24px;
}
.hot-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-sub);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.16s ease;
}
.hot-tab:hover { color: var(--c-primary); border-color: var(--c-primary); }
.hot-tab i {
    font-style: normal;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--c-bg-card);
    color: var(--c-text-muted);
}
.hot-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.24);
}
.hot-tab.is-active i { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* ---------- 分类分组 ---------- */
.hot-group { margin-bottom: 30px; scroll-margin-top: 68px; }
.hot-group[hidden] { display: none; }
.group-head { display: flex; align-items: baseline; gap: 10px; }
.group-head h3 { font-size: 17px; font-weight: 900; color: var(--c-text); letter-spacing: -0.01em; }
.group-count {
    padding: 2px 9px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--c-text-muted);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 99px;
}
.group-desc { margin: 6px 0 14px; font-size: 13px; color: var(--c-text-muted); }

.hot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 11px;
}
.hot-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    text-decoration: none;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 13px;
    transition: all 0.16s ease;
}
.hot-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: 0 7px 18px rgba(0, 0, 0, 0.06); }
.hot-card-icon { flex: 0 0 auto; font-size: 21px; line-height: 1.2; }
.hot-card-body { flex: 1 1 auto; min-width: 0; }
.hot-card-body b { display: block; font-size: 14px; font-weight: 800; color: var(--c-text); }
.hot-card-body small {
    display: -webkit-box;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.65;
    color: var(--c-text-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hot-card-hot {
    flex: 0 0 auto;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 99px;
    white-space: nowrap;
}

/* ---------- 图文说明区 ---------- */
.hot-seo h2 {
    margin: 26px 0 10px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--c-text);
}
.hot-seo h2:first-child { margin-top: 0; }
.hot-seo p { font-size: 14px; line-height: 1.95; color: var(--c-text-sub); }
.hot-seo p + p { margin-top: 10px; }
.hot-seo a { color: var(--c-primary); text-decoration: none; font-weight: 700; }
.hot-seo a:hover { text-decoration: underline; }

.hot-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.hot-step {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 13px;
}
.hot-step-no {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 12.5px;
    font-weight: 900;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.hot-step-body b { display: block; font-size: 13.5px; font-weight: 800; color: var(--c-text); }
.hot-step-body p { margin-top: 4px; font-size: 12.5px; line-height: 1.8; color: var(--c-text-muted); }
.hot-step-body kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    color: var(--c-text-sub);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 5px;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; }
.faq-item {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 13px;
    overflow: hidden;
    transition: border-color 0.16s ease;
}
.faq-item[open] { border-color: var(--c-primary); }
.faq-item summary {
    padding: 15px 18px;
    font-size: 14px;
    font-weight: 800;
    color: var(--c-text);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 19px;
    font-weight: 700;
    color: var(--c-text-muted);
    transition: transform 0.18s ease;
}
.faq-item[open] summary::after { content: "−"; color: var(--c-primary); }
.faq-a {
    padding: 0 18px 16px;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--c-text-sub);
}
.faq-a b { color: var(--c-text); }
.faq-a a { color: var(--c-primary); text-decoration: none; font-weight: 700; }
.faq-a a:hover { text-decoration: underline; }

/* ---------- 相关页面 ---------- */
.hot-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hot-rel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    text-decoration: none;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 13px;
    transition: all 0.16s ease;
}
.hot-rel-item:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: 0 7px 18px rgba(0, 0, 0, 0.06); }
.hot-rel-icon { flex: 0 0 auto; font-size: 22px; }
.hot-rel-body { flex: 1 1 auto; min-width: 0; }
.hot-rel-body b { display: block; font-size: 14px; font-weight: 800; color: var(--c-text); }
.hot-rel-body small { display: block; margin-top: 2px; font-size: 12px; color: var(--c-text-muted); }
.hot-rel-go { flex: 0 0 auto; font-size: 15px; font-weight: 800; color: var(--c-primary); }

/* ---------- 返回顶部 ---------- */
.hot-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    z-index: 60;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.32);
    transition: all 0.22s ease;
}
.hot-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.hot-top:hover { filter: brightness(1.08); }

/* ---------- 页脚收尾 ---------- */
.hot-section--rel { padding-bottom: 46px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
    .hot-crumb-wrap { padding: 14px 0 2px; }
    .hot-hero { padding: 26px 0 24px; }
    .hot-hero h1 { font-size: 25px; }
    .hot-lead { font-size: 13.5px; }
    .hot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hot-stat b { font-size: 18px; }
    .hot-anchor { top: 0; }
    .hot-section { padding: 26px 0 4px; }
    .hot-head h2 { font-size: 18px; }
    .rank-cat { display: none; }
    .hot-rank-grid, .hot-grid, .hot-rel-grid { grid-template-columns: 1fr; }
    .hot-top { right: 14px; bottom: 18px; width: 40px; height: 40px; }
}

/* ---------- 黑夜模式 ---------- */
[data-theme="dark"] .hot-hero {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(239, 68, 68, 0.07) 45%, rgba(99, 102, 241, 0.12));
}
[data-theme="dark"] .hot-hero-badge { color: #fbbf24; }
[data-theme="dark"] .hot-anchor { box-shadow: none; }
[data-theme="dark"] .rank-card:hover,
[data-theme="dark"] .hot-card:hover,
[data-theme="dark"] .hot-rel-item:hover { box-shadow: 0 7px 18px rgba(0, 0, 0, 0.4); }
