:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: radial-gradient(circle at 50% 0%, #1e293b, #0b1220 70%);
  color: #e2e8f0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
}

.hud {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  font-weight: 600;
}

.hud strong {
  font-size: 20px;
  color: #93c5fd;
  margin-left: 4px;
}

.board {
  width: min(92vw, 58vh, 460px);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 0 0 2px #1e293b;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.status {
  min-height: 20px;
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  text-align: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

button {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 10px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}

button:hover {
  background: var(--blue-dark);
}

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

button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

button:disabled {
  background: #334155;
  color: #94a3b8;
  cursor: not-allowed;
}
