@import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Lato";
}

section{
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    
}

section .book{
    position: relative;
    width: 350px;
    height: 500px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: 0.5s;
    
    
}

section .book:hover{
    transform: rotateY(35deg);
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
}

section .book:active{
    transform: rotateY(180deg);
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
}

section .book::before{
   content: "";
   position: absolute;
   width: 30px;
   height: 100%;
   transform-origin: left;
   background:url(img/side.jpg);
   background-position: center;
   transform: rotateY(90deg);
   z-index: 2;
}
section .book::after{
   content: "";
   position: absolute;
   width: 100%;
   height: 100%;
   transform-origin: center;
   background:url(img/back.jpg);
   background-position: center;
   transform: rotateY(180deg) translateZ(30px);
}

section .book img{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}