* {
    margin:0;
    padding:0;
    box-sizing: border-box;
}

body{
    height:100vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
background-color: red;


}

.book{
    border:1px solid black;
    position: relative;
    width:350px;
    height:500px;

}

.paper{
    border:1px solid red;
    position: absolute;
    width:100%;
    height:100%;
    top:0;
    left:0;
    perspective: 1500px;

}

.front,.back{
    background-color: white;
    position: absolute;
    width:100%;
    height:100%;
    top:0;
    right: 0;
    transform-origin: left; 
     transition: transform 0.5s;
}


.front{
    z-index: 1;
     backface-visibility: hidden;
     border-left: 1px solid black;
}
.back{
    z-index: 0;
   
}

.front-content,.back-content{
    width:100%;
    height:100%;
    display: flex;
    justify-content: center;
    align-items:center;
}

#b1{
     transform:rotateY(180deg)
}

#p1{
    z-index: 5;
}
#p2{
    z-index: 4;
}
#p3{
    z-index: 3;
}
#p4{
    z-index: 2;
}
#p5{
    z-index: 1;
}

.flipped .front,
.flipped .back{
    transform:rotateY(-180deg)
}

#cover{
    width:100%;
    height:100%;
}

.vidhaha{
    width:499px
}

.words{
    margin:10px;
    position:absolute;
    color:white;    
}

.pic{
    opacity: 20%;
}
#backwards-words{
     transform:rotateY(180deg);
}

.invisible{
    opacity: 0;
}

#prevBtn{
    position: fixed;
    left:100px;
    top:100px;
}
#nextBtn{
    position: fixed;
    left:100px;
    top:300px;
}
#tb{
    position: fixed;
    left:100px;
    top:500px;
}

#book{
    position:fixed;
        top:20%;
    left:20%;
}
#book2{
    position:fixed;
        top:20%;
    left:20%;
}