* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow: hidden;
  overscroll-behavior-x: none;
  font-family: monospace;
  font-size: 18px;
}

html body {
  height: 100vh;
  width: 100vw;
  background: #1f1f1f;
  padding: 4em;
  min-width: 320px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#column {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#box {
  width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  position: relative;
}

#sketch,
#next-sketch {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  line-height: 0;

  transition:
    transform 1s ease-in-out,
    opacity 0.5s ease-in-out;
}

canvas {
  aspect-ratio: 1;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
}

.up {
  transform: translateY(-120%);
  opacity: 0;
}

.right {
  transform: translateX(120%);
  opacity: 0;
}

.down {
  transform: translateY(120%);
  opacity: 0;
}

.left {
  transform: translateX(-120%);
  opacity: 0;
}

.now {
  transition: all 0s !important;
}

.bump {
  transition: transform 0.8s ease-in-out !important;
  opacity: 0.9;
}

.center {
  transform: translateX(0) translateY(0);
  opacity: 1;
}

.p5Label {
  position: absolute;
  bottom: calc(100% + 0.5em);
  left: 0;
  padding: 5px;
  color: white;
}

.error {
  background: rgba(255, 0, 0, 0.5);
  width: 100%;
  height: 100%;
}

.exit {
  position: absolute;
  height: 0.5em;
  width: 0.5em;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background: #aaa;
  box-shadow: 0 0 20px white;
  pointer-events: none;
}

.exit.moving {
  transition: opacity 0.3s ease-in-out;
}

.exit.active {
  opacity: 1;
}

#left {
  left: -2em;
  top: 50%;
  transform: translateY(-50%);
}

#down {
  bottom: -2em;
  left: 50%;
  transform: translateX(-50%);
}

#up {
  top: -2em;
  left: 50%;
  transform: translateX(-50%);
}

#right {
  right: -2em;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  html body {
    padding: 2em;
  }

  #left {
    left: -1em;
  }

  #down {
    down: -1em;
  }

  #up {
    up: -1em;
  }

  #right {
    right: -1em;
  }
}
