/* Background and canvas */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: url("bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* HUD (non-blocking for clicks) */
#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 16px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
  max-width: 60vw;
  pointer-events: none; /* allow clicks to pass through to canvas */
}
#hud > div {
  margin-bottom: 6px;
}
#controls {
  font-size: 12px;
  opacity: 0.85;
}

/* End menu (clickable) */
#endMenu {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 20px 24px;
  text-align: center;
  border-radius: 10px;
  min-width: 280px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  z-index: 10;
  pointer-events: auto;
}
#endMenu h2 {
  margin: 0 0 8px 0;
}
#endMenu p {
  margin: 0 0 16px 0;
  font-size: 14px;
  opacity: 0.85;
}
#endMenu .buttons button {
  margin: 8px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  color: #111;
  background: #90caf9;
}
#endMenu .buttons button:hover {
  filter: brightness(1.1);
}

/* Interlude screen (non-blocking, repositioned so it doesn't cover slips) */
#interlude {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 25, 0.85);
  padding: 12px 18px;
  border-radius: 8px;
  z-index: 9;
  pointer-events: none; /* do not block canvas clicks */
}
#interludeText {
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 18px;
  text-align: center;
  line-height: 1.4;
  white-space: pre-line;
}

.hidden {
  display: none;
}