/* Mobile-first layout. Sized for a phone screen; centered on larger viewports. */

* {
  box-sizing: border-box;
}

:root {
  --bg: #f7f7fa;
  --surface: #ffffff;
  --ink: #1c1c28;
  --accent: #3b5bdb;
  --correct: #2f9e44;
  --wrong: #e03131;
  --border: #d0d0d8;
  --radius: 12px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.hidden {
  display: none !important;
}

h1 {
  font-size: 1.6rem;
  text-align: center;
  margin: 0.5rem 0 0;
}

.subtitle {
  text-align: center;
  margin: 0;
  color: #6b6b76;
}

/* Buttons: large tap targets for mobile. */
button {
  font-size: 1.1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mode-btn {
  font-weight: 600;
}

.prompt {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

#staff {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Answer options: full-width, left-aligned cards — the question to act on. */
.choice {
  text-align: left;
  font-weight: 500;
  border-width: 2px;
}

.choice:hover:not(:disabled) {
  border-color: var(--accent);
}

/* Action row (Listen again / Next): a divided group below the options,
   styled as buttons rather than options to read as navigation. */
.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.actions button {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
}

#next-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

#replay-btn {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

/* Answer-feedback states, applied by game.js after a selection. */
.choice.correct {
  border-color: var(--correct);
  background: #ebfbee;
  color: var(--correct);
  font-weight: 700;
}

.choice.wrong {
  border-color: var(--wrong);
  background: #fff5f5;
  color: var(--wrong);
}

/* Extra cue when the player's own pick is correct: checkmark + brief pop. */
.choice.correct.picked::after {
  content: " ✓";
  font-weight: 700;
}

.choice.correct.picked {
  animation: pop 0.45s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

#back-btn {
  background: transparent;
  border: none;
  color: var(--accent);
}
