/* ============================================================
   关注名录 · 设计系统 v5（winbid.lol 暗色 + outbid.lol 浅色双主题）
   深浅切换：html[data-theme]，默认暗色（跟随系统，localStorage 记忆）
   无 emoji；头像圆形；顶栏三元素 + 主题/语言切换按钮
   ============================================================ */

:root, [data-theme="dark"] {
  --bg: #09090B;
  --card: #18181B;
  --hover: #1E1E22;
  --row-hover: #131316;
  --line: #27272A;
  --line-soft: #1F1F23;
  --ink: #FAFAFA;
  --ink-2: #A1A1AA;
  --ink-3: #71717A;
  --accent: #F5A54B;
  --accent-text: #F5A54B;
  --accent-on: #09090B;
  --filter-bg: #18181B;
  --logo-glow: rgba(245, 165, 75, .5);
  --shadow: none;
}

[data-theme="light"] {
  --bg: #FFFDFA;
  --card: #FFFFFF;
  --hover: #FAF7F0;
  --row-hover: #FAF7F0;
  --line: #E8E5DE;
  --line-soft: #F0EDE6;
  --ink: #2C2A26;
  --ink-2: #6E6A62;
  --ink-3: #A6A199;
  --accent: #E8833A;
  --accent-text: #B85C1D;
  --accent-on: #FFFFFF;
  --filter-bg: #F3F1EC;
  --logo-glow: rgba(232, 131, 58, .35);
  --shadow: 0 1px 2px rgba(31, 30, 27, .04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--accent-on); }

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  height: 60px;
}

.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 16.5px; color: var(--ink);
  white-space: nowrap; letter-spacing: .3px;
}
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex: none;
  box-shadow: 0 0 10px var(--logo-glow);
}

.header-stats {
  display: flex; align-items: center; gap: 10px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 14px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin: 0 auto;
}
.header-stats .sep {
  width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3);
  display: inline-block;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink-2);
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.lang-btn { font-size: 12.5px; font-weight: 700; text-decoration: none; }

/* 主题按钮：按当前主题显示对侧图标 */
#themeToggle .fe-sun { display: none; }
#themeToggle .fe-moon { display: none; }
[data-theme="dark"] #themeToggle .fe-sun { display: block; }
[data-theme="light"] #themeToggle .fe-moon { display: block; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 12px;
  background: var(--accent); color: var(--accent-on) !important; font-weight: 700; font-size: 14.5px;
  transition: filter .15s, transform .15s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }

@media (max-width: 700px) { .header-stats { display: none; } }

/* ---------- 首屏 ---------- */

.hero { padding: 96px 0 44px; text-align: center; }
.hero h1 { font-size: 64px; font-weight: 800; letter-spacing: 4px; line-height: 1.15; }
.hero-sub { margin-top: 20px; font-size: 16px; color: var(--ink-2); letter-spacing: 1px; }
.hero-quick { margin-top: 34px; display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 22px;
  padding: 9px 18px; font-size: 13.5px; color: var(--ink-2);
  transition: all .15s; background: var(--card); box-shadow: var(--shadow);
}
.hero-pill:hover { border-color: var(--accent); color: var(--ink); }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }

@media (max-width: 640px) {
  .hero { padding: 60px 0 32px; }
  .hero h1 { font-size: 42px; letter-spacing: 2px; }
}

/* ---------- 分组标题 ---------- */

.rank-group { padding: 38px 0 8px; }
.group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-bottom: 11px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.group-head h1, .group-head h2 {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--ink-2);
}
.group-note { color: var(--ink-3); font-weight: 400; letter-spacing: 1px; }
.more-link { font-size: 13px; color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.more-link.muted { color: var(--ink-3); font-weight: 400; }
.group-head-page { margin-top: 46px; }
.group-head-page h1 { font-size: 16px; color: var(--ink); }

.cat-intro { margin: 12px 0 18px; color: var(--ink-2); font-size: 14px; max-width: 680px; }

/* 领域切换（色点胶囊行） */
.cat-switch { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 30px; }
.switch-pill {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); transition: all .15s;
}
.switch-pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.switch-pill.current { border-color: var(--accent); background: var(--hover); }

/* ---------- 榜单：前 3 卡片 + 列表行 ---------- */

.rank-list { display: flex; flex-direction: column; }

.rank-row {
  display: flex; align-items: center; gap: 15px;
  padding: 15px 13px;
}
.rank-row.top3 {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 16px;
  border-radius: 16px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
}
.rank-row.top3:hover { background: var(--hover); }
.rank-row:not(.top3) {
  border-top: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: background .12s;
}
.rank-row:first-child { border-top: none; }
.rank-row:not(.top3):hover { background: var(--row-hover); }

.rank-num {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 700;
  color: var(--accent); min-width: 44px; text-align: right;
  font-variant-numeric: tabular-nums; flex: none;
}
.rank-row:not(.top3) .rank-num { font-size: 16px; font-weight: 600; color: var(--ink-3); }

/* 圆形头像 */
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  object-fit: cover; border: 1px solid var(--line);
}
.rank-row:not(.top3) .avatar { width: 44px; height: 44px; }
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 700;
}

.row-main { min-width: 0; flex: 1; }
.row-title { font-weight: 700; font-size: 15.5px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rank-row.top3 .row-title { font-size: 16.5px; }
.row-handle { font-size: 12.5px; color: var(--ink-3); font-weight: 400; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

.row-desc {
  margin-top: 2px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.row-meta {
  margin-top: 4px; font-size: 12px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-meta b { color: var(--ink-2); font-weight: 700; }
.meta-view { color: var(--accent-text); font-weight: 600; }

.row-followers {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -.3px; flex: none;
}
.rank-row:not(.top3) .row-followers { font-size: 16px; }
.row-followers em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 2px; font-weight: 400; }

@media (max-width: 640px) {
  .rank-row { flex-wrap: wrap; gap: 10px; }
  .rank-num { min-width: 34px; font-size: 15px; }
  .avatar, .rank-row:not(.top3) .avatar { width: 42px; height: 42px; }
  .row-main { flex-basis: calc(100% - 150px); }
  .row-followers { font-size: 15px; }
}

/* ---------- 领域页筛选 ---------- */

.filter-bar {
  margin: 6px 0 18px; display: flex; gap: 5px; flex-wrap: wrap;
  background: var(--filter-bg); border: 1px solid var(--line);
  border-radius: 14px; padding: 7px 9px;
}
.chip-filter {
  border: none; cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px; color: var(--ink-2);
  background: transparent; padding: 6px 13px; border-radius: 9px;
  transition: all .15s;
}
.chip-filter:hover { color: var(--ink); background: var(--hover); }
.chip-filter.active { background: var(--accent); color: var(--accent-on); font-weight: 700; }

/* ---------- CTA / 规则页 / 404 ---------- */

.cta {
  margin: 56px 0 20px; padding: 42px 30px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
}
.cta h2 { font-size: 20px; font-weight: 800; }
.cta p { margin: 10px auto 24px; color: var(--ink-2); max-width: 460px; font-size: 14.5px; }

.about-page { padding: 46px 24px 30px; max-width: 720px; }
.about-page h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.rule { margin-top: 32px; }
.rule h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; letter-spacing: 1px; }
.rule ul { list-style: none; }
.rule li {
  padding: 13px 16px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14.5px; color: var(--ink-2); line-height: 1.7;
  box-shadow: var(--shadow);
}
.rule li b { color: var(--ink); }
.rule-promise li { border-left: 3px solid var(--accent); }
.rule code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: var(--hover); padding: 2px 8px;
  border-radius: 6px; font-size: 13px;
}

.notfound { padding: 100px 24px; text-align: center; }
.notfound h1 {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 56px; font-weight: 700; color: var(--accent);
}
.notfound p { margin: 8px 0 26px; color: var(--ink-2); }

/* ---------- 页脚 ---------- */

.site-footer { padding: 44px 0 40px; }
.footer-card {
  border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; text-align: center;
  box-shadow: var(--shadow);
}
.footer-card a { color: var(--ink-2); }
.footer-card a:hover { color: var(--accent); }
.site-footer p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.footer-card p:first-child { margin-top: 0; font-size: 13px; }
.site-footer strong { color: var(--ink); }
.muted { color: var(--ink-3); font-size: 12.5px; }

/* ---------- 提交页 ---------- */

.submit-page { padding: 44px 20px 30px; max-width: 780px; }
.submit-page h1 {
  font-size: 30px; font-weight: 800; letter-spacing: -.5px;
}
.submit-sub { margin: 10px 0 26px; color: var(--ink-2); font-size: 14.5px; }

.tiers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.tier {
  position: relative; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 14px; font: inherit; color: var(--ink);
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s, background .15s, transform .15s;
}
.tier:hover { background: var(--hover); transform: translateY(-1px); }
.tier.active {
  border-color: var(--accent);
  background: var(--hover);
  box-shadow: 0 0 0 1px var(--accent);
}
.tier-badge {
  position: absolute; top: -9px; right: 12px;
  background: var(--accent); color: var(--accent-on);
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px;
}
.tier-name { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tier.active .tier-name { color: var(--accent-text); }
.tier-price { font-size: 27px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.tier-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.tier-note {
  margin: 14px 2px 26px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
}

.submit-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.submit-form input, .submit-form select, .submit-form textarea {
  font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.submit-form textarea { resize: vertical; }
.submit-form input:focus, .submit-form select:focus, .submit-form textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent);
}
.submit-form input::placeholder, .submit-form textarea::placeholder { color: var(--ink-3); }
.submit-btn { grid-column: 1 / -1; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; width: 100%; }

.submit-result {
  margin-top: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow);
}
.submit-result h2 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.result-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.copy-box {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; margin: 0 0 12px; color: var(--ink-2);
}
.result-left .btn { width: 100%; }
.pay-guide h3 { font-size: 15px; font-weight: 800; color: var(--accent-text); margin-bottom: 8px; }
.pay-free { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.pay-steps { margin: 0 0 14px; padding-left: 0; list-style: none; }
.pay-steps li { font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.pay-qr {
  display: block; width: 158px; height: 158px;
  border: 1px solid var(--line); border-radius: 12px; object-fit: cover;
}
.pay-qr-fallback {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--bg); color: var(--ink-3); font-size: 13px; line-height: 1.7;
  border-style: dashed;
}
.pay-note { margin-top: 12px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.submit-standards { text-align: center; margin-top: 26px; }
.submit-standards a { font-size: 13.5px; font-weight: 700; }

.cta-alt {
  display: block; margin-top: 12px; font-size: 12.5px; color: var(--ink-3);
}

@media (max-width: 640px) {
  .tiers { grid-template-columns: 1fr; }
  .tier-badge { top: -9px; right: 14px; }
  .submit-form { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}
