@font-face {
  font-family: 'Press Start 2P';
  src: url('assets/PressStart2P-Regular.ttf') format('truetype');
}

html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}

.icon {
  user-select: none;
  display: inline-block;
}

.icon-offline {
  content: image-set(
    url('assets/default_100_percent/100-error-offline.png') 1x,
    url('assets/default_200_percent/200-error-offline.png') 2x
  );
  position: relative;
  margin: 0;
  image-rendering: pixelated;
  transform: scale(1.2);
}

.hidden {
  display: none;
}

/* Offline page */

.offline .interstitial-wrapper {
  color: #2b2b2b;
  font-size: 1em;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 600px;
  padding-top: 100px;
  width: 100%;
}

.offline .runner-container {
  height: 150px;
  max-width: 600px;
  overflow: hidden;
  position: absolute;
  top: 35px;
  width: 44px;
}

.offline .runner-canvas {
  height: 150px;
  max-width: 600px;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  top: 0;
  z-index: 2;
}

.offline .controller {
  background: rgb(247 247 247 / 10%);
  height: 100vh;
  left: 0;
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: 1;
}

.offline-resources {
  display: none;
}

@media (width <= 420px) {
  .suggested-left > .control-buttons,
  .suggested-right > .control-buttons {
    float: none;
  }
  .snackbar {
    left: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
  }
}

@media (height <= 350px) {
  h1 {
    margin: 0 0 15px;
  }
  .icon-offline {
    margin: 0 0 10px;
  }
  .interstitial-wrapper {
    margin-top: 5%;
  }
  .nav-wrapper {
    margin-top: 30px;
  }
}

@media (width >= 600px) and (width <= 736px) and (orientation: landscape) {
  .offline .interstitial-wrapper {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (width >= 420px) and (width <= 736px) and (height >= 240px) and (height <= 420px) and (orientation: landscape) {
  .interstitial-wrapper {
    margin-bottom: 100px;
  }
}

@media (height >= 240px) and (orientation: landscape) {
  .offline .interstitial-wrapper {
    margin-bottom: 90px;
  }
  .icon-offline {
    margin-bottom: 20px;
  }
}

@media (height <= 320px) and (orientation: landscape) {
  .icon-offline {
    margin-bottom: 0;
  }
  .offline .runner-container {
    top: 10px;
  }
}

@media (width <= 240px) {
  .interstitial-wrapper {
    overflow: inherit;
    padding: 0 8px;
  }
}

.arcade-mode,
.arcade-mode .runner-container,
.arcade-mode .runner-canvas {
  image-rendering: pixelated;
  max-width: 100%;
  overflow: hidden;
}

.main-content {
  font-family: 'Press Start 2P', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  image-rendering: pixelated;
  padding: 0 20px;
  max-width: 100%;
  box-sizing: border-box;
}

.main-content span {
  font-size: 16px;
  color: #535353;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.5;
  text-shadow: 2px 2px 0 #fff;
  transform: scale(1.1, 1.2) translateY(3.5em);
  white-space: normal;
  max-width: calc(100% - 60px);
  text-align: center;
  word-wrap: break-word;
}

.arcade-mode .buttons,
.arcade-mode .main-content {
  opacity: 0;
  overflow: hidden;
}

.arcade-mode .interstitial-wrapper {
  height: 100vh;
  max-width: 100%;
  overflow: hidden;
}

.arcade-mode .runner-container {
  left: 0;
  margin: auto;
  right: 0;
  transform-origin: top center;
  transition: transform 250ms cubic-bezier(0.4, 0, 1, 1) 400ms;
  z-index: 2;
}

@media (width <= 480px) {
  .main-content {
    flex-direction: column;
    gap: 15px;
  }

  .main-content span {
    max-width: 100%;
    text-align: center;
  }
}
