/* ============================================================
   大仓鼠修改器 · 深色科技 / 产品风
   零依赖，单一 token 驱动；默认深色，右上角可切换浅色
   ============================================================ */

:root {
  --bg: #08090c;
  --bg-soft: #0b0d12;
  --surface: #10131a;
  --surface-2: #151925;
  --border: #232838;
  --border-soft: #1b1f2b;
  --text: #e8ebf2;
  --text-2: #c2c8d4;
  --muted: #8b93a5;
  --faint: #5e6577;
  --accent: #4d7cfe;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(77, 124, 254, 0.12);
  --ok: #34d399;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.32);
  --ring: 0 0 0 3px rgba(77, 124, 254, 0.28);

  --g1: 4px; --g2: 8px; --g3: 12px; --g4: 16px; --g5: 24px; --g6: 32px; --g7: 48px; --g8: 64px;

  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9; --bg-soft: #eef0f4; --surface: #ffffff; --surface-2: #f2f4f8;
    --border: #dfe3ea; --border-soft: #e8ebf1;
    --text: #12151c; --text-2: #3d4452; --muted: #666e7e; --faint: #8a91a0;
    --accent: #2563eb; --accent-2: #7c3aed; --accent-soft: rgba(37, 99, 235, 0.1);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 10px 30px rgba(20, 30, 60, 0.1);
  }
}
:root[data-theme="light"] {
  --bg: #f6f7f9; --bg-soft: #eef0f4; --surface: #ffffff; --surface-2: #f2f4f8;
  --border: #dfe3ea; --border-soft: #e8ebf1;
  --text: #12151c; --text-2: #3d4452; --muted: #666e7e; --faint: #8a91a0;
  --accent: #2563eb; --accent-2: #7c3aed; --accent-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 10px 30px rgba(20, 30, 60, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
:root[data-theme="light"] .site-header { background: rgba(246, 247, 249, 0.85); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-header { background: rgba(246, 247, 249, 0.85); }
}
.header-inner { display: flex; align-items: center; gap: var(--g4); height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand-text { font-size: 15px; }
.nav { display: flex; gap: 4px; margin-left: var(--g5); }
.nav a { padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-2); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--block { width: 100%; margin-top: 8px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.theme-toggle {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 16px; line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: inline; }
}

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--border-soft); background:
  radial-gradient(900px 320px at 18% -40%, var(--accent-soft), transparent 70%),
  radial-gradient(700px 300px at 88% -30%, rgba(139, 92, 246, 0.12), transparent 70%);
}
.hero-inner { padding-block: 64px 44px; }
.hero-kicker { font-size: 12px; letter-spacing: 0.14em; color: var(--accent); }
.hero-title { margin-top: 14px; font-size: clamp(34px, 5vw, 48px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; }
.hero-sub { margin-top: 14px; max-width: 640px; font-size: 17px; color: var(--text-2); }
.hero-actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.stat-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: var(--g6); }
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.stat-label { font-size: 12px; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding-block: 52px; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--border-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--g5); margin-bottom: 26px; flex-wrap: wrap; }
.kicker { font-size: 11.5px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.section-title { margin-top: 8px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.section-lead { margin-top: 10px; max-width: 60ch; color: var(--text-2); }

.cat-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; color: var(--text-2); background: var(--surface);
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.cat-count { font-size: 11px; color: var(--muted); }

.cat-block { margin-top: 34px; }
.cat-block:first-of-type { margin-top: 6px; }
.cat-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--g4); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.cat-block-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- mod grid & card ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.mod-grid:has(> :only-child) { grid-template-columns: minmax(0, 520px); }
.mod-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.mod-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.mod-card-top { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--muted);
  background: var(--surface-2);
}
.tag--cat { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.tag--price { margin-left: auto; color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.mod-card-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.mod-card-title a:hover { color: var(--accent); }
.mod-card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: var(--g3); }
.mod-card-foot .mono { font-size: 11.5px; color: var(--faint); }

.empty {
  padding: 44px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface);
}

/* ---------- spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.spec-table th { width: 168px; color: var(--muted); font-weight: 600; font-size: 12.5px; background: var(--surface); }
.spec-table td { color: var(--text-2); background: var(--bg-soft); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ---------- about / links ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g7); align-items: start; }
.lead { margin-top: 12px; color: var(--text-2); max-width: 52ch; }
.checklist { margin-top: 20px; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 14px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; }

.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-item {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .16s ease, transform .16s ease;
}
.link-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.link-label { font-size: 13.5px; font-weight: 600; }
.link-mono { font-size: 11px; color: var(--faint); }

/* ---------- detail page ---------- */
.breadcrumb { padding-block: 18px 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); align-items: center; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:not(a) { color: var(--faint); }
.detail-hero { padding-block: 22px 30px; border-bottom: 1px solid var(--border-soft); }
.detail-tags { display: flex; gap: 6px; }
.detail-title { margin-top: 12px; font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -0.03em; line-height: 1.1; font-weight: 800; }
.detail-sub { margin-top: 12px; max-width: 62ch; font-size: 16px; color: var(--text-2); }
.detail-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.spec-strip { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-strip > div { padding: 12px 16px; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 3px; background: var(--surface); }
.spec-strip > div:last-child { border-right: none; }
.spec-strip .mono.muted { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.spec-strip b { font-size: 14px; font-weight: 700; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--g6); padding-block: 36px 64px; align-items: start; }
.block { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--border-soft); }
.block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.block-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }
.feature-list { display: grid; gap: 14px; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature-dot { flex: none; margin-top: 7px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.feature strong { display: block; font-size: 15px; font-weight: 600; }
.feature p { margin-top: 3px; font-size: 13.5px; color: var(--muted); }

.changelog { display: grid; gap: 16px; }
.cl-item { padding-left: 16px; border-left: 2px solid var(--border); }
.cl-head { display: flex; gap: 12px; align-items: baseline; }
.cl-ver { font-size: 13px; font-weight: 700; color: var(--accent); }
.cl-date { font-size: 11.5px; }
.cl-item p { margin-top: 4px; font-size: 13.5px; color: var(--text-2); }

.notice-list { display: grid; gap: 10px; }
.notice-list li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-2); }
.notice-list li::before { content: "·"; position: absolute; left: 6px; color: var(--accent); font-weight: 700; }

.cta-card { position: sticky; top: 84px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.cta-price { margin-top: 10px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.cta-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.cta-card .btn--block { margin-top: 10px; }
.cta-card .btn--ghost.btn--block { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); padding-block: 34px; }
.footer-inner { display: grid; gap: 16px; }
.footer-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.footer-brand { font-weight: 700; }
.footer-desc { font-size: 12.5px; color: var(--faint); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { font-size: 13px; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }

/* ---------- 许愿池 ---------- */
.hero--page .hero-inner { padding-block: 54px 34px; }
.wish-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--g5); align-items: start; }
.wish-form-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.wish-form { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 11px; outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 94px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.wish-form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.wish-form-note { font-size: 11.5px; color: var(--faint); }
.wish-result { margin-top: 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--border)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.wish-result-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.wish-result-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.wish-how { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.wish-steps { margin-top: 16px; display: grid; gap: 12px; }
.wish-steps li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--text-2); }
.wish-step-num { flex: none; font-size: 11px; color: var(--accent); }
.wish-channels { margin-top: 20px; }

.wish-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.wish-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.wish-card-top { display: flex; gap: 6px; flex-wrap: wrap; }
.wish-card-title { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.wish-card-want { font-size: 13px; color: var(--muted); line-height: 1.6; }
.wish-card-foot { margin-top: auto; padding-top: 4px; }
.wish-card-foot .mono { font-size: 11.5px; color: var(--faint); }

.tag--status-doing { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.tag--status-queued { color: #fbbf24; border-color: color-mix(in srgb, #fbbf24 40%, transparent); background: color-mix(in srgb, #fbbf24 12%, transparent); }
.tag--status-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tag--status-idea { color: var(--muted); }

.wish-hint { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.wish-hint a { color: var(--accent); font-weight: 600; }
.wish-hint a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: var(--g6); }
  .detail-layout { grid-template-columns: 1fr; }
  .cta-card { position: static; }
  .wish-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .nav { display: none; }
  .header-actions .btn { display: none; }
  .hero-inner { padding-block: 44px 32px; }
  .hero-sub { font-size: 15px; }
  .stat-row { gap: var(--g5); }
  .section { padding-block: 38px; }
  .mod-grid { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: 1fr; }
  .spec-strip { grid-template-columns: 1fr 1fr; }
  .spec-strip > div:nth-child(2) { border-right: none; }
  .spec-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .spec-table th { width: 120px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .detail-layout { padding-block: 28px 48px; }
  .wish-form { grid-template-columns: 1fr; }
  .wish-grid { grid-template-columns: 1fr; }
}

/* ---------- mod covers & detail hero (v3) ---------- */
.mod-card { gap: 0; padding: 0; overflow: hidden; }
.mod-card-cover { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.mod-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s cubic-bezier(.2,.7,.3,1); }
.mod-card:hover .mod-card-cover img { transform: scale(1.035); }
.mod-card-cover-none { display: grid; place-items: center; height: 100%; font-family: var(--mono); font-size: 28px; letter-spacing: .1em; color: var(--faint); background: linear-gradient(135deg, var(--surface-2), var(--bg)); }
.mod-card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }

.detail-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.detail-cover { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.detail-cover img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (max-width: 860px) {
  .detail-hero-inner { grid-template-columns: 1fr; gap: 22px; }
}
