:root {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --text: #1b2230;
  --text-soft: #5d6b82;
  --line: #e3e8f0;
  --brand: #3b6cf6;
  --brand-soft: #e8eeff;
  --shadow: 0 10px 30px rgba(23, 38, 70, 0.08);
  --radius: 16px;
}

html[data-theme="dark"] {
  --bg: #0f1420;
  --bg-soft: #171e2c;
  --text: #eaf0fb;
  --text-soft: #97a5bd;
  --line: #26314a;
  --brand: #6f95ff;
  --brand-soft: #1e2a46;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--brand);
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 32px);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.25;
}

.sub {
  margin: 0 0 24px;
  color: var(--text-soft);
}

.sub code {
  background: var(--brand-soft);
  color: var(--brand);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

.counter {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: none;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s ease;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.94); }

.count {
  min-width: 96px;
  text-align: center;
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

.actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ghost-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hint {
  font-size: 13px;
  color: var(--text-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
}

.foot {
  border-top: 1px solid var(--line);
  padding: 16px clamp(16px, 4vw, 40px);
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
}

@media (max-width: 480px) {
  .count { font-size: 32px; min-width: 72px; }
  .btn { width: 44px; height: 44px; }
}
