/* ============== */
/* Body and color of the webpage */
/* ============== */
*{
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

:root{
    --body-color: #E4E9F7;
    --altbody-color: #e1e5f0;
    --bodyalt-color: #dae0e7;
    --nav-color: #4070F4;
    --side-nav: #010718;
    --text-color: #FFF;
    --search-bar: #F2F2F2;
    --search-text: #000000;
    --outline-color: #18191A;
    --text-title: #000000;
    --card-color: #FFFFFF;
    --about-icon: #4070F4;
}

body{
    height: 100vh;
    background-color: var(--body-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

body.dark{
    --body-color: #18191A;
    --altbody-color: #1e2021;
    --bodyalt-color: #191b1b;
    --nav-color: #242526;
    --side-nav: #242526;
    --text-color: #CCC;
    --search-bar: #242526;
    --outline-color: #E4E9F7;
    --text-title: #FFFFFF;
    --card-color: #000000;
    --about-icon: #FFFFFF;
}


/* ============== */
/* Content Pages */
/* ============== */
.content{
    display: flex;
    flex-direction: column;
}

.book{
    position: relative;
    width: 450px;
    height: 550px;
    color: var(--text-title);
    transition: transform 0.5s;
}

.paper{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    perspective: 1500px;
    justify-content: center;
    align-items: center;
}

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

.front{
    z-index: 2;
    backface-visibility: hidden;
    border-left: 2px solid var(--outline-color);
    padding: 1rem;
}

.back{
    z-index: 1;
    padding: 1rem;
}

.back img{
    width: 100%;
    border-radius: 25px;
    border: none;
}

.frontContent{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.frontContent .headerText{
    flex: 1;
    font-size: 30px;
    font-weight: bold;
    text-decoration: underline;
    margin: 0.5rem;
    padding-top: 7rem;
}

.frontContent .contentText{
    flex: 2;    
    font-size: 13px;
    text-align: center;
    padding: 0.5rem;
}

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

.backContent{
    transform: rotateY(180deg);
}

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

button{
    background-color: transparent;
    cursor: pointer;
    margin: 1rem;
    font-size: 30px;
    color: var(--outline-color);
    border: none;
    transition: transform 0.5s;
}

button i{
    border-radius: 30px;
}

button:focus{
    outline: none;
}

button:hover i{
    color: var(--body-color);
    background-color: var(--outline-color);
}

#p1{
    z-index: 9;
}

#p2{
    z-index: 8;
}

#p3{
    z-index: 7;
}

#p4{
    z-index: 6;
}

#p5{
    z-index: 5;
}

#p6{
    z-index: 4;
}

#p7{
    z-index: 3;
}

#p8{
    z-index: 2;
}

#p9{
    z-index: 1;
}


@media (max-width: 690px){
    .book{
        height: 300px;
        width: 200px;
        font-size: 30px;
    }

    .frontContent .headerText{
        font-size: 15px;
    }
    
    .frontContent .contentText{
        font-size: 8px;
    }
}