@font-face {
    font-family: 'ArabicFont';
    src: url('/fonts/ar.otf');
}

@font-face {
    font-family: 'Rubik-Regular';
    src: url('/fonts/Rubik-Regular.ttf');
}

@font-face {
    font-family: "Atkinson-Hyperlegible-Regular";
    src: url(/fonts/AtkinsonHyperlegible-Regular.ttf);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bookshelf-container {
    color: var(--color-text);
    font-family: "Atkinson-Hyperlegible-Regular";
    padding: 1rem;
    margin-bottom: 1em;
}

.bookshelf-container .shelf-dir {
    margin: 0.3em 0 1em 0;
    font-size: 1.8em;
    font-weight: 800;
}


.shelf-container {
    margin: 1rem 0;
}

.shelf {
    margin-bottom: 1rem;
}

.shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.shelf-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-text);
    font-family: "Atkinson-Hyperlegible-Regular";
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    color: var(--color-secondary);
    user-select: none;
}

.view-all:hover {
    color: var(--color-text);
}

.books-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
}

.books-scroll::-webkit-scrollbar {
    height: 6px;
}

.books-scroll::-webkit-scrollbar-thumb {
    background: var(--color-text);;
    border-radius: 3px;
}

.book-cover {
    height: 220px;
    object-fit: contain;
    transition: opacity 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
    max-width: none;
    border: 0.1px solid #303030ac;
}

.book-cover:hover {
    opacity: 0.6;
}

.book-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000c8;
    backdrop-filter: blur(2px);
    z-index: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    font-family: "Atkinson-Hyperlegible-Regular";
    background: var(--color-main);
    border: 1.7px solid var(--color-bord);
    padding: 1rem;
    max-width: 300px;
    width: 90%;
    border-radius: 8px;
    position: relative;
    margin: 1em;
    display: flex;
    align-items: center;
    flex-direction: column;

}


.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    color: var(--color-secondary);
    user-select: none;
}


.back-button:hover {
    color: var(--color-text);
}

.full-view .books-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 1000px) {
    .full-view .books-flex {
        gap: 1.2rem;
    }
}

@media (max-width: 600px) {
    .full-view .books-flex {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .book-cover {
        height: 180px;
    }

    .bookshelf-container .shelf-dir {
        font-size: 1.1em;
    }


    .shelf-title {
        font-size: 1.1rem;
        margin-right: 0.7em;
    }

    .view-all {
        font-size: 0.75em;
        white-space: nowrap;
    }

}

#modalCover {
    border-radius: 4px;
    height: auto;
}

#modalTitle {
    text-align: center;
    color: var(--color-text);
    font-size: 1.6em;
    font-weight: 800;
    margin: 0;
    font-family: "Atkinson-Hyperlegible-Regular", 'ArabicFont';
}

#modalDescription {
    text-align: center;
    color: var(--color-secondary);
    font-size: 0.9em;
    margin: 0;
    font-family: "Atkinson-Hyperlegible-Regular", 'Rubik-Regular';
}

#modalAuthor {
    text-align: center;
    color: var(--color-secondary);
    font-size: 0.9em;
    margin-top: 2.5em;
    margin-bottom: 0;
    font-family: "Atkinson-Hyperlegible-Regular", 'Rubik-Regular';
}