body {
    margin: 0;
    padding: 0;
    font-family: 'Patrick Hand SC', cursive;
    text-align: center;
    background-color: #222;
    color: #fff;
    touch-action: pan-x pan-y;
}

h1 {
    margin-top: 20px;
    font-family: 'Patrick Hand SC', cursive;
}

#connectButton {
    margin: 10px;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    font-family: 'Patrick Hand SC', cursive;
}

#connectButton:hover {
    background-color: #2980b9;
}

#menu {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

#menu button {
    font-family: 'Patrick Hand SC', cursive;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: #3498db;
    color: white;
    transition: 0.2s;
}

#menu button:hover {
    background: #2980b9;
}

#backToMenuButton {
    font-family: 'Patrick Hand SC', cursive;
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #e67e22;
    color: white;
    z-index: 10;
}

#backToMenuButton:hover {
    background: #d35400;
}


#pauseButton {
    margin: 10px;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    font-family: 'Patrick Hand SC', cursive;
}

#pauseButton:hover {
    background-color: #2980b9;
}

@media (max-width: 1080px) {
  #gameCanvas {
    width: 95vw;     /* fill most of screen width */
    height: 60vh;    /* keep space for buttons */
  }
}

/* @media (max-width: 768px) and (orientation: landscape) {
  #gameCanvas {
    width: 70vw;
    height: 90vh;
  }
} */

#gameCanvas {
    width: 45vw;
    height: auto;
    display: block;
    margin: 0 auto;
    background-color: #333;
    border: 2px solid #fff;
}

#mobileControls {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 2vw;
  flex-wrap: wrap;
  touch-action: pan-x pan-y;
}

#mobileControls button {
  font-family: 'Patrick Hand SC', cursive;
  padding: 3vw 6vw;
  font-size: 4vw;
  border-radius: 1vw;
  border: none;
  cursor: pointer;
  min-width: 80px;
  min-height: 50px;
}

#snakeControls {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 2vw;
  flex-wrap: wrap;
  touch-action: pan-x pan-y;
}

#snakeControls button {
  font-family: 'Patrick Hand SC', cursive;
  padding: 3vw 6vw;
  font-size: 4vw;
  border-radius: 1vw;
  border: none;
  cursor: pointer;
  min-width: 80px;
  min-height: 50px;
}

#snakeControls {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 2vw;
  flex-wrap: wrap;
  touch-action: pan-x pan-y;
}

#flappyControls {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 2vw;
  flex-wrap: wrap;
  touch-action: pan-x pan-y;
}

#flappyControls button {
  font-family: 'Patrick Hand SC', cursive;
  padding: 3vw 6vw;
  font-size: 4vw;
  border-radius: 1vw;
  border: none;
  cursor: pointer;
  min-width: 80px;
  min-height: 50px;
}

/* Hide controls by default, shown via JS if touch device */
#pongControls {
  display: none;
  width: 100%;
  margin-top: 10px;
}

.pong-controls-wrapper {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.pong-controls-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pong-controls-side button {
  font-family: 'Patrick Hand SC', cursive;
  width: 60px;
  height: 60px;
  font-size: 20px;
  border-radius: 8px;
  border: none;
  background: #333;
  color: white;
}


#btnShoot {
  background: #e74c3c;
  color: #fff;
}

#btnLaser {
  background: #3498db;
  color: #fff;
}

