:root {
  --bg: #0e1116;
  --bg-soft: #151b23;
  --surface: #151b23;
  --surface-2: #1b222c;
  --border: #262d38;
  --border-soft: #1f2731;
  --text: #e6edf3;
  --muted: #8b98a9;
  --brand: #f0b429;
  --brand-ink: #1a1205;
  --brand-soft: rgba(240, 180, 41, 0.13);
  --max: 1100px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #fbfbfc;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --border: #e3e6ea;
  --border-soft: #e9ecef;
  --text: #1f2328;
  --muted: #6b7280;
  --brand: #b45309;
  --brand-ink: #ffffff;
  --brand-soft: rgba(180, 83, 9, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Microsoft YaHei UI", "PingFang SC",
    "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(var(--border-soft) 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .nav { background: var(--bg); }
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}
.logo-text {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
}
.logo-text span { color: var(--muted); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.theme-btn {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}
.theme-btn:hover { color: var(--text); border-color: var(--brand); }

/* Hero */
.hero {
  padding: 64px 0 40px;
}
.kicker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brand);
  letter-spacing: 1px;
  margin: 0 0 10px;
}
.kicker::before { content: "// "; color: var(--muted); }
.hero h1 {
  font-size: 46px;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -1.5px;
}
.hero h1 .hl { color: var(--brand); }
.hero .sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 600;
}
.hero .lead {
  margin: 0;
  color: var(--text);
  opacity: 0.85;
  max-width: 620px;
}
.stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
}
.stats li {
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
}
.stats b {
  font-family: var(--mono);
  color: var(--brand);
  margin-right: 4px;
}

/* 区块 */
.block {
  padding: 34px 0;
  border-top: 1px solid var(--border);
}
.sec-title {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 20px;
}
.sec-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--brand);
  vertical-align: 1px;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12.5px;
  font-family: var(--mono);
}

/* ===== 软件卡片 ===== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  align-items: start;
}

.app {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.app:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-ink);
  background: var(--brand);
  flex: none;
}
.badge-b { background: #6ea8fe; color: #071021; }
.badge-c { background: #7ee0b8; color: #04241a; }
.app-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.2px;
  flex: 1 1 auto;
  min-width: 0;
}
.ver {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 1px 9px;
  white-space: nowrap;
}

.app-desc {
  margin: 0 0 14px;
  color: var(--text);
  opacity: 0.8;
  font-size: 14px;
  line-height: 1.7;
}

.app .meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
}
.app .meta li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.3px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 9px;
}

.btn {
  display: block;
  text-align: center;
  background: var(--brand);
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 10px;
  transition: filter 0.15s ease;
}
.btn:hover { filter: brightness(1.1); }

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}
.hint a { color: var(--brand); }
.hint code { font-family: var(--mono); }

/* 更新说明 */
.app-notes {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.app-notes h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
.notes { margin: 0; font-size: 13.5px; }
.notes dt {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 11px;
}
.notes dt:first-child { margin-top: 0; }
.notes .v {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--brand);
}
.notes .d { font-size: 11.5px; color: var(--muted); }
.notes dd {
  margin: 2px 0 0;
  color: var(--text);
  opacity: 0.78;
  line-height: 1.65;
}

details.more {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
details.more summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--brand);
  list-style: none;
}
details.more summary::-webkit-details-marker { display: none; }
details.more .notes { margin-top: 8px; }

/* 意见反馈 */
.fb-intro {
  margin: 0;
  max-width: 700px;
  font-size: 15px;
  color: var(--text);
  opacity: 0.85;
}
.fb-intro .qq {
  font-family: var(--mono);
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 1px 9px;
}

/* 页脚 */
.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.foot-right { font-family: var(--mono); letter-spacing: 0.5px; }

@media (max-width: 620px) {
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: 34px; }
  .app { padding: 18px; }
}
