:root {
  --ink: #0b0b0b;
  --paper: #e7e0d3;
  --paper-dim: #bdb5a8;
  --red: #e1281b;
  --line: rgba(231, 224, 211, .28);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 12%, rgba(225,40,27,.14), transparent 28rem),
    linear-gradient(145deg, #131313 0%, #080808 58%, #111 100%);
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
}

button { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .09;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.shell {
  width: min(920px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0 70px;
  display: grid;
  align-content: center;
}

.eyebrow, .counter, .end-label, .rank, .meta, .stamp {
  font-family: Consolas, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.eyebrow { color: var(--red); font-size: 13px; }

.hero h1 {
  max-width: 760px;
  margin: 18px 0 24px;
  font-size: clamp(48px, 9vw, 94px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.07em;
}

.hero h1 span { color: var(--red); }

.lede {
  max-width: 620px;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.75;
}

.warning {
  max-width: 610px;
  margin: 34px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--red);
  color: var(--paper-dim);
  background: rgba(255,255,255,.035);
  line-height: 1.8;
}

.primary, .secondary {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--paper);
  cursor: pointer;
  transition: .16s ease;
}

.primary { color: var(--ink); background: var(--paper); font-weight: 700; }
.primary:hover { color: white; background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.secondary { color: var(--paper); background: transparent; }
.secondary:hover { border-color: var(--red); color: var(--red); }

.start-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.refuse-link {
  padding: 0;
  color: rgba(231, 224, 211, .48);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.refuse-link:hover { color: var(--paper); }

.quiz { width: 100%; }

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 42px;
}

.progress { flex: 1; height: 2px; background: rgba(255,255,255,.12); }
.progress > i { display: block; height: 100%; background: var(--red); transition: width .3s ease; }
.counter { color: var(--paper-dim); font-size: 12px; }

.question-type { color: var(--red); margin-bottom: 12px; font-size: 13px; }
.question-type.secret-ready { cursor: pointer; }
.question-type.secret-jump { animation: secret-jump .28s steps(2, end); }
.question h2 { margin: 0 0 34px; max-width: 800px; font-size: clamp(27px, 4.5vw, 44px); line-height: 1.35; }
.question h2 blockquote { margin: 16px 0 0; color: var(--paper-dim); font-weight: 400; }

.answers { display: grid; gap: 13px; }
.answer {
  width: 100%;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  text-align: left;
  color: var(--paper);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  line-height: 1.65;
  transition: .15s ease;
}
.answer.selected { border-color: var(--red); background: rgba(225,40,27,.09); transform: translateX(5px); }
.answer:active { border-color: var(--red); background: rgba(225,40,27,.09); }
.answer b { color: var(--red); font-family: Consolas, monospace; }

/* 触摸浏览器会把 :hover 黏在刚点击的位置，导致下一题同位置选项看似被选中。 */
@media (hover: hover) and (pointer: fine) {
  .answer:hover { border-color: var(--red); background: rgba(225,40,27,.09); transform: translateX(5px); }
}

.quiz-nav { margin-top: 26px; display: flex; justify-content: space-between; }
.text-btn { color: var(--paper-dim); border: 0; background: none; cursor: pointer; padding: 8px 0; }
.text-btn:hover { color: var(--paper); }
.meta.secret-ready { color: rgba(231,224,211,.5); cursor: pointer; }
.meta.secret-ready:hover { color: var(--red); }

.secret-answer {
  margin-top: 18px;
  padding: 0;
  color: rgba(231,224,211,.44);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.7;
  animation: secret-reveal 1.4s ease both;
}
.secret-answer:hover { color: var(--red); }

@keyframes secret-reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes secret-jump {
  0% { transform: translate(0,0); }
  35% { transform: translate(4px,-2px); }
  70% { transform: translate(-2px,2px); }
  100% { transform: translate(0,0); }
}

.result-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.end-label { color: var(--red); font-size: 15px; }
.result-head h1 { margin: 12px 0 8px; font-size: clamp(46px, 9vw, 88px); line-height: 1; letter-spacing: -.06em; }
.result-head .subtitle { color: var(--paper-dim); font-size: 18px; }

.result-grid { display: grid; gap: 18px; margin: 32px 0; }
.result-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  overflow: hidden;
}
.result-card:first-child { border-color: var(--red); }
.result-card:first-child::after {
  content: "DB";
  position: absolute;
  right: -10px;
  top: -24px;
  color: rgba(225,40,27,.12);
  font: 900 130px/1 Arial, sans-serif;
}
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.rank { color: var(--red); font-size: 12px; }
.similarity { font: 700 22px/1 Consolas, monospace; }
.result-card h2 { margin: 13px 0 14px; font-size: 34px; }
.verdict { max-width: 720px; margin: 0; color: var(--paper-dim); line-height: 1.85; }
.user-address {
  max-width: 720px;
  margin: 18px 0 0;
  padding-left: 16px;
  color: var(--paper);
  border-left: 3px solid var(--red);
  font-size: 1.05em;
  line-height: 1.85;
}
.quote { margin: 20px 0 0; padding-top: 17px; border-top: 1px solid var(--line); line-height: 1.7; }

.dimensions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 22px; }
.dimension { padding: 12px; background: rgba(255,255,255,.04); }
.dimension small { display: block; color: var(--paper-dim); margin-bottom: 7px; }
.dimension b { font-family: Consolas, monospace; }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.stamp { display: inline-block; margin-top: 28px; padding: 8px 10px; color: var(--red); border: 2px solid var(--red); transform: rotate(-2deg); }

@media (max-width: 640px) {
  .shell { padding-top: 24px; align-content: start; }
  .dimensions { grid-template-columns: repeat(2, 1fr); }
  .result-card { padding: 22px 18px; }
  .card-top { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
