::-webkit-scrollbar {
  width: 0.5em;
}

::-webkit-scrollbar-track {
  background-color: #343434;
}

::-webkit-scrollbar-thumb {
  background-color: #7b7b7b;
}

body {
  align-items: center;
  color: white;
  cursor: url("./cursors/default.png"), default;
  font-family: sans-serif;
  font-size: 0.75em;
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -o-crisp-edges;
  image-rendering: pixelated;
  overflow: hidden;
  position: relative;
  user-select: none !important;
}

body.button-hovered {
  cursor: url("./cursors/pointer.png") 7 2, pointer;
}

input {
  cursor: url("./cursors/default.png"), default;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  cursor: url("./cursors/default.png"), default;
}

label {
  cursor: url("./cursors/default.png"), default;
}

button {
  cursor: url("./cursors/pointer.png") 7 2, pointer;
}

#screen {
  outline: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

body:not(.paused) #pause-menu {
  display: none;
}

.pause-toggle {
  cursor: url("./cursors/pointer.png") 7 2, pointer;
  opacity: 0.75;
  position: absolute;
}

body:not(.interacted) .pause-toggle {
  display: none;
}

body:not(.pausable) .pause-toggle {
  display: none;
}

body.paused #pause-button {
  display: none;
}

body:not(.paused) #unpause-button {
  display: none;
}

#achievement-unlock-notices {
  pointer-events: none;
  position: absolute;
  top: 0;
}

.achievement-unlock-notice {
  align-items: center;
  background-color: #151515;
  border: 0.1em solid white;
  border-radius: 8px;
  display: flex;
  font-size: 2em;
  left: 1em;
  margin: 0 auto;
  max-height: calc(100% - 1.7em);
  max-width: calc(90% - 2em);
  opacity: 0;
  overflow: hidden;
  padding: 0.25em;
  position: absolute;
  right: 1em;
  text-align: center;
  top: 1em;
  transition: opacity 1.5s linear;
  width: 17.5em;
  word-break: break-word;
}

.achievement-unlock-notice.fading-in {
  opacity: 1;
}

.achievement-unlock-notice.fading-out {
  opacity: 0;
}

.achievement-unlock-notice-icon {
  height: 3.5em;
  width: 3.5em;
}

.achievement-unlock-notice-text {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: calc(100% - 4.5em);
  padding: 0.5em;
  width: 100%;
}

.achievement-unlock-notice-heading {
  font-weight: bold;
}

#pause-menu {
  background-color: rgba(0, 0, 0, .75);
  display: flex;
  font-size: 2em;
  outline: none;
  position: absolute;
  top: 0;
}

#pause-content {
  align-items: center;
  display: flex;
  height: 80%;
  margin: auto;
  width: 80%;
  overflow-y: auto;
  text-align: center;
}

#pause-content>* {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: auto;
  max-width: 100%;
}

#volume-sliders {
  max-width: 100%;
}

#scale-screenshot {
  margin-bottom: 0.5em;
}

#volume-sliders:not(:last-child) {
  margin-bottom: 0.5em;
}

#pause-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#pause-menu.controls:not(.main) #pause-main {
  display: none;
}

#pause-menu.achievements:not(.main) #pause-main {
  display: none;
}

#pause-main label {
  display: block;
  margin-bottom: 0.25em;
  text-align: center;
  word-break: break-word;
}

#pause-main button {
  display: block;
}

.checkbox-settings {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.checkbox-settings input {
  height: 0.75em;
  margin-bottom: 0.5em;
  width: 0.75em;
}

#scale-screenshot-input {
  background-color: transparent;
  color: white;
  border: 0.05em solid white;
  width: 2em;
  text-align: center;
  margin-left: 0.125em;
}

#scale-screenshot-input:focus-visible {
  outline: 1px solid white;
}

.volume-slider {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.volume-slider:not(:last-child) {
  margin-bottom: 0.5em;
}

.volume-slider input {
  max-width: 100%;
  width: 6em;
}

#pause-menu button {
  background-color: transparent;
  border: 0.05em solid white;
  border-radius: 8px;
  color: white;
  margin: 0.25em 0;
  padding: 0.125em .25em;
  word-break: break-word;
}

#pause-menu button:hover {
  opacity: 0.75;
}

#pause-menu button:focus-visible {
  outline: 0.05em solid white;
}

#pause-buttons {
  position: absolute;
  pointer-events: none;
  top: 0;
}

#pause-buttons img {
  pointer-events: all;
}

#pause-menu:not(.controls) #pause-controls {
  display: none;
}

#pause-menu:not(.achievements) #pause-achievements {
  display: none;
}

#pause-achievements {
  width: 100%;
}

#achievements-amount {
  font-size: 0.825em;
  margin-bottom: 0.5em;
  margin-top: 0.25em;
}

#achievements-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.achievement-info {
  align-items: center;
  background-color: #151515;
  border: 0.1em solid white;
  border-radius: 8px;
  display: flex;
  font-size: 0.625em;
  margin-bottom: 0.25em;
  padding: 0.25em;
  text-align: center;
  width: 100%;
}

.achievement-info:not(.unlocked) {
  color: #a8a8a8;
}

.achievement-info-icon {
  width: 4.5em;
}

.achievement-info:not(.unlocked) .achievement-info-icon {
  filter: grayscale(1);
}

.achievement-info-icon.secret {
  padding: 0.75em;
  width: 3em;
}

.achievement-info-text {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: calc(100% - 3em);
  padding: 0.5em;
  width: 100%;
  word-break: break-word;
}

.achievement-info-name {
  font-weight: bold;
}

#pause-controls {
  width: 100%;
}

#controls-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25em;
}

.controls-info {
  background-color: #151515;
  border: 0.1em solid white;
  border-radius: 8px;
  display: flex;
  font-size: 0.625em;
  margin-bottom: 0.25em;
  padding: 0.25em;
  text-align: center;
  width: 100%;
}

.controls-info>div {
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 0.5em;
}

.controls-info>div:not(:last-child) {
  border-right: 0.1em solid white;
}

.controls-info span {
  margin: 0.25em 0;
  word-break: break-word;
}

.swal2-container {
  font-family: sans-serif;
  position: absolute;
}

.swal2-container .swal2-modal {
  background-color: #151515;
  border: 0.125em solid white;
}

.swal2-container .swal2-title {
  color: white;
}

.swal2-container .swal2-html-container {
  color: white;
  margin-bottom: 0;
}

.swal2-container .swal2-content {
  color: white;
}

.swal2-container ul {
  text-align: left;
}

.swal2-container button {
  background-color: transparent;
  border: 0.125em solid white;
  border-radius: 0;
  color: white;
  font-weight: bold;
  padding: 0.75em 1.5em;
}

.swal2-container button:hover, .swal2-container button:focus {
  background-color: white;
  background-image: none;
  color: #151515;
}

.swal2-cancel {
  margin-left: 1em;
}

#copy-error-button:hover {
  border-width: 0.2em;
}

#copy-error-button:focus-visible {
  border-width: 0.2em;
  outline: none;
}

#copy-error-button:active {
  transform: translatey(0.1em);
}