*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #11141a;
  color: #e7e9ee;
  line-height: 1.55;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 720px;
  padding: 2.5rem 1.25rem 4rem;
}

.screen {
  text-align: center;
}

h1 {
  font-weight: 300;
  letter-spacing: 0.04em;
}

.lead {
  font-size: 1.1rem;
  color: #c5cad4;
}

.footnote {
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

a { color: #6ab0ff; }

.instructions {
  max-width: 460px;
  margin: 1.5rem auto;
  text-align: left;
}

.instructions p { margin: 0.85rem 0; }

input[type="text"] {
  font-size: 1.05rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  background: #1b1f28;
  color: inherit;
  width: min(320px, 100%);
}

button {
  font: inherit;
  font-size: 1rem;
  margin-top: 1rem;
  padding: 0.65rem 1.6rem;
  border: none;
  border-radius: 8px;
  background: #3a78d8;
  color: #fff;
  cursor: pointer;
}

button:hover { background: #4a87e6; }

#code-form { margin-top: 1.5rem; }

.error { color: #ff8a8a; }

/* ---- test screen ---- */

.card-row {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.card {
  width: 116px;
  height: 152px;
  background: #f4f5f7;
  border-radius: 10px;
  border: 3px solid transparent;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: #6ab0ff; }
.card.disabled { pointer-events: none; opacity: 0.85; }

.card svg {
  width: 34px;
  height: 34px;
  display: block;
}

.response-slot {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 0.25rem;
}

.response-slot .card {
  cursor: default;
  width: 130px;
  height: 170px;
}

.feedback {
  height: 2.2rem;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 1.4rem 0 0.6rem;
}

.feedback.correct { color: #5fd38d; }
.feedback.incorrect { color: #ff8a8a; }

.hint {
  color: #8b93a3;
  font-size: 0.9rem;
}

.progress {
  margin-top: 1.5rem;
  color: #5b6371;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
