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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #171618;
  gap: 24px;
}

.buttons {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

button {
  padding: 10px 20px;
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

canvas {
  width: 80vw;
  height: 80vh;
}

button.selected {
  background-color: #3bff3b;
  color: #171618;
}

.anim-border {
  position: relative;
  color: #999;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 4px;
  font: 700 16px consolas;
  overflow: hidden;
  background: inherit;
}

details {
  cursor: pointer;
  color: #999;
  letter-spacing: 2px;
  font: 500 14px consolas;
}

.anim-border span:nth-child(1) {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #171618, #3bff3b);
  animation: animate1 2s linear infinite;
}

@keyframes animate1 {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.anim-border span:nth-child(2) {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(to bottom, #171618, #3bff3b);
  animation: animate2 2s linear infinite;
  animation-delay: 1s;
}
@keyframes animate2 {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.anim-border span:nth-child(3) {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to left, #171618, #3bff3b);
  animation: animate3 2s linear infinite;
}

@keyframes animate3 {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.anim-border span:nth-child(4) {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(to top, #171618, #3bff3b);
  animation: animate4 2s linear infinite;
  animation-delay: 1s;
}

@keyframes animate4 {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-100%);
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  .buttons {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 100px;
  }
}
