body {
  margin: 0;
  background: #0b0e14;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: #f8fafc;
  text-align: center;
}

#game-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 8px 24px;
}

h1 {
  font-size: 26px;
  margin: 4px 0 8px;
  letter-spacing: 1px;
}

#hud {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 15px;
  flex-wrap: wrap;
}

#hud span {
  background: #1c2433;
  border-radius: 6px;
  padding: 5px 8px;
  flex: 1 1 auto;
  white-space: nowrap;
}

canvas#game {
  display: block;
  width: 100%;
  height: auto;
  background: #141a26;
  border-radius: 10px;
  touch-action: none;
  cursor: crosshair;
}

#help {
  font-size: 13px;
  color: #94a3b8;
  margin: 8px 0 0;
  line-height: 1.4;
}

#gameover {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.82);
  border: 2px solid #ef4444;
  border-radius: 12px;
  padding: 28px 16px;
  z-index: 10;
}

#gameover h2 {
  margin: 0 0 10px;
  font-size: 32px;
  color: #ef4444;
  letter-spacing: 2px;
}

#gameover p {
  font-size: 18px;
  margin: 6px 0;
}

#restart {
  margin-top: 14px;
  font-size: 18px;
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #ffffff;
  cursor: pointer;
}

#restart:hover {
  background: #2563eb;
}

#restart:active {
  background: #1d4ed8;
}

.hidden {
  display: none;
}

@media (max-width: 400px) {
  h1 {
    font-size: 22px;
  }
  #hud {
    font-size: 13px;
  }
  #gameover h2 {
    font-size: 26px;
  }
}
