/*
Theme Name: FreeABCD
Theme URI: https://www.freeabcd.com
Author: FreeABCD
Description: 互联网导航聚合站点主题 v5.0：12 大栏目导航、工具卡片网格、站内搜索、深浅双模式、AdSense 广告位预留。境外部署，仅提供第三方外部链接跳转。
Version: 5.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: freeabcd
Tags: navigation, directory, tools, responsive
*/

/* ===== 设计令牌 ===== */
:root {
  --p-primary: #2563eb;
  --p-primary-dark: #1d4ed8;
  --p-accent: #3ea4ec;
  --p-bg: #f7f8fa;
  --p-card: #ffffff;
  --p-text: #1f2937;
  --p-text-light: #6b7280;
  --p-border: #e5e7eb;
  --p-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  --p-shadow-hover: 0 10px 26px rgba(15, 23, 42, .12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
html.dark {
  --p-primary: #60a5fa;
  --p-primary-dark: #3b82f6;
  --p-accent: #7dd3fc;
  --p-bg: #101318;
  --p-card: #1a1f27;
  --p-text: #e5e7eb;
  --p-text-light: #9ca3af;
  --p-border: #2a303a;
  --p-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  --p-shadow-hover: 0 10px 26px rgba(0, 0, 0, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--p-text);
  background: var(--p-bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
a { color: var(--p-primary); text-decoration: none; }
a:hover { color: var(--p-primary-dark); }
img { max-width: 100%; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--p-border);
}
html.dark .site-header { background: rgba(16, 19, 24, .92); }
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 14px; min-height: 58px;
}
.site-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--p-primary), var(--p-accent));
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .5);
}
.brand-text { font-weight: 800; font-size: 17px; letter-spacing: .3px; color: var(--p-text); }

.main-nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: inline-block; padding: 6px 10px; border-radius: 8px;
  color: var(--p-text); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  border: none; background: none; cursor: pointer; font-family: var(--font);
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(37, 99, 235, .08); color: var(--p-primary); }
.nav-item.current { background: var(--p-primary); color: #fff; }
html.dark .nav-item:hover { background: rgba(96, 165, 250, .14); }

/* 更多下拉 */
.nav-more { position: relative; }
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px;
  background: var(--p-card); border: 1px solid var(--p-border); border-radius: 12px;
  box-shadow: var(--p-shadow-hover); padding: 8px; z-index: 200;
}
.nav-dropdown.open { display: block; }
.dropdown-item {
  display: block; padding: 9px 14px; border-radius: 8px;
  color: var(--p-text); font-size: 14px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.dropdown-item:hover { background: rgba(37, 99, 235, .08); color: var(--p-primary); }
.dropdown-item.current { color: var(--p-primary); font-weight: 600; }
.dropdown-divider { height: 1px; background: var(--p-border); margin: 6px 4px; }

/* 搜索框 */
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search-box {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--p-border); border-radius: 10px;
  background: var(--p-card); overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box:focus-within { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.search-box input {
  border: none; outline: none; background: none;
  padding: 7px 12px; font-size: 13.5px; width: 170px;
  color: var(--p-text); font-family: var(--font);
}
.search-box button {
  border: none; background: none; cursor: pointer;
  padding: 7px 10px; font-size: 14px; color: var(--p-text-light);
}
.theme-toggle, .nav-toggle {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--p-border); background: var(--p-card);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--p-primary); }
.nav-toggle { display: none; }

/* 移动端菜单 */
.mobile-nav {
  display: none; flex-direction: column; padding: 12px 16px 18px;
  border-top: 1px solid var(--p-border); gap: 2px;
}
.mobile-nav.open { display: flex; }
.mobile-item { padding: 11px 12px; border-radius: 8px; color: var(--p-text); font-size: 15px; }
.mobile-item:hover { background: rgba(37, 99, 235, .08); color: var(--p-primary); }
.mobile-more-title {
  padding: 10px 12px 4px; font-size: 12.5px; font-weight: 700;
  color: var(--p-text-light); letter-spacing: 1px;
}
.mobile-search { margin-bottom: 8px; }
.mobile-search input { width: 100%; }

/* ===== 区块标题 ===== */
.section-title {
  font-size: 19px; font-weight: 800; margin: 34px 0 16px;
  display: flex; align-items: center; gap: 10px; color: var(--p-text);
}
.section-title::before {
  content: ""; width: 20px; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--p-primary), var(--p-accent));
}

/* ===== 首页栏目卡片 ===== */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
}
.cat-card {
  display: block; background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--p-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  color: var(--p-text);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--p-shadow-hover); border-color: rgba(37,99,235,.35); color: var(--p-text); }
.cat-name { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.cat-subs { font-size: 12px; color: var(--p-primary); margin-bottom: 6px; }
.cat-desc { font-size: 12.5px; color: var(--p-text-light); line-height: 1.6; margin-bottom: 10px; }
.cat-count {
  font-size: 11.5px; font-weight: 600; color: var(--p-primary);
  background: rgba(37, 99, 235, .08); padding: 2px 10px; border-radius: 99px;
  display: inline-block;
}

/* ===== 栏目页 ===== */
.archive-header {
  background: var(--p-card); border-bottom: 1px solid var(--p-border);
  padding: 26px 0; margin-bottom: 22px;
}
.archive-title { font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.archive-desc { font-size: 13.5px; color: var(--p-text-light); margin-top: 6px; }
.cat-notice {
  margin-top: 14px; padding: 11px 16px; border-radius: 10px;
  background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .35);
  font-size: 13px; color: var(--p-text); line-height: 1.6;
}
.sub-section { margin-bottom: 30px; }
.sub-title {
  font-size: 16.5px; font-weight: 700; margin: 26px 0 13px;
  display: flex; align-items: center; gap: 9px; color: var(--p-text);
}
.sub-title::before {
  content: ""; width: 6px; height: 18px; border-radius: 99px;
  background: linear-gradient(180deg, var(--p-primary), var(--p-accent));
}
.empty-tip { padding: 30px; text-align: center; color: var(--p-text-light); font-size: 14px; }

/* ===== 工具卡片网格 ===== */
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 13px;
}
.tool-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--p-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--p-shadow-hover); border-color: rgba(37,99,235,.3); }
.tool-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; min-width: 0; }
.tool-name { font-size: 14.5px; font-weight: 700; line-height: 1.4; min-width: 0; }
.tool-name a { color: var(--p-text); word-break: break-word; }
.tool-name a:hover { color: var(--p-primary); }
.tool-tag {
  flex-shrink: 0; font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.tool-tag-open { background: rgba(16, 185, 129, .12); color: #059669; }
.tool-tag-free { background: rgba(250, 204, 21, .14); color: #b45309; }
html.dark .tool-tag-open { color: #34d399; }
html.dark .tool-tag-free { color: #fbbf24; }
.tool-desc { font-size: 12.5px; color: var(--p-text-light); line-height: 1.6; flex: 1; margin-bottom: 10px; }
.tool-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-link {
  font-size: 12.5px; font-weight: 600; color: var(--p-primary);
  display: inline-flex; align-items: center; gap: 3px;
}
.tool-link:hover { text-decoration: underline; }
.tool-cat { font-size: 11px; color: var(--p-text-light); }

/* ===== 广告容器（合规：带「广告」标识） ===== */
.fa-ad {
  margin: 20px 0; padding: 12px; position: relative;
  background: var(--p-card); border: 1px dashed var(--p-border);
  border-radius: var(--radius);
}
.fa-ad-label {
  position: absolute; top: 7px; right: 10px; z-index: 2;
  font-size: 11px; color: var(--p-text-light);
  background: var(--p-bg); padding: 1px 8px; border-radius: 99px; letter-spacing: 1px;
}
.fa-ad-body { min-height: 40px; display: flex; align-items: center; justify-content: center; }
.fa-ad-body ins, .fa-ad-body iframe, .fa-ad-body img { max-width: 100%; }

/* ===== 资讯流 ===== */
.news-list { list-style: none; }
.news-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 9px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.news-item:hover { border-color: rgba(37,99,235,.35); box-shadow: var(--p-shadow); }
.news-item a { color: var(--p-text); font-size: 14px; }
.news-item a:hover { color: var(--p-primary); }
.news-date { font-size: 12px; color: var(--p-text-light); flex-shrink: 0; }
.news-empty {
  background: var(--p-card); border: 1px dashed var(--p-border);
  border-radius: 10px; padding: 22px; text-align: center;
  color: var(--p-text-light); font-size: 13.5px;
}

/* ===== 表单（失效反馈 / 违规举报） ===== */
.fa-form { margin: 20px 0; }
.fa-form p { margin-bottom: 14px; }
.fa-form label { font-size: 13.5px; font-weight: 600; }
.fa-form input[type="url"], .fa-form input[type="text"], .fa-form textarea, .fa-form select {
  width: 100%; max-width: 560px; margin-top: 6px;
  padding: 10px 14px; border: 1px solid var(--p-border); border-radius: 10px;
  font-size: 14px; font-family: var(--font); color: var(--p-text);
  background: var(--p-card); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fa-form input:focus, .fa-form textarea:focus, .fa-form select:focus {
  border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.fa-btn {
  background: var(--p-primary); color: #fff; border: none; cursor: pointer;
  padding: 11px 26px; border-radius: 10px; font-size: 14px; font-weight: 600;
  font-family: var(--font); transition: background .15s ease;
}
.fa-btn:hover { background: var(--p-primary-dark); }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--p-card); border-top: 1px solid var(--p-border);
  margin-top: 48px; padding: 34px 0 26px; font-size: 13px;
}
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.footer-slogan { font-size: 12.5px; color: var(--p-text-light); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.footer-links a { color: var(--p-text-light); font-size: 13.5px; }
.footer-links a:hover { color: var(--p-primary); }
.footer-note { font-size: 12px; color: var(--p-text-light); line-height: 1.8; max-width: 900px; margin-bottom: 18px; }
.footer-bottom {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--p-border); padding-top: 16px;
  font-size: 12px; color: var(--p-text-light);
}
.footer-bottom a { color: var(--p-text-light); }
.footer-bottom a:hover { color: var(--p-primary); }
.footer-sep { opacity: .5; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: 10px; font-size: 14px; color: var(--p-text);
}
.pagination .page-numbers.current {
  background: var(--p-primary); border-color: var(--p-primary); color: #fff;
}

/* ===== 独立页面正文 ===== */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 32px 20px 48px; }
.page-title { font-size: 25px; font-weight: 800; margin-bottom: 20px; }
.page-body { font-size: 15px; line-height: 1.9; }
.page-body h2 { font-size: 19px; margin: 26px 0 12px; }
.page-body h3 { font-size: 16.5px; margin: 22px 0 10px; }
.page-body p { margin-bottom: 14px; }
.page-body ul, .page-body ol { margin: 0 0 14px 24px; }
.page-body strong { font-weight: 700; }
.page-body em { color: var(--p-text-light); }

/* ===== 移动端 ===== */
@media (max-width: 960px) {
  .search-box input { width: 120px; }
  .nav-item { padding: 6px 8px; font-size: 12.5px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; }
  .header-inner { flex-wrap: wrap; min-height: 56px; }
  .header-tools { margin-left: auto; }
  .search-box { display: none; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
}
@media (max-width: 560px) {
  .cat-grid, .tool-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .cat-card, .tool-card { padding: 13px 14px; }
  .tool-name { font-size: 13.5px; }
  .tool-desc { font-size: 12px; }
  .news-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-title { font-size: 17px; }
  .archive-title { font-size: 20px; }
}

/* 触控优化 */
@media (max-width: 860px) {
  .nav-item, .mobile-item, .nav-toggle, .theme-toggle { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ===== v6 单页滚动版：分段布局 + 锚点导航 ===== */
/* 锚点滚动偏移（避开 sticky header） */
.home-section { scroll-margin-top: 68px; }
/* 分段布局：每栏目独立区块，浅灰分割 */
.home-body { padding-bottom: 40px; }
.home-section {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--p-border);
}
.home-section:last-child { border-bottom: none; }
.section-head { margin-bottom: 8px; }
.section-head .section-title { margin: 0 0 12px; }
.sub-block { margin-bottom: 22px; }
.sub-block:last-child { margin-bottom: 0; }
/* 分割线（浅灰） */
.home-section + .home-section { margin-top: 0; }
/* 侧边锚点导航（桌面固定右侧） */
.side-nav {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 90; display: none; flex-direction: column; gap: 4px;
  background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: 12px; padding: 10px 8px; box-shadow: var(--p-shadow-hover);
  max-height: 70vh; overflow-y: auto;
}
.side-nav a {
  display: block; padding: 5px 12px; border-radius: 7px;
  font-size: 12.5px; color: var(--p-text); white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.side-nav a:hover { background: rgba(37, 99, 235, .08); color: var(--p-primary); }
.side-nav a.active { background: var(--p-primary); color: #fff; }
html.dark .side-nav a:hover { background: rgba(96, 165, 250, .14); }
@media (min-width: 1400px) { .side-nav { display: flex; } }

/* 移动端分段适配 */
@media (max-width: 860px) {
  .home-section { padding: 20px 0 24px; scroll-margin-top: 60px; }
}

/* ===== v7.1 AI语音工具分组 + 侧边子锚点 ===== */
.sub-group-title {
  font-size: 14px; font-weight: 700; margin: 18px 0 10px;
  display: flex; align-items: center; gap: 8px; color: var(--p-text);
}
.sub-group-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 99px;
  background: var(--p-accent); flex-shrink: 0;
}
.sub-block { scroll-margin-top: 68px; }
.side-nav-sub {
  padding-left: 22px !important; font-size: 12px !important;
  color: var(--p-text-light) !important;
}
.side-nav-sub::before {
  content: "└ "; opacity: .6;
}
@media (max-width: 860px) {
  .sub-block { scroll-margin-top: 60px; }
}

.fav-modal {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(15, 23, 42, .5); align-items: center; justify-content: center;
  padding: 20px;
}
.fav-modal.open { display: flex; }
.fav-modal-box {
  width: 100%; max-width: 380px; background: var(--p-card);
  border-radius: 14px; padding: 24px; box-shadow: var(--p-shadow-hover);
}
.fav-modal-box h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; color: var(--p-text); }
.fav-modal-box label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: var(--p-text); }
.fav-modal-box input[type="text"], .fav-modal-box input[type="url"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--p-border); border-radius: 9px;
  font-size: 14px; font-family: var(--font); color: var(--p-text); background: var(--p-bg);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.fav-modal-box input:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.fav-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.fav-btn-cancel, .fav-btn-save {
  padding: 9px 18px; border-radius: 9px; font-size: 14px; font-weight: 600;
  font-family: var(--font); cursor: pointer; border: 1px solid var(--p-border); background: var(--p-card); color: var(--p-text);
}
.fav-btn-save { background: var(--p-primary); border-color: var(--p-primary); color: #fff; }
.fav-btn-save:hover { background: var(--p-primary-dark); }
.fav-btn-cancel:hover { border-color: var(--p-primary); color: var(--p-primary); }

/* 响应式：平板 3 张 / 手机 2 张，桌面保持单行 7 张 */

/* ===== v10.2 信任增强：额度说明 + 核实徽章 ===== */
.tool-note {
  font-size: 11.5px; color: #b45309; line-height: 1.5;
  background: rgba(250, 204, 21, .12); border-radius: 8px;
  padding: 6px 9px; margin: 0 0 9px;
}
html.dark .tool-note { color: #fbbf24; background: rgba(250,204,21,.08); }
.tool-card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--p-border);
  font-size: 10.5px; color: var(--p-text-light);
}
.tool-verified { white-space: nowrap; }
.tool-date { white-space: nowrap; }
@media (max-width: 560px) {
  .tool-card-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ===== v10.3 首页推荐区块 + 页脚安全提示 ===== */
.section-sub { font-size: 12.5px; color: var(--p-text-light); margin: -8px 0 14px; }
#hot-tools { scroll-margin-top: 68px; }
.footer-safety {
  font-size: 12px; color: #b45309; line-height: 1.7; max-width: 900px; margin-bottom: 18px;
  background: rgba(250, 204, 21, .08); border-radius: 8px; padding: 8px 12px;
}
html.dark .footer-safety { color: #fbbf24; }

/* ===== v11.1 场景入口 / 我的收藏 / 对比表 / 最近更新 / 卡片操作 ===== */

/* 场景卡片 */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.scenario-card {
  background: var(--p-card); border: 1px solid var(--p-border); border-radius: var(--radius);
  box-shadow: var(--p-shadow); overflow: hidden; scroll-margin-top: 68px;
}
.scenario-card[open] { border-color: rgba(37,99,235,.4); }
.scenario-summary {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer;
  list-style: none; transition: background .15s ease;
}
.scenario-summary::-webkit-details-marker { display: none; }
.scenario-summary:hover { background: rgba(37,99,235,.04); }
.scenario-icon { font-size: 24px; flex-shrink: 0; }
.scenario-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scenario-title { font-size: 14.5px; font-weight: 700; color: var(--p-text); }
.scenario-desc { font-size: 12px; color: var(--p-text-light); }
.scenario-arrow { color: var(--p-text-light); font-size: 14px; transition: transform .2s ease; }
.scenario-card[open] .scenario-arrow { transform: rotate(180deg); }
.scenario-body { padding: 4px 16px 16px; border-top: 1px dashed var(--p-border); }
.scenario-why { font-size: 13px; color: var(--p-text); background: rgba(37,99,235,.06); border-radius: 8px; padding: 8px 11px; margin: 12px 0; line-height: 1.6; }
.scenario-steps { font-size: 13px; color: var(--p-text-light); line-height: 1.7; margin-top: 12px; }

/* 我的收藏 */
.my-tools-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fa-btn-sm { padding: 8px 16px; font-size: 13px; }
.my-tools-count { font-size: 12.5px; color: var(--p-text-light); }
.my-tools-grid:empty::before { content: ""; }

/* 对比表 */
.compare-block { margin-bottom: 20px; }
.compare-title { font-size: 14.5px; font-weight: 700; margin-bottom: 10px; color: var(--p-text); }
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--p-card); border: 1px solid var(--p-border); border-radius: 10px; overflow: hidden; }
.compare-table th, .compare-table td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--p-border); white-space: nowrap; }
.compare-table th { background: rgba(37,99,235,.06); font-weight: 700; color: var(--p-text); }
.compare-table td { color: var(--p-text); }
.compare-table .compare-name { text-align: left; font-weight: 600; }
.compare-table .cell-ok { color: #059669; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-tree { font-size: 13px; color: var(--p-text-light); background: rgba(250,204,21,.08); border-radius: 8px; padding: 8px 12px; margin-top: 10px; line-height: 1.7; }

/* 最近更新 */
.update-list { list-style: none; }
.update-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: 10px; margin-bottom: 7px; font-size: 13.5px;
}
.update-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p-primary); flex-shrink: 0; }
.update-item a { color: var(--p-text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-item a:hover { color: var(--p-primary); }
.update-time { font-size: 12px; color: var(--p-text-light); flex-shrink: 0; }

/* 工具卡操作行 */
.tool-card-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--p-border);
}
.tool-fav {
  border: 1px solid var(--p-border); background: var(--p-card); color: var(--p-text);
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  font-family: var(--font); transition: all .15s ease;
}
.tool-fav:hover { border-color: #f59e0b; color: #f59e0b; }
.tool-fav.on { background: #fef3c7; border-color: #f59e0b; color: #b45309; }
html.dark .tool-fav.on { background: rgba(245,158,11,.15); color: #fbbf24; }
.tool-vote { display: flex; gap: 4px; }
.vote-btn {
  border: 1px solid var(--p-border); background: var(--p-card);
  font-size: 12px; width: 28px; height: 26px; border-radius: 7px; cursor: pointer;
  transition: all .15s ease; line-height: 1;
}
.vote-btn:hover { border-color: var(--p-primary); }
.vote-btn.on { background: rgba(37,99,235,.12); border-color: var(--p-primary); }

/* 移动端 */
@media (max-width: 860px) {
      .scenario-grid { grid-template-columns: 1fr; }
  .tool-card-actions { flex-wrap: wrap; }
}

/* ===== v12.1 折叠逻辑 + favicon 高清 ===== */
/* 栏目折叠 */
.home-section { position: relative; }
.section-head { position: relative; }
.fold-toggle {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--p-border); background: var(--p-card);
  color: var(--p-text-light); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s ease; font-family: var(--font); line-height: 1;
  z-index: 5;
}
.fold-toggle:hover { border-color: var(--p-primary); color: var(--p-primary); }
.home-section.folded .fold-toggle { transform: translateY(-50%) rotate(-90deg); }
.home-section.folded .section-body { display: none; }
.home-section.folded .section-sub { display: none; }
/* 空栏目折叠态：仅标题行 */
.home-section.empty-section .section-body { display: none; }
.home-section.empty-section .fold-toggle { display: none; }
.home-section.empty-section { padding-bottom: 6px; }


/* ===== v13.1 我的收藏紧凑卡 + 最近更新横排 ===== */
/* 紧凑收藏卡片（一行多列，小巧） */
.my-tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px;
}
.mt-card {
  position: relative;
  display: flex; align-items: center;
  background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: 10px; padding: 8px 10px; box-shadow: var(--p-shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  min-height: 44px;
}
.mt-card:hover { transform: translateY(-2px); box-shadow: var(--p-shadow-hover); border-color: rgba(37,99,235,.35); }
.mt-link {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
  color: var(--p-text); text-decoration: none;
}
.mt-link:hover { color: var(--p-text); }
.mt-ico {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 800;
}
.mt-name {
  font-size: 12.5px; line-height: 1.3; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-del {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  width: 18px; height: 18px; border-radius: 5px; border: none; cursor: pointer;
  background: rgba(0,0,0,.06); color: var(--p-text-light); font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s ease, background .15s ease;
}
.mt-card:hover .mt-del { opacity: 1; }
.mt-del:hover { background: rgba(239, 68, 68, .15); color: #ef4444; }

/* 最近更新横排（一行 4-6 个） */
.update-grid {
  list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px;
}
.update-cell {
  background: var(--p-card); border: 1px solid var(--p-border);
  border-radius: 9px; overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.update-cell:hover { border-color: rgba(37,99,235,.35); box-shadow: var(--p-shadow); transform: translateY(-1px); }
.update-cell a {
  display: block; padding: 9px 12px; font-size: 13px; color: var(--p-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.update-cell a:hover { color: var(--p-primary); }

/* 添加外部网站按钮 */
.fa-btn-ghost { background: var(--p-card); border: 1px solid var(--p-border); color: var(--p-text); }
.fa-btn-ghost:hover { border-color: var(--p-primary); color: var(--p-primary); background: rgba(37,99,235,.05); }

/* 移动端 */
@media (max-width: 767px) {
  .my-tools-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .update-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .mt-del { opacity: 1; }
}


/* ===== v14.2 图标按钮 tooltip + 对比评测弹窗 ===== */
/* 标题行右侧操作区 */
.head-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.section-head .section-title { margin: 0; }
.section-sub { width: 100%; }

/* 通用图标按钮（含 tooltip） */
.icon-btn {
  position: relative; width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--p-border); background: var(--p-card);
  color: var(--p-primary); font-size: 17px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s ease; font-family: var(--font); line-height: 1;
}
.icon-btn:hover { border-color: var(--p-primary); background: rgba(37,99,235,.06); transform: translateY(-1px); }
.icon-btn[data-tip]:hover::after,
.cmp-btn[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: #1f2937; color: #fff;
  font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 6px;
  white-space: nowrap; z-index: 300; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
html.dark .icon-btn[data-tip]:hover::after,
html.dark .cmp-btn[data-tip]:hover::after { background: #374151; }

/* 分类标题对比按钮 */
.cmp-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: 8px; vertical-align: middle;
  border: 1px solid var(--p-border); border-radius: 7px;
  background: var(--p-card); color: var(--p-primary); font-size: 13px; cursor: pointer;
  transition: all .15s ease; font-family: var(--font);
}
.cmp-btn:hover { border-color: var(--p-primary); background: rgba(37,99,235,.06); transform: translateY(-1px); }
.sub-title .cmp-btn { width: 22px; height: 22px; font-size: 12px; margin-left: 6px; }

/* 对比评测弹窗 */
.cmp-modal {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(15, 23, 42, .55); align-items: center; justify-content: center;
  padding: 20px;
}
.cmp-modal.open { display: flex; }
.cmp-modal-box {
  width: 100%; max-width: 860px; max-height: 82vh;
  background: var(--p-card); border-radius: 14px;
  box-shadow: var(--p-shadow-hover); display: flex; flex-direction: column; overflow: hidden;
}
.cmp-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--p-border);
}
.cmp-modal-head h3 { font-size: 15.5px; font-weight: 800; color: var(--p-text); }
.cmp-modal-close {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--p-border);
  background: var(--p-card); color: var(--p-text-light); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.cmp-modal-close:hover { color: #ef4444; border-color: #ef4444; }
.cmp-modal-body { padding: 16px 18px; overflow-y: auto; }
.cmp-table-wrap { overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table th, .cmp-table td {
  padding: 10px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--p-border);
}
.cmp-table th { background: rgba(37,99,235,.06); font-weight: 700; color: var(--p-text); white-space: nowrap; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-name a { color: var(--p-primary); font-weight: 600; }
.cmp-name a:hover { text-decoration: underline; }
.cmp-tag {
  display: inline-block; font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.cmp-tag.tag-open { background: rgba(16,185,129,.12); color: #059669; }
.cmp-tag.tag-free { background: rgba(250,204,21,.14); color: #b45309; }
html.dark .cmp-tag.tag-open { color: #34d399; }
html.dark .cmp-tag.tag-free { color: #fbbf24; }
.cmp-desc { color: var(--p-text); line-height: 1.6; max-width: 420px; }
.cmp-note { display: block; margin-top: 4px; font-size: 11.5px; color: #b45309; }
html.dark .cmp-note { color: #fbbf24; }
.cmp-ver { color: var(--p-text-light); font-size: 12px; white-space: nowrap; }

/* 移动端 */
@media (max-width: 767px) {
  .cmp-modal-box { max-height: 88vh; }
  .cmp-table { font-size: 12px; }
  .cmp-table th, .cmp-table td { padding: 8px 9px; }
  .cmp-desc { max-width: 200px; }
  .head-actions { gap: 6px; }
}

/* ===== 工具精选（管理员操作） ===== */
.tool-featured-badge {
	display: inline-block; font-size: 11px; color: #b45309; background: #fef3c7;
	border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px;
}
.tool-card-admin { margin-top: 6px; }
.tool-featured-btn {
	border: 1px solid #e5b45b; background: #fffbeb; color: #b45309;
	border-radius: 8px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.tool-featured-btn:hover { background: #fef3c7; }
.tool-featured-btn.is-on { background: #fef3c7; border-color: #b45309; font-weight: 600; }

/* ===== 热门场景 V2（子项 + 教程折叠） ===== */
.scn-items { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.scn-item { border: 1px solid #eef0f4; border-radius: 10px; overflow: hidden; background: #fff; }
.scn-item-head {
	display: flex; align-items: center; gap: 8px; padding: 10px 14px;
	cursor: pointer; font-size: 14px; color: #333; list-style: none; user-select: none;
}
.scn-item-head::-webkit-details-marker { display: none; }
.scn-item-head:hover { background: #f8fafc; }
.scn-item-name { flex: 1; min-width: 0; }
.scn-item-arrow { color: #94a3b8; font-size: 12px; transition: transform .15s; }
.scn-item[open] .scn-item-arrow { transform: rotate(90deg); }
.scn-item-body { padding: 4px 14px 12px; font-size: 13px; color: #475569; }
.scn-steps { margin: 4px 0 8px; line-height: 1.7; }
.scn-tools { margin-bottom: 8px; line-height: 1.8; }
.scn-tools a { color: #1d4ed8; text-decoration: none; border-bottom: 1px dashed #93c5fd; }
.scn-tools a:hover { color: #1e40af; }
.scn-tut { margin-top: 2px; }
.scn-tut-head {
	cursor: pointer; font-size: 13px; color: #0f766e; list-style: none;
	padding: 4px 0; user-select: none;
}
.scn-tut-head::-webkit-details-marker { display: none; }
.scn-tut-head:hover { color: #115e59; }
.scn-tut-body { margin: 4px 0 0; padding: 8px 12px; background: #f0fdfa; border-radius: 8px; line-height: 1.7; color: #134e4a; }
.scenario-v2.scenario-card[open] { border-color: #c7d2fe; }

/* ===== 在线免费工具：管理员可视化编辑（C4） ===== */
.btn-mini {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid #d1d5db;
  background: #fff; color: #374151; cursor: pointer; vertical-align: 2px; margin-left: 4px;
}
.btn-mini:hover { background: #f3f4f6; }
.btn-mini-danger { color: #dc2626; border-color: #fca5a5; }
.btn-mini-danger:hover { background: #fef2f2; }
.ft-drag-handle { cursor: grab; color: #9ca3af; font-size: 14px; margin-left: 6px; user-select: none; }
.ft-drag-handle:hover { color: #4b5563; }
.ft-savebar { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.ft-save {
  font-size: 13px; padding: 6px 16px; border: none; border-radius: 8px;
  background: #2563eb; color: #fff; cursor: pointer; font-weight: 600;
}
.ft-save:hover { background: #1d4ed8; }
.ft-save-msg { font-size: 12.5px; }
.free-tools-group { transition: opacity .15s; }
.free-tools-group[draggable="true"] { cursor: move; }

/* ===== 管理员编辑入口（🖊️ 管理） ===== */
.header-edit-btn {
  margin-left: auto; padding: 6px 12px; border: 1px solid #93c5fd; border-radius: 8px;
  background: #eff6ff; color: #1d4ed8; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.header-edit-btn:hover { background: #dbeafe; }

/* ===== 全站板块编辑模式（🖊️ 管理） ===== */
.home-section.sec-editing { border: 2px dashed #93c5fd; border-radius: 12px; padding: 10px; margin-bottom: 18px; position: relative; }
.home-section.sec-dragging { opacity: .5; border-color: #2563eb; }
.sec-tools { margin-left: 10px; display: inline-flex; gap: 6px; vertical-align: 2px; }
.sec-new-placeholder {
  border: 1px dashed #d1d5db; border-radius: 10px; padding: 24px; text-align: center;
  color: #9ca3af; font-size: 13px; background: #f9fafb; margin-top: 8px;
}
#sec-edit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: rgba(255,255,255,.97); border-top: 1px solid #d1d5db;
  box-shadow: 0 -6px 20px rgba(0,0,0,.08); padding: 10px 16px;
}
html.dark #sec-edit-bar { background: rgba(17,24,39,.97); border-color: #374151; }
.sec-edit-bar-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-edit-btn.is-active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }

/* ===== 独立版补充样式 ===== */
/* Toast 提示 */
.toast-msg {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(17,24,39,.92); color: #fff; font-size: 13.5px;
  padding: 10px 20px; border-radius: 10px; z-index: 9999; opacity: 0;
  transition: opacity .25s ease, transform .25s ease; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 80vw;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-err { background: rgba(220,38,38,.95); }

/* 页脚 */
.site-footer { border-top: 1px solid var(--p-border); margin-top: 30px; padding: 20px 0; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; font-size: 13px; color: var(--p-text-light); text-align: center; }

/* 对比表格 */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cmp-table th, .cmp-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--p-border); }
.cmp-table th { background: var(--p-bg); font-weight: 600; }

/* 搜索页 */
.search-page { max-width: 860px; margin: 30px auto; padding: 0 20px; }
.search-page .search-summary { font-size: 13.5px; color: var(--p-text-light); margin-bottom: 16px; }

/* 登录弹窗 */
.login-modal-box { max-width: 340px; }
.login-modal-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--p-border); border-radius: 8px; font-size: 14px; margin-bottom: 10px; outline: none; }
.login-modal-box input:focus { border-color: var(--p-primary); }
.login-modal-box h3 { margin-bottom: 14px; }

/* 板块编辑态 */
.home-section.sec-editing { border: 2px dashed #93c5fd; border-radius: 12px; padding: 10px; margin-bottom: 18px; }
.sec-tools { margin-left: 10px; display: inline-flex; gap: 6px; }
#sec-edit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: rgba(255,255,255,.97); border-top: 1px solid #d1d5db; padding: 10px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
html.dark #sec-edit-bar { background: rgba(17,24,39,.97); }

/* ===== 账号栏（登录/后台/退出） ===== */
.acct-bar { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.acct-name { font-size: 13px; color: var(--p-text); font-weight: 600; }
.acct-link {
  font-size: 13px; color: var(--p-primary); border: 1px solid var(--p-border);
  border-radius: 8px; padding: 4px 10px; cursor: pointer; white-space: nowrap;
  background: var(--p-card); text-decoration: none;
}
.acct-link:hover { border-color: var(--p-primary); }
html.dark .acct-link { color: #60a5fa; }
@media (max-width: 900px) { .acct-bar { display: none; } }

/* 返回工作台按钮（需求1新增，放在管理按钮旁，不破坏原布局） */
.header-workbench {
  margin-left: auto; padding: 6px 12px; border: 1px solid #c7d2fe; border-radius: 8px;
  background: #eef2ff; color: #4338ca; font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: background .15s;
}
.header-workbench:hover { background: #e0e7ff; }
@media (max-width: 900px) {
  .header-workbench { display: none; }   /* 移动端隐藏，避免挤压 */
}
