@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");
* {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  transition: background 0.2s linear;
}

body.dark{
  background-color: #292c35;
}

body.dark p{
  color:#fff;
}

p{
  text-align: center;
  width: 400px;
}

.container{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transform: translateY(50%);
}

.label {
  background-color: #111;
  display: flex;
  height: 26px;
  width: 50px;
  border-radius: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  position: relative;
  transform: scale(1.5) ;
  
}

.fa-moon {
  color: #f1c40f;
}

.fa-sun {
  color: #f39c12;
}

.checkbox {
  opacity: 0;
  position: absolute;
}


.ball {
  width: 22px;
  height: 22px;
  background-color: #fff;
  position: absolute;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  cursor: pointer;
  transition: transform 0.2s linear;
}

.checkbox:checked + .label .ball {
  transform: translateX(24px);
}