body {
  width: 100%;
  height: 100%;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
}
.function button,
.action button {
  color: #000;
}

.function button {
  height: 32px;
  width: auto;
}

.nes-roms > select {
  width: 100%;
  height: 30px;
}

.nes-controls {
  text-align: start;
}

.game-window {
  width: 100%;
  height: 100%;
}
@media screen and (max-width: 600px) {
  .function-area {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    padding: 0;
  }
  .screen {
    max-height: 100%;
  }
  .screen canvas {
    max-width: none !important;
    max-height: none !important;
  }
  .game-window div canvas {
    margin-top: 0%;
    margin-left: 80%;
    box-sizing: border-box;
    transform: scaleX(2.2) scaleY(1.4);
  }
  .controller {
    transform: rotate(90deg);
    position: fixed;
    top: 20px;
  }
  .game-window > div {
    transform: rotate(90deg);
  }
  .function {
    z-index: 2;
    transform: rotate(90deg);
    position: fixed;
    z-index: 3;
    bottom: 46px;
    right: 12px;
  }
  .action-area {
    z-index: 4;
    position: fixed;
    transform: rotate(90deg);
    bottom: 105px;
    left: 0;
  }
  .action button:first-child {
    margin-right: 40px;
  }
  .controller {
    width: 220px;
    height: 220px;
  }
  button.left.joydirection,
  button.up.joydirection,
  button.right.joydirection,
  button.down.joydirection {
    width: 5rem;
    height: 5rem;
    opacity: 0.4;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
  }

  button.left.joydirection:active,
  button.up.joydirection:active,
  button.right.joydirection:active,
  button.down.joydirection:active {
    opacity: 0.9;
  }
  button.left.joydirection:focus,
  button.up.joydirection:focus,
  button.right.joydirection:focus,
  button.down.joydirection:focus {
    opacity: 0.9;
  }
  .nes-controls {
    transform: rotate(90deg);
    position: fixed;
    right: 30px;
    top: 0px;
    z-index: 2;
  }
  .nes-controls input {
    user-select: none;
    margin: 10px;
    height: 26px;
    width: 70px;
    padding: 3px;
    line-height: 14px;
    outline: 0;
    border: 4px solid #474f51;
    box-shadow: 0 0 0 4px rgb(255 255 255 / 10%), inset 4px 4px 0 0px rgb(255 255 255 / 40%);
    background: #857b7a;
    color: transparent;
    border-radius: 15px;
    color: #fff;
    display: block;
  }
  .nes-zoom {
    display: none!important;
  }
  .action button {
    width: 80px;
    height: 80px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    opacity: 0.4;
  }
  .action button:active {
    opacity: 0.9;
  }
  .action button:focus {
    opacity: 0.9;
  }
  .nes-roms {
    transform: rotate(90deg);
    width: 100px !important;
    position: fixed;
    right: -15px;
    bottom: 70px;
    z-index: 2;
  }
  .nes-roms option {
    transform: rotate(90deg);
  }
}
