body {
  margin: 0;
  padding: 0;
  background: #f3f3f3;
}
.center {
  height: 100vh;
  display: grid;
  place-items: center;
  scale: 200%;
}
input[type="checkbox"] {
  height: 40px;

  position: relative;
  width: 80px;

  appearance: none;
  background: #c6c6c6;
  outline: none;
  border-radius: 20px;
  box-shadow: inset 0 0 px rgba(0, 0, 0, 0.2);
}
input:checked[type="checkbox"] {
  background: #03a9f4;
}
input[type="checkbox"]:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;

  width: 40px;
  height: 40px;
  border-radius: 20px;

  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.5s;
}
input:checked[type="checkbox"]:before {
  left: 40px;
}
