:root {
  --bg: #0a0a0c;
  --panel: #131318;
  --panel-2: #17171d;
  --line: #26262f;
  --ink: #f4f2ee;
  --dim: #8d8d99;
  --yuck: #b6ff3c;
  --hot: #ff4d6d;
  --gold: #ffd166;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SF Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 500px at 12% -8%, #1b2410 0%, transparent 62%),
    radial-gradient(700px 420px at 105% 6%, #2a0f18 0%, transparent 58%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.014) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

a { color: var(--yuck); text-decoration: none; border-bottom: 1px dashed #b6ff3c55; }
a:hover { color: #fff; border-bottom-color: var(--yuck); }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: #0a0a0ccc;
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 58px;
}
.brand {
  font: 700 14px/1 var(--mono);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yuck);
  box-shadow: 0 0 0 3px #b6ff3c22;
  font-style: normal;
}
.nav { display: flex; gap: 16px; font: 12px/1 var(--mono); color: var(--dim); }
.nav a { color: var(--dim); border: 0; }
.nav a:hover { color: var(--yuck); }

/* ---------------- hero ---------------- */
.hero { padding: 74px 0 40px; position: relative; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #b6ff3c44;
  border-radius: 999px;
  color: var(--yuck);
  font: 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: #b6ff3c0d;
  margin-bottom: 16px;
}

h1.num {
  margin: 0;
  display: block;
  width: fit-content;
  font: 800 clamp(30px, 7.4vw, 82px) / 1 var(--mono);
  letter-spacing: -0.045em;
  position: relative;
}
h1.num::before,
h1.num::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 55% 0);
  opacity: 0.75;
}
h1.num::before { color: var(--hot); transform: translate(-2px, -1px); }
h1.num::after { color: var(--yuck); clip-path: inset(52% 0 0 0); transform: translate(2px, 1px); }
h1.num:hover::before { animation: jit 0.18s steps(2) infinite; }
h1.num:hover::after { animation: jit 0.22s steps(2) infinite reverse; }
@keyframes jit {
  0% { transform: translate(-2px, -1px); }
  50% { transform: translate(3px, 1px); }
  100% { transform: translate(-3px, 2px); }
}

.lead {
  margin: 22px 0 0;
  max-width: 62ch;
  color: #cfcdc7;
  font-size: clamp(15px, 1.8vw, 17px);
}
.lead b { color: var(--gold); font-weight: 600; }

.meter { margin: 30px 0 0; max-width: 560px; }
.meter .row {
  display: flex;
  justify-content: space-between;
  font: 11px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bar {
  height: 12px;
  border-radius: 999px;
  background: #1b1b22;
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--yuck), var(--gold) 60%, var(--hot));
  transition: width 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.meter .verdict {
  margin-top: 9px;
  font: 12px/1.6 var(--mono);
  color: var(--hot);
  opacity: 0;
  transition: opacity 0.5s 1.2s;
}
.meter.done .verdict { opacity: 1; }

/* ---------------- marquee ---------------- */
.marquee {
  margin: 46px 0;
  border-block: 1px solid var(--line);
  background: #101015;
  overflow: hidden;
  padding: 10px 0;
}
.marquee div {
  display: flex;
  gap: 34px;
  width: max-content;
  animation: slide 26s linear infinite;
  font: 700 13px/1 var(--mono);
  color: #4e4e5c;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.marquee span:nth-child(3n) { color: #b6ff3c99; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------------- sections ---------------- */
section { padding: 44px 0; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.sec-head h2 {
  margin: 0;
  font: 700 clamp(20px, 3vw, 27px) / 1.25 var(--sans);
  letter-spacing: -0.01em;
}
.sec-head em {
  font: 11px/1 var(--mono);
  font-style: normal;
  color: var(--yuck);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.card h3 { margin: 0 0 8px; font: 700 16px/1.4 var(--sans); }
.card p { margin: 0; color: #b9b7b1; font-size: 14.5px; }
.card .big {
  font: 800 30px/1 var(--mono);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  display: block;
}
.card.hot .big { color: var(--hot); }
.card.yuck .big { color: var(--yuck); }
.card.gold .big { color: var(--gold); }
.jp { font: 12.5px/1.7 var(--mono); color: var(--dim); display: block; margin-top: 10px; }
.tiny { font-size: 12.5px; color: var(--dim); }

/* timeline */
.tl { display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 8px; }
.tl li {
  list-style: none;
  padding: 0 0 22px 24px;
  position: relative;
}
.tl li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--yuck);
}
.tl time {
  font: 11.5px/1 var(--mono);
  color: var(--yuck);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 5px;
}
.tl b { display: block; font-weight: 600; margin-bottom: 2px; }
.tl span { color: #a9a7a1; font-size: 14.5px; }

/* machine */
.machine {
  background: #0c0c10;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.machine .bar-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #101015;
}
.machine .bar-top i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f2f3a;
}
.machine .bar-top i:nth-child(1) { background: #ff5f56; }
.machine .bar-top i:nth-child(2) { background: #ffbd2e; }
.machine .bar-top i:nth-child(3) { background: #27c93f; }
.machine .bar-top span {
  margin-left: auto;
  font: 11px/1 var(--mono);
  color: #55555f;
  letter-spacing: 0.08em;
}
.machine .body { padding: 18px; }

.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1 1 180px;
  min-width: 0;
  background: #08080b;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 9px;
  padding: 12px 14px;
  font: 15px/1 var(--mono);
  outline: none;
}
.field input:focus { border-color: #b6ff3c66; box-shadow: 0 0 0 3px #b6ff3c14; }
.field button,
.btn {
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  font: 600 14px/1 var(--sans);
  background: var(--yuck);
  color: #10130a;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
}
.field button:hover, .btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.field button:active, .btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.out {
  margin-top: 16px;
  font: 14px/1.9 var(--mono);
  color: #d9d7d1;
  min-height: 92px;
  white-space: pre-wrap;
  word-break: break-word;
}
.out .k { color: var(--dim); }
.out .eq { color: var(--yuck); font-weight: 700; }
.out .bad { color: var(--gold); }
.out .qed { color: var(--hot); }

/* danmaku */
.danmaku {
  position: relative;
  height: 230px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #08080b;
  overflow: hidden;
  margin-bottom: 14px;
}
.danmaku b {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  font: 600 15px/1 var(--mono);
  text-shadow: 0 0 10px currentColor;
  animation: fly linear forwards;
  will-change: transform;
}
@keyframes fly {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 100%)); }
}

/* rules */
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rules li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 14.5px;
  color: #c3c1bb;
}
.rules li strong { color: var(--ink); font-weight: 600; }
.rules .ico { font-size: 17px; line-height: 1.35; flex: 0 0 auto; }

/* misc */
.counter {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.counter .n {
  font: 800 26px/1 var(--mono);
  color: var(--yuck);
  min-width: 3ch;
}

.quote {
  margin-top: 14px;
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 14px;
  color: #d9d7d1;
}
.quote b { font: 700 17px/1.5 var(--sans); display: block; }
.quote span { font-size: 13px; color: var(--dim); }

footer {
  margin-top: 40px;
  padding: 30px 0 60px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}
footer .cols {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 20px;
}
footer h4 {
  margin: 0 0 8px;
  font: 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yuck);
}
footer ul { margin: 0; padding-left: 16px; }
footer li { margin-bottom: 5px; }
footer .fine { font-size: 11.5px; color: #55555f; line-height: 1.8; }

.float {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  font: 800 20px/1 var(--mono);
  color: var(--yuck);
  animation: up 1.1s ease-out forwards;
}
@keyframes up {
  to { transform: translateY(-90px) rotate(9deg); opacity: 0; }
}

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