body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
label {
	width:67px;
	height:30px;
	position: relative;
	display: block;
	background: #ebebeb;
	border-radius: 20px;
	box-shadow: inset 0px 5px 15px rgba(0,0,0,0.4), inset 0px -5px 15px rgba(255,255,255,0.4);
	cursor: pointer;
	transition: 0.3s;
}
label:after {
	content: "";
	width:22px;
	height: 22px;
	position: absolute;
	top:4px;
	left:4px;
	background: linear-gradient(180deg,#ffcc89,#d8860b);
	border-radius: 18px;
	box-shadow: 0px 2px 10px rgba(0,0,0,0.2);
	transition: 0.3s;
}
input {
	width: 0;
	height: 0;
	visibility: hidden;
}
input:checked + label {
	background: #242424;
}
input:checked + label:after {
	left:60px;
	transform: translateX(-100%);
	background: linear-gradient(180deg,#777,#3a3a3a);
}
label:active:after{
	width: 33px;
}
.background {
	width:100vw;
	height: 100vh;
	background: #fff;
	z-index: -1;
	position: absolute; top: 0px; left: 0px;
	transition: 0.3s;
}
input:checked + label + .background {
	background:#242424;
}
label svg {
	position: absolute;
	width: 20px;
	top:5px;
	z-index: 100;
}
label svg.sun {
	left:5px;
	fill:#fff;
	transition: 0.3s;
}
label svg.moon {
	left:40px;
	fill:#7e7e7e;
	transition: 0.3s;
}
input:checked + label svg.sun {
	fill:#7e7e7e;
}
input:checked + label svg.moon {
	fill:#fff;
}