:root {
  --bg: #0b1220;
  --bg-soft: #111c2e;
  --bg-deep: #0a1526;
  --line: #1e2d44;
  --text: #e6edf7;
  --text-dim: #8ba0bd;
  --accent: #3b82f6;
  --plate: #1d4ed8;
  --ok: #16a34a;
  --no: #dc2626;
  --radius: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

html { scrollbar-gutter: stable; }

body {
  background: radial-gradient(1200px 600px at 50% -10%, #16273f 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 页头 ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* 品牌标就是一块小号车牌 */
.mark {
  width: 26px;
  height: 18px;
  border-radius: 3px;
  background: var(--plate);
  position: relative;
  flex: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.brand h1 {
  font-size: 17px;
  font-weight: 650;
  margin: 0;
  letter-spacing: 0.02em;
}

.meta {
  display: flex;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

#visit-count {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ---------- 题目区 ---------- */

.stage {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding-bottom: 18px;
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 0;
}

.step {
  font-size: 12.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: #24374f;
  transition: background 0.2s;
}

.dot.cur { background: var(--accent); }
.dot.ok { background: var(--ok); }
.dot.no { background: var(--no); }

.prompt {
  padding: 22px 18px 8px;
  text-align: center;
}

.sub {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-dim);
}

/* 题面：猜城市时画真车牌，猜代号时就是普通的城市大字 */
.big {
  margin: 0;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
}

.big.is-plate {
  width: 230px;
  height: 74px;
  margin: 0 auto;
  border-radius: 10px;
  background: var(--plate);
  color: #fff;
  font-size: 38px;
  letter-spacing: 0.16em;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55), 0 8px 24px rgba(29, 78, 216, 0.28);
}

.big.is-city {
  font-size: 34px;
  letter-spacing: 0.08em;
  color: #dbeafe;
}

.hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
  min-height: 19px;
}

/* ---------- 选项 ---------- */

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 18px 0;
}

.opt {
  padding: 16px 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.opt:hover:not(:disabled) {
  background: #13223a;
  border-color: #33507a;
}

.opt:active:not(:disabled) { transform: scale(0.985); }

.opt:disabled { cursor: default; }

.opt.ok {
  background: rgba(22, 163, 74, 0.16);
  border-color: rgba(34, 197, 94, 0.65);
  color: #86efac;
}

.opt.no {
  background: rgba(220, 38, 38, 0.14);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fca5a5;
}

.feedback {
  margin: 16px 18px 0;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  text-align: center;
  border: 1px solid transparent;
}

.feedback.ok {
  color: #86efac;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(34, 197, 94, 0.34);
}

.feedback.no {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(248, 113, 113, 0.32);
}

/* ---------- 结算 ---------- */

.result {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 18px 20px;
  text-align: center;
}

.result-title {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.result-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
}

.cell-code {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.cell-city {
  font-size: 12px;
  color: var(--text-dim);
}

.cell.ok {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(22, 163, 74, 0.12);
}

.cell.ok .cell-code { color: #86efac; }

.cell.no {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(220, 38, 38, 0.1);
}

.cell.no .cell-code { color: #fca5a5; }

.wrong {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.wrong li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text-dim);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.wrong li span { color: #6f83a0; }

.wrong li.all-right {
  justify-content: center;
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(22, 163, 74, 0.1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  justify-content: center;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  color: #08111f;
  background: var(--accent);
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}

.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: #16233a; }

.countdown {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 说明 ---------- */

.howto {
  margin-top: 26px;
  color: var(--text-dim);
  font-size: 14px;
}

.howto h2 {
  font-size: 14px;
  color: var(--text);
  margin: 22px 0 8px;
  font-weight: 650;
}

.howto ul { margin: 0; padding-left: 20px; }
.howto li { margin-bottom: 5px; }
.howto b { color: var(--text); }
.howto p { margin: 0; }

.howto a {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
}

.howto a:hover { border-bottom-color: #93c5fd; }

.foot {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 34px;
  font-size: 12px;
  color: #5b7294;
}

.brand h1 a { color: inherit; text-decoration: none; }

.back {
  color: #93c5fd;
  text-decoration: none;
  font-size: 12.5px;
}

.back:hover { text-decoration: underline; }

/* ---------- 车牌总表页 ---------- */

.list-hero {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px 20px;
}

.list-hero h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.list-sub {
  margin: 6px 0 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.search {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.search:focus { border-color: #3b6ea8; }
.search::placeholder { color: #5b7294; }

.search-empty {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.prov { margin-top: 22px; }

.prov h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  padding-left: 2px;
  font-size: 15px;
  font-weight: 650;
}

.prov-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.prov-link:hover { border-bottom-color: var(--line); }

.prov-abbr {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}

.codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  text-decoration: none;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: border-color 0.15s, background 0.15s;
}

.code-row:hover {
  background: #16233a;
  border-color: #33507a;
}

.code-tag {
  flex: none;
  min-width: 46px;
  padding: 2px 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--plate);
  border-radius: 4px;
}

.code-city {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text);
}

.code-note {
  flex: none;
  font-size: 11px;
  color: #5b7294;
}

.foot a { color: #93c5fd; text-decoration: none; }

/* ---------- 单个代号页 ---------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.crumbs a { color: #93c5fd; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.plate-hero {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 18px 26px;
  text-align: center;
}

.plate-ask {
  margin: 0;
  font-size: 15px;
  color: var(--text-dim);
}

.plate-big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 260px;
  height: 84px;
  margin: 16px auto 14px;
  border-radius: 10px;
  background: var(--plate);
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.18em;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55), 0 8px 24px rgba(29, 78, 216, 0.26);
}

.plate-answer {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
}

.plate-note {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.explain {
  margin-top: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.explain p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #c7d5e8;
}

.facts {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 6px 10px;
  margin: 0;
  font-size: 13.5px;
}

.facts dt { color: var(--text-dim); }
.facts dd { margin: 0; color: var(--text); }

.siblings { margin-top: 22px; }

.siblings h2 {
  margin: 0 0 8px;
  padding-left: 2px;
  font-size: 15px;
  font-weight: 650;
}

.cta {
  margin-top: 26px;
  padding: 20px 18px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cta p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.cta .btn { display: inline-block; text-decoration: none; }

.back-list {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
}

.back-list a { color: #93c5fd; text-decoration: none; }
.back-list a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .brand h1 { font-size: 16px; }
  .meta { font-size: 11.5px; }
  .big.is-plate { width: 200px; height: 66px; font-size: 33px; }
  .big.is-city { font-size: 29px; }
  .opt { font-size: 16px; padding: 14px 8px; }
  .result-title { font-size: 34px; }
  .actions .btn { flex: 1 1 40%; padding-left: 10px; padding-right: 10px; font-size: 13.5px; }
  .codes { grid-template-columns: 1fr; }
  .list-hero h1 { font-size: 21px; }
}