* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: #000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#assets {
  display: none;
}

/* The canvas is sized from JS to fit the stage at 16:9 without stretching */
#stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#canvas {
  display: block;
  touch-action: none; /* dragging on the game must not scroll or zoom the page */
}

/* ---------- Start menu ---------- */
#menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #000 url('assets/lavaBG.jpg') center / cover no-repeat;
}

#menu[hidden] {
  display: none;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.easy, .medium, .hard {
  min-width: 140px;
  min-height: 48px; /* comfortable size for small fingers */
  padding: 0 20px;
  background-color: grey;
  color: white;
  border: 2px solid #333;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
}

.easy:hover, .medium:hover, .hard:hover,
.easy:focus-visible, .medium:focus-visible, .hard:focus-visible {
  background-color: #666;
}

/* ---------- Portrait hint on phones/tablets ---------- */
#rotate-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font: 600 14px/1.3 system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
}

@media (pointer: coarse) and (orientation: portrait) {
  #rotate-hint {
    display: block;
  }
}
