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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1210;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

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

#gl {
  position: absolute;
  display: none;
  background: #f3b26b;
  z-index: 1;
}
#game {
  position: absolute;
  display: block;
  background: transparent;
  image-rendering: auto;
  cursor: crosshair;
  z-index: 2;
}

/* ---- Debug / tuning panel ---- */
#debug-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 260px;
  background: rgba(20, 14, 10, 0.92);
  border: 2px solid #c9a24b;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  z-index: 20;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
#debug-panel.hidden { display: none; }
.dbg-title {
  font-weight: bold;
  color: #f4d58d;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
#dbg-close { cursor: pointer; color: #e07a5f; }
.dbg-row { margin: 7px 0; }
.dbg-row label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  color: #ddd;
}
.dbg-row label b { color: #f4d58d; font-variant-numeric: tabular-nums; }
.dbg-row input[type=range] { width: 100%; }
.dbg-hint { margin-top: 10px; color: #9a8; font-size: 11px; text-align: center; }
.dbg-hint b { color: #f4d58d; }

#tap-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 20;
  pointer-events: none;
}
#tap-hint.hidden { display: none; }

/* ---- Mobile: nudge the player into landscape ---- */
#rotate-hint { display: none; }
@media (max-aspect-ratio: 1/1) and (pointer: coarse) {
  #rotate-hint {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #1a1210;
    color: #f4d58d;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.6;
    padding: 30px;
  }
}
