:root {
  color-scheme: light dark;
  --bg: #111827;
  --panel: #1f2937;
  --text: #f9fafb;
  --accent: #22c55e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #1f2937, #0b1020 65%);
  color: var(--text);
  padding: 16px;
}

.game-wrap {
  width: min(94vw, 460px);
  background: color-mix(in oklab, var(--panel) 88%, black);
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
}

#restartBtn {
  background: #2563eb;
  color: #fff;
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0b1220;
  border-radius: 10px;
  border: 1px solid #374151;
}

.status {
  min-height: 24px;
  margin: 10px 0 8px;
  color: #d1d5db;
  font-size: 14px;
}

.controls {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 6px;
}

.controls-middle {
  display: flex;
  gap: 8px;
}

.controls button {
  min-width: 64px;
  min-height: 44px;
  background: #374151;
  color: #fff;
  font-size: 20px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.controls button:active {
  transform: scale(0.97);
  background: #4b5563;
}
