/* Touch controls styles */
#touch-controls {
  display: none; /* Hidden by default, shown only on touch devices */
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
  width: 180px;
  touch-action: none; /* Prevent default touch actions */
}

.middle-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 5px 0;
}

.touch-button {
  width: 60px;
  height: 60px;
  background-color: rgba(92, 184, 92, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: white;
  user-select: none;
  cursor: pointer;
  border: 2px solid rgba(76, 174, 76, 0.8);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.center-button {
  width: 40px;
  height: 40px;
}

.touch-active {
  background-color: rgba(76, 174, 76, 1);
  transform: scale(0.95);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

/* Make game responsive on mobile */
@media (max-width: 600px) {
  #game-canvas,
  #confetti-canvas {
    width: 100%;
    height: auto;
    max-width: 400px;
  }

  .game-container {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  h1 {
    font-size: 1.5rem;
    margin: 10px 0;
  }

  .control-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  #touch-controls {
    width: 150px;
  }

  .touch-button {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

/* Fix canvas sizing to maintain aspect ratio */
@media (orientation: portrait) {
  #game-canvas,
  #confetti-canvas {
    width: 95vw;
    height: auto;
  }
}
