/* ============================================================
   MEGA OBBY ADVENTURE - page styling
   ============================================================ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #10102a;
  background-image:
    radial-gradient(circle at 20% 20%, #26265c 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, #4a1d5c 0%, transparent 55%);
  font-family: Verdana, "Trebuchet MS", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
}

#game-shell {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game canvas {
  display: block;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  image-rendering: auto;
}

/* ---------------- touch controls ---------------- */
#touch-controls {
  position: fixed;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 10;
}

#touch-controls.visible { display: block; }

.touch-side {
  position: absolute;
  bottom: 14px;
  display: flex;
  gap: 14px;
  pointer-events: none;
}

.touch-left { left: 16px; }
.touch-right { right: 16px; }

.tbtn {
  pointer-events: auto;
  width: 84px;
  height: 84px;
  border: none;
  border-radius: 50%;
  font-family: inherit;
  font-size: 30px;
  font-weight: bold;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(3px);
  transition: transform 0.06s ease, background 0.06s ease;
  touch-action: none;
}

.tbtn:active,
.tbtn.pressed {
  transform: translateY(4px);
  background: rgba(255, 255, 255, 0.45);
}

.tbtn-jump {
  font-size: 20px;
  background: rgba(255, 214, 82, 0.35);
  border-color: rgba(255, 236, 150, 0.8);
  color: #4a2b00;
}

/* ---------------- error message ----------------
   Hidden until the game adds the "show" class, so it can never
   sit on top of the game and steal your clicks. */
#load-error {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffd6d6;
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
  padding: 24px;
  z-index: 50;
}

#load-error.show {
  display: flex;
}
