body {
  background-color: #fff;
  color: #000;
}

html, body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}

.inverted {
  background-color: #000;
  filter: invert(1);
}

body {
  transition: background-color 1.5s cubic-bezier(0.65, 0.05, 0.36, 1);
}
.inverted body {
  background-color: #000;
}

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

.icon-offline {
  content: -webkit-image-set( url(assets/default_100_percent/100-error-offline.png) 1x, url(assets/default_200_percent/200-error-offline.png) 2x);
  position: relative;
}

.hidden {
  display: none;
}

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

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

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

.controller {
  background: rgba(247, 247, 247, .1);
  height: 100vh;
  left: 0;
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: 1;
}

#offline-resources {
  display: none;
}

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

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

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

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

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

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

@media (max-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;
}

.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;
}

#ai-button-container {
    text-align: center;
    margin-top: 20px;
}

#ai-toggle {
    background-color: #f1f1f1;
    border: none;
    color: black;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#ai-toggle:hover {
    background-color: #ddd;
}

#score-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}
#score-list li {
    display: inline-block;
    margin-right: 10px;
} 

.offline {
  transition: filter 1.5s cubic-bezier(0.65, 0.05, 0.36, 1),
    background-color 1.5s cubic-bezier(0.65, 0.05, 0.36, 1);
  will-change: filter, background-color;
}
 body {
  transition: background-color 1.5s cubic-bezier(0.65, 0.05, 0.36, 1);
}
 #main-message > p {
  display: none;
}
.inverted {
  background-color: #000;
  filter: invert(1);
}
.inverted body {
  background-color: #000;
}
 .interstitial-wrapper {
  color: var(--text-color);
  font-size: 1em;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 600px;
  padding-top: 100px;
  position: relative;
  width: 100%;
}
 .runner-container {
  direction: ltr;
  height: 150px;
  max-width: 600px;
  overflow: hidden;
  position: absolute;
  top: 35px;
  width: 44px;
}
 .runner-container:focus {
  outline: 0;
}
 .runner-container:focus-visible {
  outline: 3px solid var(--google-blue-300);
}
 .runner-canvas {
  height: 150px;
  max-width: 600px;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  top: 0;
  z-index: 10;
}
 .controller {
  height: 100vh;
  left: 0;
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: 9;
}
#offline-resources {
  display: none;
}
#offline-instruction {
  image-rendering: pixelated;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 60px;
  width: fit-content;
}
-runner-live-region {
  bottom: 0;
  clip-path: polygon(0 0, 0 0, 0 0);
  color: var(--background-color);
  display: block;
  font-size: xx-small;
  overflow: hidden;
  position: absolute;
  text-align: center;
  transition: color 1.5s cubic-bezier(0.65, 0.05, 0.36, 1);
  user-select: none;
}
.slow-speed-option {
  align-items: center;
  background: var(--google-gray-50);
  border-radius: 24px/50%;
  bottom: 0;
  color: var(--error-code-color);
  display: inline-flex;
  font-size: 1em;
  left: 0;
  line-height: 1.1em;
  margin: 5px auto;
  padding: 2px 12px 3px 20px;
  position: absolute;
  right: 0;
  width: max-content;
  z-index: 999;
}
.slow-speed-option.hidden {
  display: none;
}
.slow-speed-option [type="checkbox"] {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}
.slow-speed-option .slow-speed-toggle {
  cursor: pointer;
  margin-inline-start: 8px;
  padding: 8px 4px;
  position: relative;
}
.slow-speed-option [type="checkbox"]:disabled ~ .slow-speed-toggle {
  cursor: default;
}
.slow-speed-option-label [type="checkbox"] {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}
.slow-speed-option .slow-speed-toggle::after,
.slow-speed-option .slow-speed-toggle::before {
  content: "";
  display: block;
  margin: 0 3px;
  transition: all 0.1s cubic-bezier(0.4, 0, 1, 1);
}
.slow-speed-option .slow-speed-toggle::before {
  background: #bdc1c6;
  border-radius: 0.65em;
  height: 0.9em;
  width: 2em;
}
.slow-speed-option .slow-speed-toggle::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 40%);
  height: 1.2em;
  position: absolute;
  top: 51%;
  transform: translate(-20%, -50%);
  width: 1.1em;
}
.slow-speed-option [type="checkbox"]:focus + .slow-speed-toggle {
  box-shadow: 0 0 8px #5e9ed6;
  outline: 1px solid #5d9dd5;
}
.slow-speed-option [type="checkbox"]:checked + .slow-speed-toggle::before {
  background: var(--google-blue-600);
  opacity: 0.5;
}
.slow-speed-option [type="checkbox"]:checked + .slow-speed-toggle::after {
  background: var(--google-blue-600);
  transform: translate(calc(2em - 90%), -50%);
}
.slow-speed-option
  [type="checkbox"]:checked:disabled
  + .slow-speed-toggle::before {
  background: #bdc1c6;
}
.slow-speed-option
  [type="checkbox"]:checked:disabled
  + .slow-speed-toggle::after {
  background: var(--google-gray-50);
}
@media (max-width: 420px) {
  #download-button {
    padding-bottom: 12px;
    padding-top: 12px;
  }
  .suggested-left > #control-buttons,
  .suggested-right > #control-buttons {
    float: none;
  }
  .snackbar {
    border-radius: 0;
    bottom: 0;
    left: 0;
    width: 100%;
  }
}
@media (max-height: 350px) {
  h1 {
    margin: 0 0 15px;
  }
  .icon-offline {
    margin: 0 0 10px;
  }
  .interstitial-wrapper {
    margin-top: 5%;
  }
  .nav-wrapper {
    margin-top: 30px;
  }
}
@media (min-width: 420px) and (max-width: 736px) and (min-height: 240px) and (max-height: 420px) and (orientation: landscape) {
  .interstitial-wrapper {
    margin-bottom: 100px;
  }
}
@media (max-width: 360px) and (max-height: 480px) {
   .interstitial-wrapper {
    padding-top: 60px;
  }
   .runner-container {
    top: 8px;
  }
}
@media (min-height: 240px) and (orientation: landscape) {
   .interstitial-wrapper {
    margin-bottom: 90px;
  }
  .icon-offline {
    margin-bottom: 20px;
  }
}
@media (max-height: 320px) and (orientation: landscape) {
  .icon-offline {
    margin-bottom: 0;
  }
   .runner-container {
    top: 10px;
  }
}
@media (max-width: 240px) {
  button {
    padding-inline-end: 12px;
    padding-inline-start: 12px;
  }
  .interstitial-wrapper {
    overflow: inherit;
    padding: 0 8px;
  }
}
@media (max-width: 120px) {
  button {
    width: auto;
  }
}
.arcade-mode,
.arcade-mode .runner-canvas,
.arcade-mode .runner-container {
  image-rendering: pixelated;
  max-width: 100%;
  overflow: hidden;
}
.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) 0.4s;
  z-index: 2;
}
