/* Wrap so overlay can sit on top of canvas */
#gameWrap {
  position: relative;
  display: inline-block;
}

/* Blur only the canvas when paused */
#gameWrap.paused canvas {
  filter: blur(6px);
}

/* Overlay is transparent; it just holds the pause panel */
#pauseOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none; /* clicks go through except panel */
}

#pauseOverlay.hidden {
  display: none;
}

/* The pause box */
#pausePanel {
  pointer-events: auto; /* buttons clickable */
  background: rgba(255, 255, 255, 0.92);
  padding: 22px 24px;
  border-radius: 14px;
  min-width: 260px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px); /* subtle frosted glass look on supported browsers */
}

#pausePanel .row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

#pausePanel button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

#pausePanel .hint {
  margin-top: 12px;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* Top-right buttons */
#game-ui {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 10px;
  z-index: 50;
}

#game-ui button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  
}
.gameBtn {
  position: absolute;
  top: 50px;
  right: calc((100vw - 640px) / 2 - 15px);

  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;

  border-radius: 8px;
  border: 2px solid #4caf50;

  background: #1a1a1a;
  color: #4caf50;

  cursor: pointer;
  z-index: 200;
}

#saveBtn {
  right: calc((100vw - 640px) / 2 + 70px);
}
#gameContainer {
  position: relative;
  display: inline-block;
}