/* To center the container in the DOM */
.container {
    height: 100vh;
    width: 100%;
    margin: 0 auto;
    background-color: #ffe082;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
}

/* To style the main slider $ to set it's height and width. */
.switch {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 40px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffecb3;
    transition: 0.4s;
}

/* to toggle the background color from light to dark */
.slider::before {
    position: absolute;
    content: "";
    height: 40px;
    width: 40px;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #323E52;
}

input:focus + .slider {
    box-shadow: 0 0 0 #2196F3;
}

input:checked + .slider::before {
    transform: translateX(60px);
}

/* creating round corner of slider and including content in input */
.slider.round {
    border-radius: 34px;
}

.slider.round::before {
    border-radius: 50%;
}

input + .slider.round::before {
    font-size: 25px;
    background: transparent;
    content: "🌞";
    display: flex;
    justify-content: center;
    align-items: center;
}

input:checked + .slider.round::before {
    font-size: 25px;
    background: transparent;
    content: "🌙";
    display: flex;
    justify-content: center;
    align-items: center;
}

/* To change the full page background color with animation */
.dark {
    background-color: #202838;
}

.light {
    background-color: #ffe082;
}

@keyframes rot {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(90deg);
        transform: translateX(60px);
    }
}

p {
    color: #2196F3;
    font-size: 40px;
    margin-right: 10px;
}

p.shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}