html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

@media (min-width: 992px) {
  body {
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
  }

  .breakClass {
    display: none;
  }

  .fullscreenButtonDiv,
  .versionInfo,
  .screenSize,
  .dpad,
  .actionButtonsDiv,
  .centerButtonsDiv,
  #fpsDisplay {
    z-index: 2;
  }

  .fullscreenButtonDiv {
    position: absolute;
    top: 2em;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.0);
    padding: 1em;
    border-radius: 10px;
  }

  #fullscreenButton {
    width: 2em;
    height: 2em;
    font-size: 1.5em;
    text-align: center;
    line-height: 1.2;
    background-color: rgba(0, 150, 255, 0.8);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
  }

  #fullscreenButton:hover {
    background-color: rgba(0, 120, 220, 0.8);
  }

  #fullscreenButton:active {
    background-color: #0056a6;
  }

  #fullscreenButton:focus {
    outline: none;
  }

  #fpsDisplay {
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 1.5em;
    top: 1.2em;
    left: 0.2em;
    position: absolute;
    border: 1px solid black;
    border-radius: 5px;
  }

  .versionInfo {
    position: absolute;
    width: 6em;
    top: 0.5em;
    right: 1em;
    font-size: 1em;
    height: 4em;
    line-height: 4vw;
    color: white;
    background-color: rgba(255, 10, 10, 0.5);
    text-align: center;
    padding: 0;
    border-radius: 5px;
  }

  .screenSize {
    position: absolute;
    top: 1.78em;
    left: 15vw;
    font-size: 1.6em;
    font-style: bold;
    color: black;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.34em;
    border: 1px solid black;
    border-radius: 5px;
    font-size: 1em;
  }

  .dpad {
    position: absolute;
    bottom: 15vh;
    left: 5vw;
    transform: translateX(0); /* No shift */
    background-color: rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-areas:
      ". up ."
      "left . right"
      ". down .";
    gap: 0.5em;
    justify-content: center;
    align-items: center;
    z-index: 2;
  }

  .dpad button {
    width: 4em;
    height: 4em;
    margin: 0;
    font-size: 24px;
    background-color: rgba(0, 150, 255, 0.5);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
  }

  .actionButtonsDiv {
    position: absolute;
    bottom: 15vh;
    right: 5vw;
    background-color: rgba(0, 0, 0, 0.1);
    display: grid;
    width: auto;
    height: auto;
    grid-template-areas:
      ". up ."
      "left . right"
      ". down .";
    gap: 0.5em;
    justify-content: center;
    align-items: center;
    z-index: 2;
  }
  
  .actionButtons.button-up    { grid-area: up; }
  .actionButtons.button-down  { grid-area: down; }
  .actionButtons.button-left  { grid-area: left; }
  .actionButtons.button-right { grid-area: right; }
  
  
  
  

  .actionButtons {
    width: 4em;
    height: 4em;
    font-size: 24px;
    margin: 0;
    background-color: rgba(0, 150, 255, 0.5);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
  }

  .centerButtonsDiv {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    background-color: rgba(0, 0, 0, 0.1);
  }

  .centerButtonsDiv button {
    width: 4em;
    height: 2em;
    font-size: 24px;
    margin: 0;
    background-color: rgba(0, 150, 255, 0.5);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
  }

  .button-up { grid-area: up; }
  .button-left { grid-area: left; }
  .button-right { grid-area: right; }
  .button-down { grid-area: down; }

  button.pressed {
    background-color: #0056a6;
  }

  button:active {
    background-color: #0056a6;
  }

  button:focus {
    outline: none;
  }
}

.canvas-container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#backgroundCanvas {
  display: none;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  z-index: 1;
  display: block;
}
