* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Hiragino Maru Gothic Pro', 'Rounded Mplus 1c', sans-serif;
  overflow: hidden;
}

#game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 800px;
}

#gameCanvas {
  display: block;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 0 40px rgba(75, 184, 240, 0.4);
  width: 100%;
  max-width: 800px;
  height: auto;
}

/* タッチコントロール */
#touch-controls {
  display: none; /* デフォルト非表示、タッチデバイスで表示 */
  width: 100%;
  max-width: 800px;
  background: #0D1B2A;
  border-radius: 0 0 12px 12px;
  padding: 10px 8px 16px;
  gap: 8px;
  justify-content: space-between;
  border-top: 2px solid rgba(75, 184, 240, 0.3);
}

#touch-p1, #touch-p2 {
  display: flex;
  gap: 8px;
  flex: 1;
}

#touch-p1 { justify-content: flex-start; }
#touch-p2 { justify-content: flex-end; }

.touch-btn {
  flex: 1;
  max-width: 130px;
  height: 80px;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s, opacity 0.08s;
  -webkit-appearance: none;
}

.touch-btn:active {
  transform: scale(0.92);
  opacity: 0.8;
}

.charge-btn {
  background: linear-gradient(145deg, #4DC940, #2A7A1E);
  color: white;
  box-shadow: 0 4px 12px rgba(77, 201, 64, 0.4);
}

#touch-p2 .charge-btn {
  background: linear-gradient(145deg, #FF8000, #CC5500);
  box-shadow: 0 4px 12px rgba(255, 128, 0, 0.4);
}

.fire-btn {
  background: linear-gradient(145deg, #FF4444, #CC1111);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

/* タッチデバイスのみ表示 */
@media (hover: none) and (pointer: coarse) {
  #touch-controls {
    display: flex;
  }
  #gameCanvas {
    border-radius: 12px 12px 0 0;
  }
}
