@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,700&display=swap');

/* *,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
} */

:root {
    --paper: #e0e0e0;
    --borderRad: .5em;
    --shadowOpacity: rgba(0, 0, 0, 0.3);
    --transition: 0.5s ease;
    --hardCoverColor: rgb(236, 221, 180);
    --bodyBackground: #f6921e;
    --containerBackground: linear-gradient(to bottom right, #f6921e, #f6921e);
    --testing: 1px solid black;
    --borderRad1: 1em;
    --borderRad2: .5em;
    --transition: 0.3s;
    --gap: 1em;
    --fontColorPrimary: rgb(19, 18, 18);
    --fontColorSecondary: rgb(255 255 255);
    --fontSizeLarge: clamp(1.8em, 2em, 2.2em);
    /* --fontSizeSmall: clamp(1.2em, 1.4em, 1.6em); */
    --fontSizeSmall: 14px;
    --fontSizeMedium: clamp(1.4em, 1.6em, 1.8em);
    --padding: 1em;
    --imageContainerWidth: 18%;
    --imageContainerHeight: 28em;
    --modalTextBig: clamp(2.2em, 2.5em, 3em);
    --modalTextMedium: clamp(1.6em, 1.8em, 2em);
    --modalTextSmall: clamp(1.4em, 1.6em, 1.8em);
}

/* html {
    font-size: 62.5%;
} */

.flex,
.book-section.flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-section {
    width: 100%;
    height: 100%;
    flex-direction: column;
    /* background-color: var(--bodyBackground); */
    font-family: "Open Sans", sans-serif;
    position: relative;
}

.book-section img {
    height: 100%;
    width: 100%;
}

/* .book-section .cards {
    background-image: linear-gradient(to bottom right, #F6921E, #F6921E99);
    height: 90vh;
    border-radius: var(--borderRad1);
    padding: var(--padding);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
} */

.book-section .subcontainer {
    width: 100%;
    height: 100%;
    display: grid;
    justify-content: space-evenly;
    align-items: center;
    grid-template-rows: repeat(2, 22em);
    grid-template-columns: repeat(6, 15em);
    grid-row-gap: 1em;
    overflow-y: scroll;
}

.book-section ::-webkit-scrollbar {
    width: 1em;
    /* display: none; */
    cursor: pointer;
}


.book-section ::-webkit-scrollbar-track {
    background-color: var(--bodyBackground);
    border-radius: .2em;
    box-shadow: inset 0px 0px 10px rgba(217, 95, 74, 1);
}

.book-section ::-webkit-scrollbar-thumb {
    background-color: #F6921E;
    border-radius: 1em;
}

.book-section ::-webkit-scrollbar-thumb:vertical {
    height: 3em;
}


.book-section .img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    /* border : var(--testing); */
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: 0.5s ease-in;
    border-radius: 12px;
}

.book-section .img-container:hover .book-img {
    /* filter : blur(1px); */
    transform-origin: left;
    transform: scale(1.1);
    opacity: 0.8;
}

.book-section .img-subcontainer {
    width: 100%;
    height: 100%;
    border-radius: var(--borderRad2);
}

.book-section .book-img {
    object-fit: cover;
    border-radius: inherit;
    transition: 0.5s ease;
    z-index: 3;
}

.book-section .content {
    flex-direction: column;
    justify-content: flex-start;
    position: absolute;
    width: 100%;
    height: 45%;
    font-style: italic;
    top: 0%;
    left: 0%;
    background-color: #131921;
    clip-path: polygon(0 0, 100% 15%, 100% 100%, 0% 85%);
    transform: translateY(198%);
    transition: 0.3s ease;
    color: var(--fontColorSecondary);
    padding: 1.2em 1em;
}


.book-section .genre {
    color: var(--fontColorSecondary);
    align-self: flex-end;
    font-size: 24px;
    /* margin-top: 1em; */
    padding: 0px 0.5em;
    background-color: var(--bodyBackground);
    border-radius: .2em;
    font-weight: bold;
}

.book-section h3 {
    margin-block-start: 0;
    margin-block-end: 0;
    font-style: italic;
    font-size: var(--fontSizeSmall);
}

.book-section .title {
    color: var(--fontColorSecondary);
    align-self: flex-start;
    margin-left: .5em;
    margin-bottom: .3em;
}

.book-section .wrapper {
    width: 100%;
    align-self: flex-end;
    gap: .5em;
}

.book-section .default {
    font-size: var(--fontSizeSmall);
    white-space: nowrap;
}

.book-section .author {
    font-weight: 600;
    font-size: var(--fontSizeSmall);
    height: fit-content;
    white-space: nowrap;
    color: #ffffff !important;
}


.book-section .custom-modal {
    position: absolute;
    width: 40em;
    height: 30em;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    background-image: var(--containerBackground);
    border-radius: var(--borderRad1);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 5;
    transform-style: preserve-3d;
    perspective: 200px;
    display: none;
    transition: 0.5s scale ease-in;
    padding: 1em;
    pointer-events: none;
}

.book-section .custom-modal-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.book-section .overlay {
    position: absolute;
    background-color: rgba(222, 157, 146, 0.5);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    z-index: 4;
    border-radius: var(--borderRad1);
    display: none;
}

.book-section .show .overlay {
    display: flex;
}

.book-section .show .custom-modal {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.book-section .show.subcontainer {
    overflow: hidden;
}

.book-section .content-left {
    width: clamp(22%, 22em, 23%);
    align-self: flex-end;
    height: 60%;
    /* border :var(--testing); */
}

.book-section .content-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: clamp(88%, 88em, 87%);
    height: 100%;
    /* border : var(--testing); */
    padding: 1em 1.5em;
    color: var(--fontColorSecondary);
}


.book-section .content-right::after {
    content: "";
    position: absolute;
    top: 26%;
    left: 8%;
    width: 90%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.3);
}

.book-section .content-right .modal-title {
    text-align: center;
    font-weight: normal;
    width: 100%;
    /* border : var(--testing); */
    font-size: var(--modalTextBig);
    margin-left: 1em;
}

.book-section .content-right .modal-author {
    text-align: center;
    font-size: var(--modalTextMedium);
    width: 100%;
    font-weight: normal;
    margin-bottom: .5em;
    font-style: italic;
}

.book-section .content-right .description {
    /* border : var(--testing); */
    width: 100%;
    flex: 2;
    font-size: var(--modalTextSmall);
    overflow: scroll;
    scrollbar-width: none;
}

.book-section .modal-genre {
    position: absolute;
    bottom: -2%;
    right: -15%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fontSizeSmall);
    align-self: flex-end;
    clip-path: polygon(100% 0%, 85% 50%, 100% 100%, 0 98%, 0% 50%, 0 0);
    border-radius: var(--borderRad2);
    width: 8em;
    height: 2em;
    text-align: center;
    background-color: #131921;
    font-style: italic;
}

.book-section .cost {
    width: 4em;
    height: 2em;
    margin-top: 1em;
    font-size: var(--modalTextSmall);
    border-radius: var(--borderRad2);
    background-color: #131921;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-style: italic;
    font-weight: bold;
    color: var(--fontColorSecondary);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.book-section .cost:focus {
    outline: none;
}

.book-section .cost:hover {
    transform: scale(1.05);
}

.book-section .cost:active {
    transform: scale(0.98);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
}

.book-section .content-right .description::-webkit-scrollbar {
    display: none;
}

::selection {
    background-color: transparent;
}

.book-section .more:active {
    transform: scale(0.98);
}

.book-section .img-container:hover .content {
    transform: translateY(150%);
}

.book-section .img-container:hover .more {
    transform: translateX(0%);
}

/* 3D Book */


.book-section li {
    list-style-type: none;
    ;
}


.book-section .book {
    width: 14em;
    height: 22em;
    border-radius: var(--borderRad);
    position: absolute;
    top: -30%;
    left: -10%;
    box-shadow: 5px 10px 20px var(--shadowOpacity);
    z-index: 8;
    transition: all var(--transition);
}


.book-section .book.open {
    box-shadow: 5px 10px 20px var(--shadowOpacity);
    animation: open 0.6s ease forwards;
}

.book-section .front {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    z-index: 7;
    transition: var(--transition);
    position: relative;
}

.book-section .book::before {
    transition: 0.5s ease;
}


@keyframes movein {
    to {
        transform: translateX(12.8%) rotateY(10deg) translateZ(12px);
    }
}

.book-section .back {
    transition: 0.5s ease;
    opacity: 0;
    transform: translateX(0%);
    position: relative;
}


.book-section .open .back {
    width: 100%;
    height: 92%;
    position: absolute;
    top: 5%;
    left: 0%;
    z-index: 1;
    border-radius: inherit;
    box-shadow: 15px 10px 40px var(--shadowOpacity);
    animation: slideIn2 0.5s ease forwards;
}

.book-section li {
    top: 50.5%;
    left: 0%;
    transition: var(--transition);
    transform: translateY(-50%) translateX(0%);
    opacity: 0;
    /* border : var(--testing) */
}

.book-section .open li {
    position: absolute;
    border-right: 1px solid rgba(255, 255, 255, .4);
    border-radius: .5em;
    /* border : var(--testing); */
    animation: slideIn1 0.5s ease 0.1s forwards;
}

.book-section .one,
.book-section .two,
.book-section .three,
.book-section .four,
.book-section .five,
.book-section .six,
.book-section .seven {
    transition: var(--transition);
}

.book-section .open .one {
    z-index: 6;
    width: 92%;
    height: 97%;
    background-color: rgba(224, 224, 224, .9);
}

.book-section .open .two {
    z-index: 5;
    width: 93%;
    height: 96%;
    background-color: rgba(224, 224, 224, .85);
}

.book-section .open .three {
    z-index: 4;
    width: 94%;
    height: 95%;
    background-color: rgba(224, 224, 224, .75);
}

.book-section .open .four {
    z-index: 3;
    width: 95%;
    height: 94%;
    background-color: rgba(224, 224, 224, .65);
}

.book-section .open .five {
    z-index: 2;
    width: 96%;
    height: 93%;
    background-color: rgba(224, 224, 224, .6);
}

.book-section .open .six {
    z-index: 2;
    width: 97%;
    height: 92%;
    background-color: rgba(224, 224, 224, .6);
}

.book-section .open .seven {
    z-index: 2;
    width: 98%;
    height: 91%;
    background-color: rgba(224, 224, 224, .65);
}

.book-section .dribbble {
    margin-top: 1em;
    width: 10em;
    height: 2em;
    /* border : var(--testing); */
}

.book-section .dribbble img {
    width: 100%;
    height: 100%;
    /* border: var(--testing); */
    flex: 2;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.2));
    cursor: pointer;
}

.book-section .dribbble a {
    flex: 5;
    font-size: var(--fontSizeMedium);
    text-decoration: none;
    color: var(--fontColorSecondary);
    text-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

@keyframes open {
    to {
        transform: translateX(-10%) rotateY(-6deg) translateZ(8px);
    }
}

@keyframes slideIn1 {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(0%);
    }

    100% {
        opacity: 1;
        transform: translateY(-50%) translateX(10%);
    }
}

@keyframes slideIn2 {
    0% {
        opacity: 0;
        transform: translateX(0%);
    }

    100% {
        opacity: 1;
        transform: translateX(10%);
    }
}

@keyframes loading {
    to {
        transform: rotateZ(30deg) translateY(-20%) translateX(300%);
    }
}

@media only screen and (max-width : 800px) {
    .book-section .book {
        height: 20em;
    }
}

@media only screen and (max-width: 1750px) {
    :root {
        --fontSizeLarge: 1.8em;
        --fontSizeSmall: 1.4em;
        --fontSizeMedium: 1.5em;
    }

    .book-section .subcontainer {
        grid-template-rows: repeat(3, 30em);
        grid-template-columns: repeat(3, 20em);
    }
}

@media only screen and (max-width: 1170px) {
    :root {
        --fontSizeLarge: 1.8em;
        --fontSizeSmall: 1.4em;
        --fontSizeMedium: 1.5em;
    }

    .book-section .subcontainer {
        grid-template-rows: repeat(6, 36em);
        grid-template-columns: repeat(2, 22em);
    }
}

@media only screen and (max-width: 750px) {
    :root {
        --fontSizeLarge: 2em;
        --fontSizeSmall: 1.6em;
        --fontSizeMedium: 1.8em;
    }

    .book-section .subcontainer {
        grid-template-rows: repeat(7, 40em);
        grid-template-columns: repeat(1, 24em);
    }
}