/* ============================================================
 *  闲鱼小名查询 · 样式（移动优先 + 深浅主题）
 * ============================================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f9;
  --surface: #ffffff;
  --text: #14161c;
  --text-soft: #565d6c;
  --muted: #868f9f;
  --line: #e4e7ee;
  --accent: #ff7a1a;
  --accent-2: #ffd166;
  --accent-soft: rgba(255, 122, 26, .1);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 27, .06), 0 6px 18px rgba(16, 18, 27, .05);
  --shadow-md: 0 12px 34px rgba(16, 18, 27, .1);
  --maxw: 1080px;
  --header-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0f1116;
  --bg-alt: #14171e;
  --surface: #171b23;
  --text: #eef1f6;
  --text-soft: #a6aebd;
  --muted: #78818f;
  --line: #262b34;
  --accent: #ff9843;
  --accent-soft: rgba(255, 152, 67, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .3);
  --shadow-md: 0 16px 44px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .8rem; }
p:last-child { margin-bottom: 0; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 15px;
}
.brand-text { font-size: 16px; }
.nav { display: flex; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--text-soft); }
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.header-actions { display: flex; gap: 8px; }
.theme-toggle, .nav-toggle {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: .25s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 5vw, 48px); text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 5px 14px; border-radius: 999px; margin: 0 0 14px;
}
.hero-title { font-size: clamp(30px, 6vw, 48px); font-weight: 800; }
.hero-sub { margin: 14px auto 0; max-width: 60ch; color: var(--text-soft); font-size: 16px; }

.search-box {
  position: relative; width: 100%; max-width: 620px; margin: 26px auto 0;
  display: flex; align-items: center;
}
.search-box .search-icon { position: absolute; left: 16px; font-size: 15px; opacity: .7; }
#searchInput {
  width: 100%; padding: 15px 44px 15px 44px; font-size: 16px; font-family: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; outline: none;
  box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
#searchInput:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#searchInput::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 12px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--bg-alt); color: var(--text-soft); cursor: pointer; font-size: 16px; line-height: 1;
}

.hot-wrap { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; }
.hot-label { font-size: 13.5px; color: var(--muted); }
.hot-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hot-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  padding: 5px 13px; border-radius: 999px; font-size: 13.5px; cursor: pointer; font-family: inherit;
  transition: .2s;
}
.hot-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.stats { display: flex; gap: 26px; margin-top: 22px; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat b { font-size: 22px; font-weight: 800; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* Sections */
.section { padding: clamp(36px, 6vw, 64px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 22px; }
.section-kicker { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.section-title { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; }
.section-desc { margin-top: 10px; color: var(--text-soft); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  padding: 7px 15px; border-radius: 999px; font-size: 14px; cursor: pointer; font-family: inherit; transition: .2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.result-tip { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }

/* Term cards */
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.term-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.term-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.term-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.term-name { font-size: 17.5px; font-weight: 800; }
.term-name mark { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 2px; }
.term-cat { font-size: 12.5px; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.alias-list { display: flex; flex-wrap: wrap; gap: 8px; }
.alias {
  border: 1px dashed var(--line); background: var(--bg-alt); color: var(--text-soft);
  padding: 6px 12px; border-radius: 10px; font-size: 14px; cursor: pointer; font-family: inherit;
  transition: .18s;
}
.alias:hover { border-color: var(--accent); border-style: solid; color: var(--accent); background: var(--accent-soft); }
.alias mark { background: transparent; color: var(--accent); font-weight: 700; }
.term-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

.empty-state { text-align: center; padding: 46px 20px; color: var(--text-soft); }
.empty-emoji { font-size: 40px; margin: 0 0 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { position: relative; padding-top: 26px; }
.step h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: 14.5px; }
.step-no {
  position: absolute; top: -14px; left: 20px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; box-shadow: var(--shadow-sm);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.card-warn { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.tips li { font-size: 14px; color: var(--text-soft); padding: 7px 0 7px 20px; position: relative; }
.tips li::before { content: '·'; position: absolute; left: 6px; color: var(--accent); font-weight: 800; }
.link-list { margin-top: 14px; display: grid; gap: 6px; }
.link-list a { display: inline-block; font-size: 14.5px; color: var(--accent); }
.link-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.site-footer p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(14px);
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 99; max-width: 90vw; text-align: center;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

/* Responsive */
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 20px 20px;
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .22s; box-shadow: var(--shadow-md);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 12px 14px; font-size: 16px; border-radius: 12px; }
  .term-grid { grid-template-columns: 1fr; }
  .stats { gap: 18px; }
}
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .brand-text { display: none; }
  .search-box .search-icon { left: 14px; }
  #searchInput { padding: 14px 42px; font-size: 15.5px; }
}
