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

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: sans-serif;
    background-image: url(images/background.png);
    margin: 0;
}

/*Book*/
.book {
    position: relative;
    width: 450px;
    height: 650px;
    transform: 0.5s;
}

.paper {
    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;
    left: 0;
    transform-origin: left;
    transition: transform 0.5s;
    border-radius: 20px;
}

.front {
    z-index: 1;
    backface-visibility: hidden;
    border-left: 3px solid powderblue;
}

.back {
    z-index: 0;
}

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

.front-content img, .back-content img {
    border-radius: 20px;
}

.back-content {
    transform: rotateY(180deg);
}

/* paper flip effect */
.flipped .front, .flipped .back {
    transform: rotateY(-180deg);
}

/*Buttons*/
button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.5s;
    font-size: 3rem;
    color: bisque;
}

button:focus {
    outline: none;
}

button:hover i {
    color: rgb(30, 225, 255);
}

i {
    font-size: 50px;
}

/* Paper stack order */
#p1 {
    z-index: 4;
}

#p2 {
    z-index: 3;
}

#p3 {
    z-index: 2;
}

#p4 {
    z-index: 1;
}