html,
    body {
      margin: 0;
      padding: 0;
      height: 100%;
      background: #0b0f14;
      overflow: hidden;
    }

    canvas {
      display: block;
      width: 100vw;
      height: 100vh;
    }

    .hud {
      position: fixed;
      left: 12px;
      top: 12px;
      z-index: 10;
      font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      color: #d6e2f2;
      user-select: none;
      background: rgba(0, 0, 0, .35);
      padding: 10px 12px;
      border-radius: 12px;
      backdrop-filter: blur(6px);
    }

    .hud b {
      color: #ffffff;
    }

    .hud .dim {
      opacity: .8;
    }

    .centerMsg {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9;
      pointer-events: none;
      color: #eaf2ff;
      font: 700 28px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      text-shadow: 0 8px 22px rgba(0, 0, 0, .65);
    }

    .centerMsg small {
      display: block;
      font: 500 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      opacity: .85;
      margin-top: 10px;
      text-align: center;
    }

    /* Mobile joystick hint */
    .joyHint {
      position: fixed;
      right: 12px;
      top: 12px;
      z-index: 10;
      font: 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      color: #d6e2f2;
      user-select: none;
      background: rgba(0, 0, 0, .35);
      padding: 8px 10px;
      border-radius: 12px;
      backdrop-filter: blur(6px);
      display: none;
    }
	
	#restartBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 20;

  padding: 12px 18px;
  font-size: 16px;
  font-weight: bold;

  color: white;
  background: rgba(255, 60, 60, 0.85);
  border: none;
  border-radius: 12px;

  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

#restartBtn:active {
  transform: scale(0.95);
}


    @media (pointer: coarse) {
      .joyHint {
        display: block;
      }
    }