/* Find out if you're an idiot — mobile first, one job, tiny payload. */

:root {
  --bg: #0a0a0a;
  --ink: #f2f2f2;
  --muted: #8a8a8a;
  --dim: #5c5c5c;
  --red: #d81f26;
  --red-hot: #ff2d36;
  --line: #1f1f1f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100svh; display: flex; flex-direction: column; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.stage {
  flex: 1;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.screen[hidden] { display: none; }

.screen { animation: fade .25s ease-out; }

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- intro ---------- */

.title {
  margin: 0 0 0.9rem;
  font-size: clamp(2.1rem, 10vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.sub { margin: 0 0 2rem; color: var(--muted); font-size: 1rem; }

.from {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--ink);
  background: #16100f;
  border: 1px solid #3a2320;
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.from[hidden] { display: none; }

.micro { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--dim); }

/* ---------- buttons ---------- */

.btn-red {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  font-family: inherit;
  padding: 1.25rem 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s, transform .08s;
}

.btn-red:hover { background: var(--red-hot); }
.btn-red:active { transform: scale(0.985); }
.btn-red:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  background: none;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  color: #cfcfcf;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.85rem;
  cursor: pointer;
}

.btn-ghost:hover { color: var(--ink); border-color: #555; }
.btn-ghost.small { margin-top: 0.6rem; font-size: 0.85rem; padding: 0.7rem; }

.btn-copy {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0.6rem;
  cursor: pointer;
}

.btn-copy:hover { color: var(--ink); }

/* ---------- analysing ---------- */

.analysing-h { margin: 0 0 1.5rem; font-size: 1.3rem; font-weight: 700; }

.steps { list-style: none; margin: 0 0 1.75rem; padding: 0; text-align: left; }

.steps li {
  font-size: 0.9rem;
  color: #3a3a3a;
  padding: 0.4rem 0;
  transition: color .2s;
}

.steps li.done { color: var(--muted); }
.steps li.done::before { content: "✓ "; color: #4ba35a; }
.steps li.now { color: var(--ink); }
.steps li.now::before { content: "› "; color: var(--red); }
.steps li.todo::before { content: "· "; }

.bar { background: var(--line); border-radius: 4px; height: 6px; overflow: hidden; }

.bar-fill {
  background: var(--red);
  height: 6px;
  width: 0;
  border-radius: 4px;
  transition: width .3s linear;
}

/* ---------- verdict ---------- */

.verdict-h {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.custom {
  background: #16100f;
  border: 1px solid #3a2320;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.custom[hidden] { display: none; }
.custom-from { margin: 0 0 0.4rem; font-size: 0.8rem; color: var(--muted); }
.custom-msg { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink); }

.line {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #cfcfcf;
  min-height: 3.4em;
}

.counter { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.counter-label { margin: 0; font-size: 0.85rem; color: var(--muted); }
.counter-num {
  margin: 0.2rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

/* ---------- revenge ---------- */

.revenge-h {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 7vw, 2rem);
  line-height: 1.15;
  font-weight: 800;
}

#myName, #myLine {
  width: 100%;
  background: #0c0c0c;
  border: 1px solid #2f2f2f;
  border-radius: 11px;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  padding: 0.85rem 1rem;
  text-align: center;
  margin-bottom: 0.6rem;
}

#myLine { text-align: left; resize: vertical; }
#myName::placeholder, #myLine::placeholder { color: #4a4a4a; }
#myName:focus, #myLine:focus { outline: none; border-color: var(--red); }

.own[hidden] { display: none; }

#shareBtn { margin-top: 0.9rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--dim);
}

.lang {
  background: none;
  border: 1px solid #2f2f2f;
  border-radius: 6px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.lang:hover { color: var(--ink); }
.copyright { margin: 0; }

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