#switch {
  position: relative;
  width: 64px;
  margin: 4px auto;
}
#switch button {
  width: 32px;
  height: 32px;
  background: white var(--switch-bg-url) no-repeat center;
  border: 0;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  transform: translateY(-50%);

  animation: slide-back 0.2s;
}
.light #switch button {
  animation: slide-in 0.2s forwards;
}
#switch button:hover {
  outline: 8px solid var(--highlight-color);
}

#switch span {
  display: block;
  width: 64px;
  height: 24px;
  background: var(--surface-color);
  border: 1px solid var(--stroke-color);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;
}

@keyframes slide-in {
  from {
    left: 0;
  }
  to {
    left: 50%;
  }
}
@keyframes slide-back {
  from {
    left: 50%;
  }
  to {
    left: 0;
  }
}
