/* ===== リセット ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== ベース ===== */
body {
  background: #000;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Canvas レターボックス ===== */
#gameCanvas {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

/* ===== バーチャルパッド（タッチデバイスのみ） ===== */
#virtualPad {
  display: none;
  width: 100%;
  max-width: 600px;
  padding: 10px 20px;
  justify-content: space-between;
  align-items: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* タッチデバイスで表示 */
@media (pointer: coarse) {
  #virtualPad {
    display: flex;
  }
  body {
    flex-direction: column;
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }
}

.vpad-left, .vpad-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vpad-btn {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(80, 180, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 20, 60, 0.7);
  color: rgba(180, 220, 255, 0.9);
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
}

.vpad-btn:active {
  background: rgba(40, 100, 200, 0.8);
  border-color: rgba(120, 200, 255, 0.9);
}

.vpad-action {
  background: rgba(40, 10, 60, 0.7);
  border-color: rgba(200, 100, 255, 0.6);
}

.vpad-action:active {
  background: rgba(120, 40, 180, 0.8);
  border-color: rgba(220, 150, 255, 0.9);
}
