:root {
  color-scheme: light;
  font-family: ui-rounded, "Nunito", "Comic Sans MS", system-ui, sans-serif;
  --bg1: #fff7ed;
  --bg2: #dbeafe;
  --ink: #1f2937;
  --muted: #64748b;
  --orange: #f97316;
  --orange-dark: #c2410c;
  --green: #22c55e;
  --red: #ef4444;
  --card: rgba(255,255,255,.88);
  --shadow: 0 24px 70px rgba(30, 41, 59, .18);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fde68a 0 22%, transparent 42%),
    radial-gradient(circle at bottom right, #bfdbfe 0 24%, transparent 45%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  display: grid;
  place-items: center;
  padding: 18px;
}
.app { width: min(720px, 100%); }
.card {
  background: var(--card);
  border: 3px solid rgba(255,255,255,.75);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 6vw, 42px);
  text-align: center;
  backdrop-filter: blur(12px);
}
.hidden { display: none !important; }
.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-weight: 800;
}
h1 { font-size: clamp(42px, 11vw, 76px); margin: 12px 0 6px; line-height: .95; }
h2 { font-size: clamp(32px, 8vw, 52px); margin: 12px 0; }
p { font-size: clamp(18px, 4vw, 22px); color: var(--muted); }
.settings { display: grid; gap: 14px; margin: 28px auto; max-width: 420px; text-align: left; }
label { font-weight: 800; color: #334155; }
input, select {
  width: 100%;
  margin-top: 7px;
  border: 3px solid #fed7aa;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  font-size: 20px;
  background: white;
  outline: none;
}
input:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 5px #ffedd5; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
button {
  border: 0;
  border-radius: 18px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 900;
  font-size: 19px;
  cursor: pointer;
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
button:active { transform: translateY(2px); }
.primary { background: var(--orange); color: white; box-shadow: 0 8px 0 var(--orange-dark); }
.primary:hover { background: #fb923c; }
.ghost { background: #e2e8f0; color: #334155; box-shadow: 0 8px 0 #94a3b8; }
.tiny { font-size: 14px; margin-bottom: 0; }
.topbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.topbar > div {
  background: #f8fafc;
  border-radius: 20px;
  padding: 12px;
}
.label { display: block; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.topbar strong { font-size: 28px; }
.monster { font-size: clamp(38px, 11vw, 68px); filter: drop-shadow(0 8px 0 rgba(15,23,42,.06)); }
.hint { min-height: 30px; margin: 0 0 8px; }
.question { font-size: clamp(52px, 15vw, 96px); font-weight: 1000; line-height: 1; margin: 18px 0 26px; }
#answerForm { display: flex; justify-content: center; gap: 12px; }
#answer { max-width: 170px; text-align: center; font-size: 42px; font-weight: 1000; }
.feedback {
  min-height: 72px;
  margin: 22px 0 14px;
  padding: 16px 18px;
  border-radius: 24px;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.15;
  font-weight: 1000;
}
.feedback.good { color: #15803d; background: #dcfce7; }
.feedback.bad { color: #b91c1c; background: #fee2e2; }
.next { margin: 0 auto 18px; }
.progress { height: 18px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
#progressBar { height: 100%; width: 0%; background: linear-gradient(90deg, #bbf7d0, #22c55e, #15803d); border-radius: inherit; transition: width .25s ease; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 22px 0; }
.stat { background: #f8fafc; border-radius: 20px; padding: 16px; }
.stat strong { display: block; font-size: 30px; }
@media (max-width: 520px) {
  .topbar { grid-template-columns: 1fr; }
  #answerForm { align-items: stretch; }
}
