/* ==========================================================================
   NovaSearch · 星屿搜索 — 现代化响应式样式
   设计取向：深空渐变 + 玻璃拟态 + 低饱和霓虹点缀；移动优先，无外部依赖。
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --maxw: 1120px;
  --header-h: 60px;

  /* 品牌色板（渐变 + 强调） */
  --brand-1: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --accent:  #22d3ee;
  --grad:    linear-gradient(120deg, var(--brand-1), var(--brand-2) 45%, var(--brand-3));

  /* 语义色 */
  --success: #10b981;
  --danger:  #ef4444;
  --warning: #f59e0b;

  /* 亮色模式 */
  --bg:        #f6f7fb;
  --bg-soft:   #ffffff;
  --bg-glass:  rgba(255, 255, 255, .72);
  --text:      #1a1d2b;
  --text-2:    #4b5166;
  --muted:     #8a90a6;
  --line:      rgba(30, 34, 60, .10);
  --shadow:    0 10px 30px rgba(30, 34, 80, .08);
  --search-bg: rgba(255, 255, 255, .92);
  --mark-bg:   rgba(79, 70, 229, .16);
  --mark-text: #3730a3;
  --code-bg:   rgba(30, 34, 60, .07);
}

[data-theme="dark"] {
  --bg:        #0d1020;
  --bg-soft:   #151a30;
  --bg-glass:  rgba(21, 26, 48, .72);
  --text:      #eef0fb;
  --text-2:    #b7bdd6;
  --muted:     #7d84a4;
  --line:      rgba(180, 190, 255, .12);
  --shadow:    0 12px 36px rgba(0, 0, 0, .45);
  --search-bg: rgba(24, 30, 56, .9);
  --mark-bg:   rgba(139, 92, 246, .28);
  --mark-text: #d8ccff;
  --code-bg:   rgba(160, 170, 220, .14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0d1020;
    --bg-soft:   #151a30;
    --bg-glass:  rgba(21, 26, 48, .72);
    --text:      #eef0fb;
    --text-2:    #b7bdd6;
    --muted:     #7d84a4;
    --line:      rgba(180, 190, 255, .12);
    --shadow:    0 12px 36px rgba(0, 0, 0, .45);
    --search-bg: rgba(24, 30, 56, .9);
    --mark-bg:   rgba(139, 92, 246, .28);
    --mark-text: #d8ccff;
    --code-bg:   rgba(160, 170, 220, .14);
  }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 58, 237, .14), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(6, 182, 212, .10), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .3s var(--ease), color .3s var(--ease);
}

body.admin-body { background: var(--bg); }

main { flex: 1; display: block; }

a { color: var(--brand-3); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }

code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }
code { background: var(--code-bg); padding: .1em .4em; border-radius: 5px; font-size: .92em; }

::selection { background: rgba(124, 58, 237, .28); }

.container { width: min(var(--maxw), calc(100% - 2 * 20px)); margin: 0 auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 99;
  background: var(--brand-2); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.muted { color: var(--muted); }
.dot { opacity: .5; }
.ta-r { text-align: right; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px; height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .2px; color: var(--text); font-size: 17px; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; color: #fff;
  background: var(--grad); border-radius: 9px; box-shadow: 0 4px 14px rgba(79, 70, 229, .38);
}
.brand-name { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.header-search { flex: 1; max-width: 460px; position: relative; }
.header-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: inline-flex; }
.header-search input {
  width: 100%; height: 38px; padding: 0 16px 0 38px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--search-bg); color: var(--text);
  font: inherit; outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.header-search input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124, 58, 237, .16); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-link {
  color: var(--text-2); font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
}
.nav-link:hover { color: var(--text); background: var(--line); }
.nav-link.is-active { background: var(--grad); color: #fff; }
.nav-link.is-active:hover { color: #fff; background: var(--grad); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-2);
  transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124, 58, 237, .12); }
.icon-btn .icon-sun { display: none; }
.icon-btn .icon-moon { display: block; }
[data-theme="dark"] .icon-btn .icon-sun { display: block; }
[data-theme="dark"] .icon-btn .icon-moon { display: none; }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; padding: clamp(48px, 10vh, 96px) 0 40px; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; z-index: 0;
}
.orb-a { width: 420px; height: 420px; top: -120px; right: -80px; background: radial-gradient(circle, rgba(124,58,237,.55), transparent 70%); animation: float-a 11s ease-in-out infinite; }
.orb-b { width: 360px; height: 360px; bottom: -120px; left: -90px; background: radial-gradient(circle, rgba(6,182,212,.5), transparent 70%); animation: float-b 13s ease-in-out infinite; }

@keyframes float-a { 50% { transform: translate(-26px, 22px); } }
@keyframes float-b { 50% { transform: translate(24px, -18px); } }

.hero-inner { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero-title { margin: 0; font-size: clamp(34px, 6vw, 58px); font-weight: 900; letter-spacing: -.5px; line-height: 1.1; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-slogan { margin: 0; color: var(--text-2); font-size: clamp(15px, 2.4vw, 18px); }

/* ---------- 搜索框 ---------- */
.search-box { position: relative; display: flex; align-items: center; gap: 6px; }
.search-box-lg {
  width: min(640px, 100%); margin-top: 6px;
  padding: 7px; border-radius: 999px;
  background: var(--search-bg); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-box-lg:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 5px rgba(124, 58, 237, .18), var(--shadow); }
.search-box-icon { color: var(--muted); display: inline-flex; padding-left: 12px; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 16px; padding: 10px 6px 10px 8px;
}
.search-box input::placeholder { color: var(--muted); }
.btn-search { flex: none; padding: 10px 26px; font-weight: 700; }

/* 建议下拉 */
.suggest {
  position: absolute; left: 6px; right: 6px; top: calc(100% + 8px);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; z-index: 50; text-align: left;
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-5px); } }
.suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer; color: var(--text); font-size: 14px;
}
.suggest-item:hover, .suggest-item.is-active { background: var(--mark-bg); }
.suggest-type { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; flex: none; }
.suggest-item .suggest-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-empty { padding: 14px 16px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- 热词 / 统计 ---------- */
.hot-wrap { display: flex; align-items: center; gap: 14px; margin-top: 6px; max-width: 640px; flex-wrap: wrap; justify-content: center; }
.hot-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hot-tags-center { justify-content: center; margin-top: 8px; }
.hot-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
  color: var(--text-2); background: var(--bg-glass); border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.hot-tag:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 70, 229, .35); }
.hot-top .hot-rank { color: var(--brand-3); font-weight: 800; }
.hot-rank { font-size: 11px; font-weight: 700; color: var(--muted); }
.hero-stats { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.hero-stats strong { color: var(--text-2); font-size: 16px; }
.hero-stats .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

/* ---------- 横幅 / 提示 ---------- */
.banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 auto 20px; padding: 12px 18px; max-width: var(--maxw);
  width: min(100% - 40px, var(--maxw)); border-radius: var(--radius-sm);
  font-size: 14px;
}
.banner-warn { background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35); color: var(--text-2); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; }
.alert-success { background: rgba(16, 185, 129, .12); border: 1px solid rgba(16, 185, 129, .35); color: var(--text-2); }
.alert-error { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); color: var(--text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .2s var(--ease); text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .35); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79, 70, 229, .45); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--brand-2); }
.btn-danger { background: rgba(239, 68, 68, .1); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-mini { padding: 4px 10px; font-size: 12px; border-radius: 999px; }
.icon-btn { line-height: 0; }

/* ---------- 结果页 ---------- */
.results { padding: 28px 0 48px; }
.results-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.results-summary { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--text-2); }
.results-summary strong { color: var(--text); }
.query-word { color: var(--brand-3); }
.token-list { display: flex; flex-wrap: wrap; gap: 6px; }
.token { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--bg-glass); border: 1px solid var(--line); color: var(--text-2); }

.result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: result; }
.result-item {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 0 2px 10px rgba(20, 22, 60, .03);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  animation: rise .3s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.result-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.result-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.result-title a { color: var(--text); }
.result-title a:hover { color: var(--brand-3); }
.result-url { margin: 0 0 8px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-snippet { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--mark-bg); color: var(--mark-text); }
.meta-source { font-weight: 600; color: var(--text-2); }

mark { background: var(--mark-bg); color: var(--mark-text); border-radius: 3px; padding: 0 1px; }

/* 分页 */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; justify-content: center; }
.page-link {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text-2); font-size: 14px;
}
.page-link:hover { color: var(--text); border-color: var(--brand-2); }
.page-link.is-active { background: var(--grad); color: #fff; border-color: transparent; }
.page-ellipsis { align-self: center; color: var(--muted); }

/* 空状态 */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-2); }
.empty-illust { color: var(--muted); margin-bottom: 14px; }
.empty-state h2 { margin: 0 0 6px; font-size: 20px; color: var(--text); }

/* 侧栏 */
.results-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--bg-glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(8px); }
.side-title { margin: 0 0 14px; font-size: 15px; font-weight: 800; }
.side-hot { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: hot; }
.side-hot li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.side-hot a { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side-hot a:hover { color: var(--brand-3); }
.hot-count { font-size: 12px; color: var(--muted); flex: none; }
.mode-list { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.mode-list dt { color: var(--muted); }
.mode-list dd { margin: 0; color: var(--text-2); font-weight: 600; }

/* ---------- 登录页 ---------- */
.auth-wrap { display: grid; place-items: center; padding: 60px 16px; position: relative; overflow: hidden; flex: 1; }
.auth-card { position: relative; z-index: 1; width: min(420px, 100%); padding: 34px 32px; border-radius: var(--radius-lg); }
.glass { background: var(--bg-glass); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand h1 { margin: 12px 0 2px; font-size: 24px; }
.auth-tip { font-size: 12px; text-align: center; margin: 18px 0 0; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea, .inline-search input {
  font: inherit; color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px;
  outline: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); width: 100%;
}
.field select { cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-search input:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}
.field textarea { resize: vertical; min-height: 60px; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ---------- 管理后台 ---------- */
.admin-wrap { padding: 28px 0 60px; display: flex; flex-direction: column; gap: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(8px);
}
.stat-icon { font-size: 26px; }
.stat-card strong { display: block; font-size: 24px; line-height: 1.1; }
.stat-card span { color: var(--muted); font-size: 12px; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 20px; align-items: start; }
.panel { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.panel-empty { padding: 8px 0; }

.inline-search { display: flex; gap: 8px; }
.inline-search input { width: 220px; padding: 8px 12px; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.data-table td { color: var(--text-2); }
.cell-title a { color: var(--text); font-weight: 600; max-width: 320px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.cell-title a:hover { color: var(--brand-3); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status-dot.is-on::before { background: var(--success); }
.status-dot.is-off::before { background: var(--muted); }
.status-dot.is-pending::before { background: var(--warning); }

.filter-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 14px; margin-bottom: 16px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bulk-bar select {
  font: inherit; color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px;
  outline: none; cursor: pointer; width: auto;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.bulk-bar select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }

.admin-hot { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; counter-reset: hot; }
.admin-hot li { display: flex; align-items: center; gap: 10px; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.admin-hot .hot-count { margin-left: auto; }

/* ---------- 底部 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; margin-top: auto; }
.footer-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.footer-ver { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }
.footer-note { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr; }
  .results-side { flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-header { height: auto; }
  .header-inner { flex-wrap: wrap; height: auto; gap: 10px 12px; padding: 8px 0; }
  .header-search { display: block; flex: 1 1 100%; order: 3; max-width: none; }
  .hero { padding-top: 40px; }
  .search-box-lg { flex-wrap: nowrap; }
  .btn-search { padding: 10px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-head { flex-direction: column; align-items: stretch; }
  .inline-search input { width: 100%; }
  .footer-note { width: 100%; }
}

@media (max-width: 480px) {
  :root { --header-h: 54px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 20px; }
  .result-item { padding: 14px; }
  .auth-card { padding: 26px 20px; }
  .btn-search span { display: none; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 安装向导 ---------- */
.install-body { background: radial-gradient(1200px 600px at 80% -10%, rgba(124, 58, 237, .14), transparent 60%), radial-gradient(900px 500px at 10% 110%, rgba(56, 189, 248, .10), transparent 55%), var(--bg); }
.wizard-wrap { max-width: 760px; padding: 34px 16px 60px; display: flex; flex-direction: column; gap: 22px; }

.wizard-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.wizard-step { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-glass); color: var(--muted); font-size: 13px; }
.wizard-step .step-index { width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.wizard-step.is-active { border-color: var(--brand-2); color: var(--text); box-shadow: 0 4px 14px rgba(124, 58, 237, .12); }
.wizard-step.is-active .step-index { background: var(--grad); color: #fff; border-color: transparent; }
.wizard-step.is-done { color: var(--text-2); }
.wizard-step.is-done .step-index { background: rgba(16, 185, 129, .14); border-color: rgba(16, 185, 129, .4); color: var(--success); }

.wizard-card { padding: 30px 32px; }
.wizard-head { margin-bottom: 20px; }
.wizard-head h1 { margin: 0 0 6px; font-size: 24px; }
.wizard-sub { margin: 0; color: var(--muted); font-size: 14px; }

.check-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: "dot name value" "dot help help"; gap: 2px 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; align-items: center; }
.check-dot { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.check-item.is-ok .check-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, .14); }
.check-item.is-warn .check-dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(245, 158, 11, .16); }
.check-item.is-error .check-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.check-item.is-info .check-dot { background: var(--brand-2); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }
.check-name { grid-area: name; font-weight: 600; color: var(--text); }
.check-value { grid-area: value; font-size: 12px; color: var(--muted); }
.check-help { grid-area: help; font-size: 12px; color: var(--muted); }

.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.wizard-actions .btn { min-width: 130px; }

.driver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.driver-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); position: relative; }
.driver-card input { position: absolute; opacity: 0; pointer-events: none; }
.driver-card strong { font-size: 14px; color: var(--text); }
.driver-card span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.driver-card.is-active { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }
.driver-card.is-active strong { color: var(--brand-3); }
.driver-card:hover { border-color: var(--brand-2); }

.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--brand-2); }
.field-hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.done-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.done-meta div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.done-meta dt { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.done-meta dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.done-actions { justify-content: center; }

.install-footer { border-top: 1px solid var(--line); padding: 20px 0; margin-top: auto; }
.install-footer .container { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .check-list { grid-template-columns: 1fr; }
  .driver-grid { grid-template-columns: 1fr; }
  .done-meta { grid-template-columns: 1fr; }
  .wizard-card { padding: 22px 18px; }
  .wizard-step { padding: 10px 8px; font-size: 12px; gap: 6px; }
  .wizard-step .step-index { width: 22px; height: 22px; font-size: 12px; }
  .wizard-actions .btn { min-width: 110px; flex: 1; }
}