/* ============================================================================
   button-test.css — a friendly personality quiz that slowly reveals it is
   profiling you. Soft + light early; sharper, cooler and more diagnostic late.
   ============================================================================ */

#game-wrap { background: radial-gradient(circle at 50% 16%, #1b2233, #0a0c10 66%); transition: background 1s ease; }
.bt-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 10px; }

/* ── THE CARD ──────────────────────────────────────────────────────────────── */
.bt-card {
  position: relative; width: min(430px, 100%); max-height: 100%; overflow-y: auto;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #f4f6fb);
  color: #1b2030; font-family: 'Inter', 'Barlow', sans-serif;
  border: 1px solid #dfe3ec; border-radius: 16px;
  box-shadow: 0 14px 50px rgba(0,0,0,.55);
  padding: 20px 18px 18px;
  user-select: none; -webkit-user-select: none;
  transition: background 1s ease, color 1s ease, border-color 1s ease, box-shadow 1s ease;
}
/* phase tints: the quiz cools as it learns you */
.bt-card.p2 { background: linear-gradient(180deg, #f4f6fb, #eceff6); }
.bt-card.p3 { background: linear-gradient(180deg, #e7eaf3, #dfe3ee); }
.bt-card.p4 { background: linear-gradient(180deg, #1b2030, #161b28); color: #e9ecf4; border-color: #2a3142; }
.bt-card.p5 { background: linear-gradient(180deg, #14171f, #0e1117); color: #e9ecf4; border-color: #242a38; box-shadow: 0 14px 60px rgba(0,0,0,.7); }
.bt-card.p4 .bt-prompt, .bt-card.p5 .bt-prompt { color: #f1f3f8; }

/* ── HUD ───────────────────────────────────────────────────────────────────── */
.bt-hud { display: none; gap: 12px; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(120,130,150,.2); }
.bt-hud.show { display: flex; }
.bt-meter { display: flex; flex-direction: column; gap: 1px; flex: 1; text-align: center; }
.bt-meter span { font-size: 8px; letter-spacing: .6px; text-transform: uppercase; color: #8a93a6; }
.bt-meter b { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: inherit; }
.bt-card.p4 .bt-meter span, .bt-card.p5 .bt-meter span { color: #7c869b; }

/* ── PROGRESS / PROMPT ─────────────────────────────────────────────────────── */
.bt-progress { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .4px; color: #9aa3b5; margin-bottom: 8px; }
.bt-prompt { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 19px; line-height: 1.3; color: #1b2030; margin-bottom: 6px; transition: color 1s ease; }
.bt-fine { font-size: 11px; line-height: 1.45; color: #8a93a6; margin-bottom: 12px; max-height: 120px; overflow-y: auto; }
.bt-fine:empty { display: none; margin: 0; }

/* ── BUTTONS — chunky, physical, satisfying to press ───────────────────────── */
.bt-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 18px; }
.bt-buttons.solo { grid-template-columns: 1fr; }
/* a lone trailing option spans the row so the panel never looks ragged */
.bt-buttons .bt-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bt-btn {
  --b-top: #6aa0ff; --b-bot: #2f6fe0; --b-edge: #1f4fa8; --b-ink: #fff;
  position: relative; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 16px;
  padding: 17px 16px; border-radius: 16px; text-align: center; border: none; cursor: pointer;
  color: var(--b-ink); line-height: 1.2;
  background: linear-gradient(180deg, var(--b-top), var(--b-bot));
  box-shadow: 0 7px 0 var(--b-edge), 0 10px 16px rgba(0,0,0,.40), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 6px rgba(0,0,0,.18);
  text-shadow: 0 1px 1px rgba(0,0,0,.28);
  transform: translateY(0); transition: transform .07s ease, box-shadow .07s ease, filter .15s ease;
}
/* glossy top highlight */
.bt-btn::before { content: ''; position: absolute; left: 9px; right: 9px; top: 7px; height: 34%; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0)); pointer-events: none; }
.bt-btn:hover { filter: brightness(1.06) saturate(1.05); transform: translateY(-2px); }
/* the press — the button actually travels down onto its base */
.bt-btn:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--b-edge), 0 2px 5px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.3), inset 0 -2px 5px rgba(0,0,0,.2); }
/* colour caps */
.bt-c0 { --b-top:#6aa0ff; --b-bot:#2f6fe0; --b-edge:#1f4fa8; }
.bt-c1 { --b-top:#ff7a7a; --b-bot:#e5384d; --b-edge:#a51f30; }
.bt-c2 { --b-top:#5fe39a; --b-bot:#1fae62; --b-edge:#147a44; }
.bt-c3 { --b-top:#ffd36a; --b-bot:#f0a81f; --b-edge:#b4720f; --b-ink:#3a2600; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.bt-c4 { --b-top:#c49bff; --b-bot:#8a4ff0; --b-edge:#5e2fa8; }
.bt-c5 { --b-top:#5fd9e3; --b-bot:#1fa8b8; --b-edge:#137680; }
/* forbidden always reads danger */
.bt-btn.forbidden { --b-top:#ff5a5a; --b-bot:#d11f30; --b-edge:#8a1422; --b-ink:#fff; }
/* the test's prediction — a halo that survives the press */
.bt-btn.predicted { outline: 3px solid rgba(107,138,253,.7); outline-offset: 4px; animation: bt-pred 1.3s ease-in-out infinite; }
@keyframes bt-pred { 0%,100% { outline-color: rgba(107,138,253,.32); } 50% { outline-color: rgba(107,138,253,.95); } }
/* the generated / final hero button */
.bt-btn.big { grid-column: 1 / -1; font-size: 19px; padding: 22px 20px; border-radius: 18px; }
/* chaos wiggler */
.bt-btn.wiggle { animation: bt-wiggle 1s ease-in-out infinite; }
@keyframes bt-wiggle { 0%,100% { transform: translateY(0) rotate(-1.6deg); } 50% { transform: translateY(0) rotate(1.6deg); } }
.bt-btn.wiggle:active { animation: none; }
/* the tiny hidden option (kept sneaky, deliberately not a real button) */
.bt-hidden { grid-column: 1 / -1; display: block; margin: 6px auto 0; font-size: 10px; color: #aab2c2; background: none; border: none; box-shadow: none; text-decoration: underline; cursor: pointer; }
.bt-card.p4 .bt-hidden, .bt-card.p5 .bt-hidden { color: #6a7280; }

/* ── JUDGE LINE ────────────────────────────────────────────────────────────── */
.bt-judge { min-height: 18px; margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-style: italic; color: #8a93a6; text-align: center; transition: opacity .2s; }
.bt-judge.flash { animation: bt-flash .3s ease; }
@keyframes bt-flash { from { opacity: .2; } to { opacity: 1; } }

/* ── GENERATING SEQUENCE ───────────────────────────────────────────────────── */
.bt-gen { text-align: center; padding: 30px 10px; }
.bt-gen-line { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #9aa3b5; min-height: 20px; }
.bt-card.p5 .bt-gen-line { color: #8a93a6; }
.bt-gen-spin { width: 34px; height: 34px; margin: 0 auto 16px; border: 3px solid rgba(120,130,150,.25); border-top-color: #6b8afd; border-radius: 50%; animation: bt-spin 1s linear infinite; }
@keyframes bt-spin { to { transform: rotate(360deg); } }

/* ── RESULT CARD (game over) ───────────────────────────────────────────────── */
.bt-result-label { font-family: var(--ff); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--mu); text-align: center; margin-bottom: 4px; }
#overlay-gameover .go-score { font-family: var(--fc); font-weight: 700; font-size: 26px; color: var(--am); line-height: 1.1; }
#overlay-gameover .go-score span { color: var(--am); font-family: var(--fc); }

/* ── CIRCULAR (real-life) BUTTONS ──────────────────────────────────────────── */
.bt-buttons.circles { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; margin-top: 22px; }
.bt-btn.round {
  width: clamp(82px, 25vw, 108px); height: clamp(82px, 25vw, 108px);
  border-radius: 50%; padding: 0; font-size: 22px; flex: 0 0 auto;
  box-shadow: 0 8px 0 var(--b-edge), 0 12px 18px rgba(0,0,0,.42), inset 0 3px 0 rgba(255,255,255,.5), inset 0 -4px 8px rgba(0,0,0,.2);
}
.bt-btn.round::before { left: 16%; right: 16%; top: 12%; height: 30%; border-radius: 50%; }
.bt-btn.round:active { transform: translateY(7px); box-shadow: 0 1px 0 var(--b-edge), 0 3px 6px rgba(0,0,0,.35), inset 0 3px 0 rgba(255,255,255,.35), inset 0 -3px 6px rgba(0,0,0,.22); }
.bt-btn.round:hover { transform: translateY(-2px); }
.bt-btn.round:last-child:nth-child(odd) { grid-column: auto; } /* override stacked-grid rule */

/* ── REC INDICATOR (the card is watching) ──────────────────────────────────── */
.bt-rec { position: absolute; top: 12px; right: 14px; z-index: 4; display: none; align-items: center; gap: 5px; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: #e5384d; }
.bt-card.p2 .bt-rec, .bt-card.p3 .bt-rec, .bt-card.p4 .bt-rec, .bt-card.p5 .bt-rec { display: flex; }
.bt-rec::before { content: '●'; font-size: 10px; animation: bt-blink 1.4s steps(2) infinite; }
@keyframes bt-blink { 50% { opacity: .15; } }

/* ── PROMPT FADE-IN per round ──────────────────────────────────────────────── */
@keyframes bt-fadein { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ── CONFETTI on the final click ───────────────────────────────────────────── */
.bt-conf { position: absolute; width: 9px; height: 9px; border-radius: 2px; z-index: 30; pointer-events: none; animation: bt-conf 1s ease-out forwards; }
@keyframes bt-conf { to { transform: translate(var(--dx), var(--dy)) rotate(440deg); opacity: 0; } }
