* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #1e2a3a;
  color: #f5f7fa;
}

.game {
  width: min(92vw, 520px);
  text-align: center;
}

h1 {
  margin: 0 0 16px;
  font-size: 1.8rem;
}

h2 {
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
  line-height: 1.5;
}

.muted {
  color: #aab6c8;
  font-size: 0.95rem;
}

.panel {
  padding: 20px;
  border-radius: 10px;
  background: #2b3d55;
}

.panel[hidden] {
  display: none;
}

button {
  font: inherit;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  background: #4f8cff;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: #3a78f0;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}

.flash {
  min-height: 140px;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 700;
  word-break: break-word;
}

.progress {
  height: 6px;
  margin-top: 16px;
  border-radius: 3px;
  background: #1e2a3a;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: #4f8cff;
}

form {
  display: flex;
  gap: 8px;
}

input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px 12px;
  border: 2px solid #3d5275;
  border-radius: 6px;
  background: #1e2a3a;
  color: #f5f7fa;
}

.feedback {
  min-height: 1.5em;
  margin: 12px 0 0;
}

.correct {
  color: #7ee2a0;
}

.wrong {
  color: #ff8c8c;
}

.results-list {
  max-height: 50vh;
  overflow-y: auto;
  margin: 0 0 14px;
  padding: 0 0 0 8px;
  text-align: left;
  list-style-position: inside;
}

.results-list li {
  padding: 3px 0;
}

.results-list .typed {
  color: #aab6c8;
}
