* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    font-family: sans-serif;
    background-color:black;
}

/* Book */
.book {
    position: relative;
    width: 350px;
    height: 500px;
    transition: transform 0.5s;
}

.paper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    perspective: 2500px;

}

.front,
.back {
    background-color: white;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-origin: left;
    transition: transform 0.5s;
}

.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;
}

.back-content {
    transform: rotateY(180deg)
}

/* Paper flip effect */
.flipped .front,
.flipped .back {
    transform: rotateY(-180deg);
}

/* Controller Buttons */
button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.5s;
}

button:focus {
    outline: none;
}

button:hover i {
    color: #636363;
}

i {
    font-size: 50px;
    color: gray;
}

/* Paper stack order */
#p1 {
    z-index: 38;
}

#p2 {
    z-index: 37;
}

#p3 {
    z-index: 36;
}

#p4 {
    z-index: 35;
}

#p5 {
    z-index: 34;
}

#p6 {
    z-index: 33;
}

#p7 {
    z-index: 32;
}

#p8 {
    z-index: 31;
}

#p9 {
    z-index: 30;
}

#p10 {
    z-index: 29;
}

#p11 {
    z-index: 28;
}

#p12 {
    z-index: 27;
}

#p13 {
    z-index: 26;
}

#p14 {
    z-index: 25;
}

#p15 {
    z-index: 24;
}

#p16 {
    z-index: 23;
}

#p17 {
    z-index: 22;
}

#p18 {
    z-index: 21;
}

#p19 {
    z-index: 20;
}

#p20 {
    z-index: 19;
}

#p21 {
    z-index: 18;
}

#p22 {
    z-index: 17;
}

#p23 {
    z-index: 16;
}

#p24 {
    z-index: 15;
}

#p25 {
    z-index: 14;
}

#p26 {
    z-index: 13;
}

#p27 {
    z-index: 12;
}

#p28 {
    z-index: 11;
}

#p29 {
    z-index: 10;
}

#p30 {
    z-index: 9;
}

#p31 {
    z-index: 28;
}

#p32 {
    z-index: 7;

}

#p33 {
    z-index: 6;
}

#p34 {
    z-index: 5;
}

#p35 {
    z-index: 4;
}

#p36 {
    z-index: 3;
}
#p37 {
    z-index: 2;
}

#p38 {
    z-index: 1;
}