*{
    margin: 0;
    padding: 0;
}

body{
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    transition: background 1s;
    overflow: hidden;
}

body p{
    transform: translateY(30%);
    font-family: "Allura", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2.5rem;
    transition: color 1s;
    text-align: center;
}

input[type="checkbox"]{
    appearance: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8rem;
    aspect-ratio: 16/9;
    background-image: url("./images/clouds.png");
    border-radius: 4rem;
    border: #55aaaa solid 2px;
    background-size: 250%;
    background-position: -0.5rem -1rem;
    box-shadow: 2.5px 2.5px 5px gray;
    transition: background 0.5s ease-in-out, border 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

input[type="checkbox"]:checked{
    background-image: url("./images/night.jpg");
    border: #aa55aa solid 2px;
    box-shadow: 2.5px 2.5px 5px black;
}

input[type="checkbox"]::before { 
    content: "";
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    height: 75%;
    aspect-ratio: 1/1;
    background-image: url("./images/sun.png");
    background-size: 100%;
    border-radius: 50%;
    transition: left 0.5s ease-in-out, background 0.5s ease-in-out, transform 1s ease-in-out;
}

input[type="checkbox"]:checked::before {
    left: 70%;
    transform: translate(-50%, -50%) rotate(180deg);
    background-image: url("./images/moon.png");
}