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

/* Book */

.book-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.book, .bookB {
    position: relative;
    display: flex;
    width: 400px;
    height: 400px;
    transition: transform 0.5s;
}

.paper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    perspective: 1200px;
}

.front, .frontB,
.back, .backB {
    background-color: transparent;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-origin: left;
    transition: transform 0.5s;
    overflow: hidden;
    border-radius: 20px;
    /* border: 3px solid var(--accentdark); */
}

.front, .frontB {
    z-index: 1;
    backface-visibility: hidden;
}

.back, .backB {
    z-index: 0;
}

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

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

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

.flippedB .frontB,
.flippedB .backB {
    transform: rotateY(-180deg);
}


.move-buttons {
    display: flex;
}

/* Controller Buttons */
.arrow-btn {
    display: flex;
    border: none;
    background-color: transparent;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.5s;
}

.arrow-btn:focus {
    outline: none;
}

.arrow-btn:hover i {
    color: var(--accentdark);
}

i {
    font-size: 30px;
    color: var(--navy);
}

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

#p2 {
    z-index: 6;
}

#p3 {
    z-index: 5;
}

#p4 {
    z-index: 4;
}

#p5 {
    z-index: 3;
}

#p6 {
    z-index: 2;
}


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

#p2B {
    z-index: 3;
}

#p3B {
    z-index: 2;
}

#p4B {
    z-index: 1;
}


@media only screen and (max-width: 1050px) { 

    .book, .bookB {
        width: 250px;
        height: 250px;
        border-radius: 20px;
    }

    .front, .frontB,
    .back, .backB {
    border-radius: 10px;
}
}

@media only screen and (max-width: 650px) { 

    .book, .bookB {
        width: 100px;
        height: 100px;
    }

    .front, .frontB,
    .back, .backB {
    border-radius: 5px;

    }
}

