/* ============================================================
   Seek Engine 全站样式 · 响应式 / 深色模式 / 全屏首页
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-soft: #eff4ff;
  --accent: #ea4335;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.12);
  --radius: 14px;
  --maxw: 1240px;
}
[data-theme="dark"] {
  --bg: #0f1218;
  --bg-soft: #171b23;
  --card: #171b23;
  --text: #e6e9ef;
  --muted: #929aa8;
  --line: #2a303b;
  --primary: #5b8dff;
  --primary-soft: #1c2740;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.28);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; font-weight: 650; }
p { margin: 0 0 12px; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
code { background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; font-size: .88em; word-break: break-all; }
pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow: auto; font-size: 12.5px; }
.muted { color: var(--muted); }
.small, small { font-size: 12.5px; }
.block { display: block; }
.break { word-break: break-all; }
.wrap-text { word-break: break-all; white-space: normal; }
.yes { color: var(--green); }
.no { color: var(--red); }
.req { color: var(--red); }
.dot { margin: 0 8px; color: var(--muted); }
.sep { margin: 0 8px; color: var(--muted); }
.text-sm { font-size: 18px; }

/* ---------- 通用组件 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 60px; min-height: calc(100vh - 190px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 14px; font-weight: 550;
  transition: .18s ease; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.ghost { background: transparent; }
.btn.btn-small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.btn-tiny { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: var(--red); border-color: var(--line); }
.btn.danger:hover { border-color: var(--red); }
.btn.block { width: 100%; padding: 11px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ai { background: linear-gradient(120deg, var(--primary-soft), var(--card)); border-color: var(--primary); color: var(--primary); }
.btn-ai span { color: var(--accent); font-size: 16px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 17px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg-soft); color: var(--primary); border-color: var(--line); }
.link-quiet { color: var(--muted); font-size: 14px; white-space: nowrap; }
.link-quiet:hover { color: var(--primary); text-decoration: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2 { font-size: 17px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card h3 { font-size: 15px; margin: 0 0 8px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card-head h2 { border: 0; padding: 0; margin: 0; }
.sub-head { margin: 20px 0 10px !important; font-size: 14px !important; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cards-grid { align-items: start; }
.alert { background: color-mix(in srgb, var(--red) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line)); color: var(--red); padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.ok-banner { background: color-mix(in srgb, var(--green) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line)); color: var(--green); padding: 12px 15px; border-radius: 10px; margin: 10px 0 16px; font-size: 14px; }
.notice { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.notice strong { color: var(--text); display: block; margin-bottom: 6px; }
.notice ul { margin: 0; padding-left: 18px; line-height: 1.8; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.badge.gray { background: var(--bg-soft); color: var(--muted); border-color: var(--line); }
.badge.green { background: color-mix(in srgb, var(--green) 12%, var(--card)); color: var(--green); }
.badge.amber { background: color-mix(in srgb, var(--amber) 12%, var(--card)); color: var(--amber); }
.badge.red { background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--red); }

/* 表单 */
.form label { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 14px; font-weight: 550; }
.form label small { display: block; font-weight: 400; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number], .form textarea, .form select,
.field input, .field textarea, .field select {
  display: block; width: 100%; margin-top: 7px; padding: 10px 12px; font-size: 14px; font-weight: 400;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); transition: .15s;
}
.form textarea, .field textarea { resize: vertical; min-height: 76px; }
.form input:focus, .form textarea:focus, .form select:focus, .field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form .chk-row { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); }
.form .chk-row input { margin: 0; width: auto; }
.form-msg { margin-top: 12px; font-size: 13.5px; min-height: 0; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--red); }

/* 表格 */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-soft); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }
.table.small th, .table.small td { padding: 8px 10px; font-size: 12.5px; }
.table .ops { white-space: nowrap; }
.table .ops > * { margin-right: 5px; }
.site-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.site-cell small { display: block; color: var(--muted); }
.favicon { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }

/* 统计卡片 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-box span { display: block; color: var(--muted); font-size: 13px; }
.stat-box strong { display: block; font-size: 26px; margin: 6px 0 2px; line-height: 1.2; }
.stat-box small { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 6px 0 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin-bottom: 4px; }
.page-head p { margin: 0; }

/* ---------- 顶部导航 / 页脚 ---------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 24px; padding: 12px 26px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
.brand-mark.small { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; }
.brand-text.mini { font-size: 15px; }
.topnav { display: flex; gap: 20px; flex: 1; }
.topnav a { color: var(--muted); font-size: 14px; }
.topnav a:hover { color: var(--primary); text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; white-space: nowrap; }
.user-chip:hover { text-decoration: none; color: var(--primary); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 13px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer-debug { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 14px; font-size: 11.5px; opacity: .7; }

/* ---------- 全屏首页 ---------- */
.home-body { display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
.home-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; gap: 14px; }
.home-top-left, .home-top-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.home-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 20px 40px; }
.home-center { width: 100%; max-width: 720px; min-width: 0; text-align: center; transform: translateY(-4vh); }
.logo-big { display: inline-block; font-size: clamp(48px, 8vw, 76px); font-weight: 800; letter-spacing: -3px; line-height: 1.1; margin-bottom: 8px; color: var(--text); }
.logo-big:hover { text-decoration: none; }
.logo-a { color: var(--primary); }
.logo-b { color: var(--accent); }
.slogan { color: var(--muted); font-size: 15px; margin: 0 0 34px; letter-spacing: .5px; }

.search-box { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 18px; box-shadow: var(--shadow); transition: .2s; }
.search-box:focus-within { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); }
.search-box .search-icon { color: var(--muted); display: inline-flex; flex: 0 0 auto; }
.search-box input { flex: 1 1 0; width: 0; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; padding: 12px 4px; }
.search-box input::placeholder { color: var(--muted); opacity: .8; }
.box-btn { border: 0; background: transparent; color: var(--muted); font-size: 15px; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.box-btn:hover { background: var(--bg-soft); color: var(--text); }
.box-btn.ai-spark { color: var(--accent); font-size: 19px; }
.box-submit { border: 0; background: var(--primary); color: #fff; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: .2s; }
.box-submit:hover { filter: brightness(1.1); transform: scale(1.04); }
.suggest-box { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 30; overflow: hidden; text-align: left; padding: 6px 0; }
.suggest-box[hidden] { display: none; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 14px; color: var(--text); cursor: pointer; }
.suggest-item:hover, .suggest-item.active { background: var(--bg-soft); }
.suggest-item svg { opacity: .55; flex: 0 0 auto; }

.home-buttons { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hotwords { margin-top: 34px; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.hot-label { color: var(--muted); margin-right: 4px; }
.hot-chip { background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); padding: 4px 12px; border-radius: 20px; }
.hot-chip:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }
.announcement { margin: 26px auto 0; max-width: 560px; background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 10px 16px; font-size: 13px; }
.home-footer { border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 12.5px; }
.home-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 15px 26px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.home-footer a { color: var(--muted); }
.noscript-box { padding: 20px 26px; border-top: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; }

/* ---------- 搜索结果视图 ---------- */
.results-view { flex: 1; }
.results-view[hidden] { display: none; }
.results-bar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: 20px; padding: 14px 26px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand.compact { flex: 0 0 auto; }
.search-box.compact { max-width: 640px; flex: 1; width: auto; border-radius: 12px; padding: 2px 6px 2px 14px; box-shadow: var(--shadow); }
.search-box.compact input { font-size: 15px; padding: 9px 4px; }
.search-box.compact .box-submit { width: 34px; height: 34px; border-radius: 9px; }
.results-bar-right { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.mode-tabs { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.mode-tab { border: 0; background: transparent; color: var(--muted); padding: 5px 13px; border-radius: 8px; font-size: 13px; }
.mode-tab.active { background: var(--card); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.results-layout { max-width: 1180px; margin: 0 auto; padding: 22px 26px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.results-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.result-item { padding: 4px 0 22px; margin-bottom: 4px; }
.result-source { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.result-source .favicon { width: 26px; height: 26px; font-size: 12px; border-radius: 7px; }
.result-source .r-domain { color: var(--text); font-size: 13px; font-weight: 550; }
.result-source .r-url { color: var(--muted); font-size: 12px; display: block; line-height: 1.3; max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-item h3 { font-size: 19px; font-weight: 550; margin: 0 0 6px; line-height: 1.45; }
.result-item h3 a { color: var(--primary); }
.result-item h3 a:visited { color: #7c3aed; }
[data-theme="dark"] .result-item h3 a:visited { color: #a78bfa; }
.r-snippet { color: var(--text); opacity: .86; font-size: 14px; line-height: 1.75; margin: 0 0 6px; word-break: break-word; }
.r-foot { color: var(--muted); font-size: 12px; }
em { font-style: normal; color: var(--accent); font-weight: 650; background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 3px; padding: 0 1px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 26px 0 10px; }
.pager button { min-width: 34px; padding: 6px 11px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; font-size: 13px; }
.pager button:hover { border-color: var(--primary); color: var(--primary); }
.pager button.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .45; }
.related { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.related h4 { font-size: 15px; margin-bottom: 10px; }
.related-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.related-chips a { background: var(--bg-soft); border: 1px solid var(--line); padding: 5px 12px; border-radius: 20px; font-size: 13px; color: var(--text); }
.related-chips a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.results-side { position: sticky; top: 86px; }
.ai-card, .side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.ai-card { background: linear-gradient(160deg, var(--primary-soft), var(--card) 55%); }
.ai-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ai-badge { color: var(--primary); font-weight: 700; font-size: 14px; }
.ai-sub { color: var(--muted); font-size: 12px; }
.ai-body { font-size: 13.5px; line-height: 1.8; max-height: 460px; overflow-y: auto; margin-bottom: 14px; word-break: break-word; }
.ai-body p { margin: 0 0 10px; }
.ai-placeholder { color: var(--muted); }
.ai-sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.ai-sources a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.ai-meta { color: var(--muted); font-size: 11.5px; margin-top: 10px; }
.side-card h4 { font-size: 14px; margin-bottom: 10px; }
.side-card p { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.side-card strong { color: var(--text); }
.skeleton { padding: 14px 0; }
.sk-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-soft), var(--line), var(--bg-soft)); background-size: 200% 100%; animation: sk 1.3s linear infinite; margin-bottom: 10px; }
.sk-line.w40 { width: 40%; } .sk-line.w70 { width: 70%; } .sk-line.w90 { width: 90%; } .sk-line.w100 { width: 100%; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-results { padding: 40px 0; }
.empty-results h3 { font-size: 18px; margin-bottom: 8px; }
.empty-results ul { color: var(--muted); font-size: 14px; padding-left: 20px; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { display: flex; justify-content: center; align-items: flex-start; padding: 40px 20px 70px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: var(--shadow-lg); }
.auth-logo { font-size: 22px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 6px; }
.auth-card h1 { font-size: 23px; text-align: center; }
.auth-card > p { text-align: center; font-size: 13.5px; margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }

/* ---------- 会员中心 / 站点管理 ---------- */
.empty-state { text-align: center; padding: 46px 20px; }
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.empty-page { text-align: center; padding: 70px 20px; }
.empty-code { font-size: 72px; font-weight: 800; color: var(--primary); opacity: .35; }
.empty-page h1 { font-size: 24px; margin: 10px 0; }
.empty-page p { color: var(--muted); margin-bottom: 24px; }
.empty-page .actions { justify-content: center; }
.steps-small { padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 2; }
.steps-small strong { color: var(--text); }
.quick-links { display: flex; flex-direction: column; gap: 2px; }
.quick-links a { padding: 10px 12px; border-radius: 9px; color: var(--text); font-size: 14px; }
.quick-links a:hover { background: var(--bg-soft); color: var(--primary); text-decoration: none; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.side-panel { position: sticky; top: 84px; }
.flow-vert { margin: 6px 0 18px; }
.flow-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.flow-item:last-child { border-bottom: 0; }
.flow-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.flow-item strong { font-size: 14px; }
.flow-item p { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; line-height: 1.6; }
.panel-callout { background: var(--bg-soft); border: 1px solid var(--line); padding: 13px 15px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.panel-callout strong { display: block; margin-bottom: 4px; }
.panel-callout p { color: var(--muted); margin: 0; line-height: 1.7; }
.verify-block { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.verify-block h3 { font-size: 14px; }
.verify-block p { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.kv { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; flex-wrap: wrap; }
.kv > span { color: var(--muted); width: 66px; flex: 0 0 auto; }
.kv code { flex: 1; min-width: 160px; }
.code-block { margin: 0 0 8px; font-size: 12px; }
.info-list { display: flex; flex-direction: column; }
.info-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); flex: 0 0 auto; }
.info-list strong { text-align: right; font-weight: 600; }

/* ---------- 爬虫介绍页 ---------- */
.hero-band { max-width: var(--maxw); margin: 8px auto 0; padding: 44px 26px; display: grid; grid-template-columns: 1.4fr .8fr; gap: 30px; align-items: center; }
.hero-band-inner h1 { font-size: clamp(28px, 4vw, 42px); margin: 8px 0 14px; letter-spacing: -1px; }
.hero-band-inner p { color: var(--muted); font-size: 15px; max-width: 660px; line-height: 1.85; margin-bottom: 22px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.hero-graphic { position: relative; height: 220px; display: flex; align-items: center; justify-content: center; }
.hero-glyph { font-size: 96px; position: relative; z-index: 2; filter: drop-shadow(0 12px 20px rgba(37,99,235,.25)); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.orb1 { width: 190px; height: 190px; background: radial-gradient(circle, var(--primary-soft), transparent 70%); }
.orb2 { width: 110px; height: 110px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); transform: translate(80px, -40px); }
.orb3 { width: 90px; height: 90px; background: radial-gradient(circle, color-mix(in srgb, var(--green) 20%, transparent), transparent 70%); transform: translate(-90px, 55px); }
.metric-band { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 24px; color: var(--primary); }
.metric span { color: var(--muted); font-size: 12.5px; }
.section-block { max-width: var(--maxw); margin: 0 auto; padding: 54px 26px 0; }
.section-title { text-align: center; max-width: 700px; margin: 0 auto 30px; }
.section-title h2 { font-size: 27px; margin: 8px 0 10px; }
.section-title p { color: var(--muted); font-size: 14px; }
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pipe-step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: .2s; }
.pipe-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.pipe-num { position: absolute; top: 16px; right: 18px; color: var(--line); font-size: 24px; font-weight: 800; }
.pipe-icon { font-size: 26px; margin-bottom: 12px; }
.pipe-step h3 { font-size: 16px; margin-bottom: 6px; }
.pipe-step p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.75; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feat-icon { font-size: 24px; }
.feature h3 { font-size: 15px; margin: 10px 0 7px; }
.feature p { color: var(--muted); font-size: 12.8px; line-height: 1.75; margin: 0; }
.feature strong { color: var(--text); }
.submit-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.submit-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.big-num { font-size: 34px; font-weight: 800; color: var(--primary); opacity: .35; }
.submit-step h3 { font-size: 16px; margin: 4px 0 8px; }
.submit-step p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.75; }
.cta-band { margin-top: 24px; background: linear-gradient(120deg, var(--primary-soft), var(--card)); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h3 { font-size: 19px; margin-bottom: 4px; }
.cta-band p { color: var(--muted); font-size: 13.5px; margin: 0; }
.compliance { padding-bottom: 60px; }
.compliance h2 { font-size: 18px; margin-bottom: 10px; }
.compliance p { color: var(--muted); font-size: 13.5px; line-height: 1.9; max-width: 900px; }

/* ---------- 管理后台 ---------- */
.admin-body { display: flex; min-height: 100vh; background: var(--bg-soft); }
.admin-side { width: 232px; flex: 0 0 232px; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-logo { padding: 20px 18px; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.admin-nav { padding: 14px 10px; flex: 1; }
.admin-nav .nav-group { color: var(--muted); font-size: 11px; letter-spacing: 1px; padding: 14px 12px 6px; text-transform: uppercase; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; margin-bottom: 2px; }
.admin-nav a:hover { background: var(--bg-soft); color: var(--primary); text-decoration: none; }
.admin-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.admin-nav .ni { width: 20px; text-align: center; font-size: 15px; }
.admin-side-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.admin-main { flex: 1; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 26px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-top h1 { font-size: 18px; }
.admin-top .top-right { display: flex; align-items: center; gap: 14px; }
.admin-content { padding: 24px 26px 60px; max-width: 1400px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.admin-card .lbl { color: var(--muted); font-size: 12.5px; }
.admin-card .val { font-size: 25px; font-weight: 700; margin: 6px 0 2px; }
.admin-card .sub { color: var(--muted); font-size: 12px; }
.admin-grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.admin-grid2 .card { margin-bottom: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 45%, transparent)); border-radius: 5px 5px 0 0; min-height: 3px; }
.chart-col small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.progress { height: 8px; background: var(--bg-soft); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 10px; }
.queue-stat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.queue-stat div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.queue-stat strong { display: block; font-size: 20px; }
.queue-stat span { color: var(--muted); font-size: 12px; }
.settings-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-tabs button { border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 7px 14px; border-radius: 9px; font-size: 13px; }
.settings-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.settings-group { display: none; }
.settings-group.active { display: block; }
.setting-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: start; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-label { font-size: 13.5px; font-weight: 600; padding-top: 6px; }
.setting-row .s-hint { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 3px; line-height: 1.55; }
.setting-row input[type=text], .setting-row input[type=number], .setting-row input[type=password], .setting-row textarea, .setting-row select, .setting-row input[type=color] { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 13.5px; }
.setting-row textarea { min-height: 70px; resize: vertical; }
.setting-row input[type=color] { height: 40px; padding: 4px; }
.setting-row .switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); padding-top: 6px; }
.setting-row .switch input { width: 18px; height: 18px; accent-color: var(--primary); }
.admin-table { font-size: 13px; }
.admin-table td { padding: 10px; }
.admin-table .mono { font-family: monospace; font-size: 12px; color: var(--muted); }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tool-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg-soft); }
.tool-card h3 { font-size: 14px; margin-bottom: 6px; }
.tool-card p { color: var(--muted); font-size: 12.5px; min-height: 40px; }
.admin-log { max-height: 460px; overflow-y: auto; font-family: monospace; font-size: 12px; line-height: 1.8; }
.admin-log .line { border-bottom: 1px dashed var(--line); padding: 3px 0; word-break: break-all; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.on { background: var(--green); } .status-dot.off { background: var(--muted); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 10px; padding: 11px 15px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .22s ease; }
.toast.err { border-left-color: var(--red); color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .results-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-grid2 { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .topnav { display: none; }
  .results-layout { grid-template-columns: 1fr; }
  .results-side { position: static; order: -1; }
  .ai-card { max-height: 340px; overflow: auto; }
  .metric-band { grid-template-columns: repeat(3, 1fr); }
  .hero-band { grid-template-columns: 1fr; }
  .hero-graphic { height: 130px; }
  .hero-glyph { font-size: 66px; }
  .form-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .admin-side { width: 68px; flex-basis: 68px; }
  .admin-side .admin-logo span, .admin-side .nav-group, .admin-side .admin-nav a .nav-text, .admin-side-foot { display: none; }
  .admin-logo { justify-content: center; }
  .admin-nav a { justify-content: center; }
}
@media (max-width: 680px) {
  .container { padding: 20px 16px 46px; }
  .home-top { padding: 12px 16px; }
  .home-top-left { display: none; }
  .home-center { transform: none; }
  .logo-big { font-size: 46px; letter-spacing: -2px; }
  .slogan { font-size: 13px; margin-bottom: 26px; }
  .search-box { padding-left: 12px; }
  .search-box input { font-size: 15px; padding: 10px 2px; }
  .home-main { padding: 24px 16px 36px; align-items: flex-start; }
  .home-buttons .btn { padding: 8px 13px; font-size: 13px; }
  .hotwords { margin-top: 26px; max-width: 100%; }
  .hot-chip { max-width: 100%; }
  .results-bar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand.compact .brand-text { display: none; }
  .search-box.compact { order: 3; flex-basis: 100%; max-width: none; }
  .results-bar-right { margin-left: auto; }
  .results-layout { padding: 18px 16px 46px; }
  .result-item h3 { font-size: 17px; }
  .grid2, .cards-grid, .submit-steps, .pipeline, .feature-grid, .queue-stat, .tool-grid, .metric-band { grid-template-columns: 1fr; }
  .metric-band { grid-template-columns: repeat(2, 1fr); }
  .stat-row, .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .section-block { padding: 38px 16px 0; }
  .hero-band { padding: 30px 18px; }
  .page-head h1 { font-size: 22px; }
  .card { padding: 17px; }
  .setting-row { grid-template-columns: 1fr; gap: 6px; }
  .setting-row .s-label { padding-top: 0; }
  .admin-content { padding: 18px 14px 50px; }
  .admin-top { padding: 12px 14px; }
  .admin-side { display: none; }
  .admin-mobile-nav { display: flex !important; }
  .footer-inner, .home-footer-inner { padding: 14px 16px; }
  .auth-card { padding: 24px 20px; }
}
.admin-mobile-nav { display: none; gap: 6px; overflow-x: auto; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.admin-mobile-nav a { white-space: nowrap; font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--bg-soft); }
.admin-mobile-nav a.active { background: var(--primary); color: #fff; }

@media print { .home-top, .home-footer, .results-bar, .topbar, .site-footer, .results-side { display: none !important; } }

/* ============================================================
   图片 Logo / 验证码 / 权重与运维面板
   ============================================================ */
.logo-img { display: block; width: auto; max-width: 100%; object-fit: contain; vertical-align: middle; }
.logo-big .logo-img { margin: 0 auto 10px; }
.logo-img-dark { display: none; }
[data-theme="dark"] .logo-img-light { display: none; }
[data-theme="dark"] .logo-img-dark { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.captcha-wrap { margin: 14px 0 4px; min-height: 66px; }
.captcha-wrap .h-captcha { transform-origin: 0 0; }
.captcha-hint { display: block; margin-top: 6px; font-size: 12px; }

.setting-image { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.setting-image-preview { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--bg-soft); padding: 8px; }
.setting-image-preview img { max-width: 100%; max-height: 88px; object-fit: contain; }
.setting-image-actions { display: flex; gap: 8px; align-items: center; }
.setting-image-btn { cursor: pointer; display: inline-flex; align-items: center; }

.crawler-control .control-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.control-grid > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.control-grid span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.control-grid strong { font-size: 15px; }
.control-grid small { font-weight: 400; font-size: 11px; }

.score-bar { height: 5px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; margin-top: 5px; min-width: 80px; }
.score-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.sig-row { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.sig-row > span { width: 26px; flex: 0 0 auto; }
.sig-row small { width: 20px; text-align: right; flex: 0 0 auto; }
.sig-bar { flex: 1; height: 4px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.sig-bar i { display: block; height: 100%; background: var(--primary); opacity: .75; }
.row-warn { background: rgba(234, 67, 53, .07); }
[data-theme="dark"] .setting-image-preview { background: rgba(255,255,255,.04); }

@media (max-width: 680px) {
  .logo-big .logo-img { max-width: 84vw; }
  .setting-image { min-width: 100%; }
}

/* 1.1.0：退出登录改为 POST 表单后的按钮样式 */
.logout-form { display: inline; margin: 0; }
button.link-quiet { background: none; border: 0; padding: 0; font: inherit;
  color: inherit; cursor: pointer; text-decoration: none; }
button.link-quiet:hover { text-decoration: underline; }

/* ============================================================
   2.0.0 · 黑红主题 / 全宽布局 / 自适应
   说明：作为最后一层覆盖，不删除 1.x 的组件规则，便于回退与对比。
   --primary / --accent 由后台「系统设置 → 站点」注入（html:root），
   默认值已改为 #e11d2a / #ff3b30，这里只定义其余主题变量。
   ============================================================ */
html:root {
  /* 兜底主色：安装向导等不注入 html:root 内联配置的页面同样保持黑红；
     常规页面由 View::head() 稍后输出的 html:root 覆盖为后台自定义值 */
  --primary: #e11d2a;
  --accent: #ff3b30;
  --bg: #f5f5f7;
  --bg-soft: #ececef;
  --card: #ffffff;
  --text: #17171b;
  --muted: #6b6b76;
  --line: #dedee3;
  --primary-soft: #ffe9eb;
  --green: #12833f;
  --amber: #b8730a;
  --red: #d11724;
  --shadow: 0 1px 2px rgba(20,20,25,.05), 0 10px 30px rgba(20,20,25,.07);
  --shadow-lg: 0 18px 50px rgba(20,20,25,.17);
  --radius: 12px;
  --maxw: none;
  --brand-ink: #0a0a0c;
  --brand-panel: #141418;
  --brand-red: #e11d2a;
  --gutter: clamp(16px, 3vw, 44px);
}
html[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-soft: #101014;
  --card: #141418;
  --text: #f2f2f5;
  --muted: #96969f;
  --line: #28282f;
  --primary-soft: #2a1116;
  --green: #35d083;
  --amber: #f3b544;
  --red: #ff4a57;
  --shadow: 0 1px 2px rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.4);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.65);
}

/* 顶部品牌红线：所有页面统一视觉锚点 */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 10000;
  background: linear-gradient(90deg, #6d0a12, var(--primary, #e11d2a) 42%, #ff6a4d 78%, #6d0a12);
  pointer-events: none;
}
html[data-theme="dark"] body { background:
  radial-gradient(1200px 520px at 50% -180px, rgba(225,29,42,.10), transparent 70%),
  var(--bg); }

/* ---------- 全宽 ---------- */
.container, .footer-inner, .footer-debug, .home-footer-inner,
.hero-band, .metric-band, .section-block, .results-layout, .admin-content {
  max-width: none !important;
}
.container { padding-inline: var(--gutter); }
.footer-inner, .footer-debug, .home-footer-inner,
.hero-band, .metric-band, .section-block, .results-layout { padding-inline: var(--gutter); }
.admin-content { padding: 24px var(--gutter) 64px; }
.results-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: clamp(20px, 3vw, 48px); }
.results-main { min-width: 0; }
.result-item { max-width: 940px; }
.home-center { max-width: min(920px, 92vw); }
.admin-content > .card, .admin-content > .admin-grid2 { margin-inline: 0; }

/* ---------- 导航 / 头部 ---------- */
.topbar, .home-top, .results-bar, .admin-top {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 92%, transparent);
}
.topbar::after, .admin-top::after, .results-bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--primary, #e11d2a), transparent 58%);
  pointer-events: none;
}
.topbar, .results-bar, .admin-top { position: sticky; }
.topbar, .admin-top, .results-bar { border-bottom: 1px solid var(--line); }
.admin-side { background: var(--card); border-right: 1px solid var(--line); }
.admin-logo { border-bottom: 1px solid var(--line); }
.admin-nav a.active { background: color-mix(in srgb, var(--primary, #e11d2a) 16%, transparent);
  color: var(--primary, #e11d2a); box-shadow: inset 3px 0 0 var(--primary, #e11d2a); }
.admin-mobile-nav a.active { background: var(--primary, #e11d2a); border-color: var(--primary, #e11d2a); }

/* ---------- 品牌 / 按钮 / 强调 ---------- */
.logo-a { color: var(--primary, #e11d2a); }
.logo-b { color: var(--text); }
.logo-big { letter-spacing: -3px; font-weight: 850; }
.brand-mark { background: linear-gradient(135deg, var(--primary, #e11d2a), #7d0a13); }
.btn.primary, .box-submit, .pager button.current, .mode-tab.active,
.settings-tabs button.active { background: var(--primary, #e11d2a); border-color: var(--primary, #e11d2a); color: #fff; }
.btn.primary:hover, .box-submit:hover { filter: brightness(1.14); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 9%, var(--card)); }
.btn.danger:hover { border-color: var(--red); background: color-mix(in srgb, var(--red) 18%, var(--card)); }
.btn:hover, .hot-chip:hover, .related-chips a:hover { border-color: var(--primary, #e11d2a); color: var(--primary, #e11d2a); }
.btn-ai { background: linear-gradient(120deg, color-mix(in srgb, var(--primary, #e11d2a) 12%, var(--card)), var(--card)); }
.chart-bar, .progress > i, .score-bar > span, .sig-bar i {
  background: linear-gradient(180deg, var(--primary, #e11d2a), color-mix(in srgb, var(--primary, #e11d2a) 42%, transparent));
}
.score-bar > span { background: linear-gradient(90deg, var(--primary, #e11d2a), #ff7a5c); }
.favicon, .flow-num, .big-num, .empty-code, .ai-badge, .eyebrow, .metric strong,
.result-item h3 a, .hotwords .hot-label { color: var(--primary, #e11d2a); }
.result-item h3 a:visited { color: #b45cff; }
html[data-theme="dark"] .result-item h3 a:visited { color: #c58cff; }
em { color: var(--primary, #e11d2a); background: color-mix(in srgb, var(--primary, #e11d2a) 14%, transparent); }
.toast { border-left-color: var(--primary, #e11d2a); }

/* ---------- 输入框 / 卡片 / 表格 ---------- */
.search-box:focus-within, .form input:focus, .form textarea:focus, .form select:focus,
.field input:focus { border-color: var(--primary, #e11d2a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #e11d2a) 16%, transparent), 0 12px 34px rgba(0,0,0,.14); }
.search-box { border-radius: 14px; }
.search-box.compact { border-radius: 12px; }
.sort-select { padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 12.5px; cursor: pointer; }
.sort-select:focus { outline: none; border-color: var(--primary, #e11d2a); }
.card, .stat-box, .admin-card, .metric, .pipe-step, .feature, .submit-step,
.ai-card, .side-card, .auth-card, .tool-card { border-color: var(--line); }
.card { border-top: 2px solid color-mix(in srgb, var(--primary, #e11d2a) 55%, var(--line)); }
.card h2 { border-bottom-color: var(--line); }
.table th { background: var(--bg-soft); }
.table tbody tr:hover, .info-list > div:hover { background: var(--bg-soft); }
.setting-row input:focus, .setting-row select:focus, .setting-row textarea:focus,
.inline-form input:focus { border-color: var(--primary, #e11d2a); outline: none; }
.setting-row .switch input { accent-color: var(--primary, #e11d2a); }
.announcement, .cta-band { background: color-mix(in srgb, var(--primary, #e11d2a) 9%, var(--card));
  color: var(--text); border-color: color-mix(in srgb, var(--primary, #e11d2a) 28%, var(--line)); }
.badge.red { background: color-mix(in srgb, var(--red) 15%, var(--card)); }
.row-warn { background: color-mix(in srgb, var(--red) 9%, transparent); }
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .form input, html[data-theme="dark"] .form textarea,
html[data-theme="dark"] .form select, html[data-theme="dark"] .field input,
html[data-theme="dark"] .setting-row input, html[data-theme="dark"] .setting-row select,
html[data-theme="dark"] .setting-row textarea, html[data-theme="dark"] .inline-form input,
html[data-theme="dark"] .inline-form select { background: #0d0d10; }
html[data-theme="dark"] .ai-card { background: linear-gradient(160deg, #261016, var(--card) 58%); }
html[data-theme="dark"] .avatar { background: var(--primary, #e11d2a); }

/* ---------- Meilisearch 索引运维面板 ---------- */
.engine-panel { border-top: 2px solid var(--primary, #e11d2a); }
.engine-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.engine-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 2px solid var(--primary, #e11d2a); border-radius: 10px; min-width: 0; }
.engine-stat > span { color: var(--muted); font-size: 12px; }
.engine-stat strong { font-size: 13.5px; font-weight: 600; word-break: break-all; }
.engine-stat .badge { margin-right: 5px; }
.engine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.engine-progress { margin: 8px 0 18px; }
.engine-bar { height: 9px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; }
.engine-bar > i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary, #e11d2a), #ff7a5c); transition: width .25s ease; }
.engine-progress-text { display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--muted); margin-top: 7px; }
.engine-log { max-height: 190px; overflow: auto; margin: 12px 0 0; padding: 12px 14px;
  background: #08080a; color: #d9d9df; border: 1px solid var(--line);
  border-radius: 10px; font-size: 12px; line-height: 1.75; }
.engine-schema details { border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-soft); margin-bottom: 10px; }
.engine-schema summary { cursor: pointer; padding: 12px 16px; font-weight: 650;
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.engine-schema summary::marker { color: var(--primary, #e11d2a); }
.engine-schema summary .muted { margin-left: auto; }
.engine-schema details > .table-scroll { padding: 0 12px 12px; }
.engine-settings { padding: 0 16px 12px; display: grid; gap: 6px; font-size: 12px; }
.engine-settings > div { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.engine-settings span { color: var(--muted); width: 88px; flex: 0 0 auto; }
.engine-settings code { word-break: break-word; min-width: 0; }

/* ---------- 自适应 ---------- */
@media (max-width: 1100px) {
  .results-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .admin-content { padding-inline: 22px; }
}
@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .results-side { position: static; }
  .result-item { max-width: none; }
  .topbar, .home-top, .results-bar, .admin-top { padding-inline: 16px; }
}
@media (max-width: 680px) {
  :root, html:root { --gutter: 14px; }
  .container, .admin-content, .section-block, .hero-band, .results-layout,
  .home-footer-inner, .footer-inner, .metric-band { padding-inline: 14px; }
  .engine-status { grid-template-columns: 1fr; }
  .engine-settings > div { flex-direction: column; gap: 2px; }
  .engine-settings span { width: auto; }
  .home-center { max-width: 100%; }
  .logo-big { font-size: clamp(40px, 12vw, 58px); }
  .card, .auth-card { padding: 16px; }
  .admin-top h1 { font-size: 16px; }
}

