.control-group-left,
.control-group-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mobile-only {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 100;
}

@media only screen and (max-width: 720px) {
  canvas {
    width: 100%;
  }
  h1 {
    display: none;
  }
  .desktop-only {
    display: none;
  }
}

@media only screen and (max-height: 480px) {
  #game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
  }

  canvas {
    height: 100vh !important;
    width: auto !important;
  }

  #play-button,
  #mute-button {
    padding: 15px 40px;
    font-size: 20px;
  }

  .restart-button,
  .menu-button {
    padding: 15px 40px;
    font-size: 20px;
  }

  #fullscreen-button {
    display: none;
  }

  .desktop-only {
    display: none;
  }

  h1 {
    display: none;
  }
}

@media (orientation: landscape) {
  .rotate-device-overlay {
    display: none;
  }
}

@media (orientation: portrait) and (max-width: 1024px) {
  .rotate-device-overlay {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
  }
}

@keyframes rotatePhone {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.rotate-icon {
  font-size: 50px;
  margin-top: 20px;
  animation: rotatePhone 2s infinite ease-in-out;
}
