:root {
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #111;
  color: #e4e4e7;
  display: flex;
  justify-content: center;
}

main {
  max-width: 600px;
  width: 100%;
  padding: 1.5rem 1.25rem 3rem;
}

h1 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: #f4f4f5;
}

p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #a1a1aa;
  font-size: 0.95rem;
}

#controls {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  background: #18181b;
  border: 1px solid #27272a;
}

label {
  font-size: 0.95rem;
}

input[type="number"],
input[type="text"] {
  margin-left: 0.25rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.95rem;
  border-radius: 0.35rem;
  border: 1px solid #3f3f46;
  background-color: #09090b;
  color: #e4e4e7;
}

input[type="text"] {
  width: 8rem;
  text-transform: uppercase;
}

input:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 1px;
  border-color: #4f46e5;
}

.button-row {
  margin-top: 0.5rem;
}

button {
  margin: 0.4rem 0.4rem 0.4rem 0;
  padding: 0.35rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid #3f3f46;
  background: #27272a;
  color: #e4e4e7;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.05s ease, border-color 0.12s ease;
}

button:hover {
  background: #3f3f46;
  border-color: #52525b;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

#status {
  margin-top: 0.6rem;
  font-style: italic;
  color: #a1a1aa;
  min-height: 1.2em;
}

#input-area {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  background: #18181b;
  border: 1px solid #27272a;
  display: none; /* JS shows it after first playback */
}

#result {
  margin-top: 0.8rem;
  font-weight: 500;
  min-height: 1.2em;
}

.correct {
  color: #4ade80;
}

.wrong {
  color: #f97373;
}
