* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; overflow: hidden; touch-action: none; }
canvas { display: block; width: 100vw; height: 100vh; touch-action: none; }
#hint {
  position: fixed; bottom: 4px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.3); font: 10px monospace;
  letter-spacing: 1px; pointer-events: none; white-space: nowrap;
}

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

@media (hover: hover) and (pointer: fine) {
  #hint { display: block; }
}
@media (hover: none), (pointer: coarse) {
  body.game-on #touch-controls { display: block; }
  #hint { display: none; }
}

.touch-btn {
  position: absolute;
  pointer-events: all;
  touch-action: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2.5px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.7);
  font-family: sans-serif;
  font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.07s;
}

/* PlayStation button colours */
.btn-circle { color: #ff6b6b; border-color: #ff6b6b; background: rgba(255,107,107,0.10); }
.btn-square { color: #e878d8; border-color: #e878d8; background: rgba(232,120,216,0.10); }
.btn-cross  { color: #6baae8; border-color: #6baae8; background: rgba(107,170,232,0.10); }
.btn-circle.active { background: rgba(255,107,107,0.38); }
.btn-square.active { background: rgba(232,120,216,0.38); }
.btn-cross.active  { background: rgba(107,170,232,0.38); }

/* Left-side: virtual joystick */
#joystick-base {
  position: absolute;
  bottom: 3vmin; left: 3vmin;
  width: 26vmin; height: 26vmin;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.14);
  pointer-events: all;
  touch-action: none;
}
#joystick-thumb {
  position: absolute;
  top: 50%; left: 50%;
  width: 11vmin; height: 11vmin;
  margin-top: -5.5vmin; margin-left: -5.5vmin;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  border: 2px solid rgba(255,255,255,0.45);
  pointer-events: none;
}

/* Right-side: partial-diamond layout
       [□]
   [✕]    [○]  */
#btn-jump   { width: 16vmin; height: 16vmin; font-size: 7.5vmin; bottom: 4vmin;  right: 3vmin;   }
#btn-attack { width: 13vmin; height: 13vmin; font-size: 6vmin;   bottom: 22vmin; right: 4.5vmin; }
#btn-block  { width: 13vmin; height: 13vmin; font-size: 6vmin;   bottom: 4vmin;  right: 21vmin;  }

/* Top-right: pause */
#btn-pause {
  width: 9vmin; height: 9vmin; font-size: 3.8vmin;
  top: 3vmin; right: 3vmin;
  border-radius: 8px;
}
