* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, sans-serif;
  background: #111827;
  color: #f3f4f6;
  text-align: center;
}

:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.hud {
  width: 100%;
  padding: 0.75rem;
  background: #030712;
}

.hud h1 {
  margin: 0;
  font-size: 1.25rem;
}

.hud__score {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.pads {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 120px));
  grid-template-rows: repeat(2, minmax(96px, 120px));
  gap: 10px;
}

.pad {
  border: 0;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.55;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.pad--green { background: #16a34a; }
.pad--red { background: #dc2626; }
.pad--yellow { background: #ca8a04; }
.pad--blue { background: #2563eb; }

.pad.lit {
  opacity: 1;
  transform: scale(1.04);
}

.pad:disabled {
  cursor: default;
}

.status {
  min-height: 1.5rem;
  margin: 0;
  max-width: 300px;
  font-weight: 600;
}

.button {
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: #111827;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.button:hover:not(:disabled) {
  background: #fff;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  margin: 0;
  color: #9ca3af;
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .pad {
    transition: none;
  }

  .pad.lit {
    transform: none;
  }
}
