html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: #0f172a;
  color: #f8fafc;
  font-family: "Arial", sans-serif;
  position: relative;
}

#game {
  width: 100%;
  height: 100%;
  touch-action: none;
}

#hud {
  position: absolute;
  top: clamp(16px, 4vw, 32px);
  left: clamp(16px, 4vw, 32px);
  right: clamp(16px, 4vw, 32px);
  display: flex;
  justify-content: space-between;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: bold;
  pointer-events: none;
}

#game-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.85);
  text-align: center;
}

#game-over-title,
#game-over-detail {
  padding: 0;
  margin: 0;
}

#game-over.hidden {
  display: none;
}

#restart {
  padding: 10px 18px;
  font-size: 18px;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  width: min(220px, 80%);
}

#restart:hover {
  background: #0ea5e9;
}

@media (max-width: 768px) {
  body {
    justify-content: flex-start;
  }

  #game-over {
    gap: 20px;
  }

  #restart {
    font-size: 16px;
    padding: 10px 16px;
  }
}
