html, body {
    height:100%;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    padding: 2px;
    background-color: #333;
    color: white;
    text-align: center;
}

.sub-container{
    display: flex;
    flex-direction: row-reverse;
}

.search-box{
    width:25%;
    direction: rtl;
    border: 1px solid black;
    padding-top:20px;
}

.book-shelf{
    width:75%;
    border-bottom: 1px solid black;
    border-top: 1px solid black;
    border-left: 1px solid black;
}

form input, form select {
    padding: 10px;
    margin-right: 10px;
    font-size: 16px;
}

button {
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

.book-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 10px;
    margin:20px;
}

.card {
    background-color: #fff;
    border: 1px solid #ddd;
    margin: 10px;
    padding: 20px;
    width: 200px;
    text-align: center;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 2px 0px;
}

.card h3{
    font-size: 20px;
    margin:10px 0;
    font-weight: bold;
}

#text-content {
    display: block;
}

.view-pdf-btn{
    background-color: #084772;
    border-radius: 5px;
}

footer{
    background-color: black;
    color:white;
    text-align: center;
    padding:1px 0;
    bottom:0;
    width:100%;
  	direction:rtl;
}

/* Style for the modal */
.word-search-modal {
    display: none;
    direction: rtl;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal content styling */
.word-search-modal .modal-content {
    background: white;
    padding: 20px;
    width: 60%;
    max-height: 80%;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Close button */
.word-search-modal .close-btn {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color:red;
}

/* Scrollbar styling */
.word-search-modal .modal-content::-webkit-scrollbar {
    width: 11px;
}

.word-search-modal .modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.word-search-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Prevent background scroll when modal is open */
.modal-open {
    overflow: hidden;
}

@media (max-width:700px){
    .word-search-modal .modal-content {
        width:80%;
    }
}

@media (max-width:500px){
    .word-search-modal .modal-content {
        width:90%;
    }
}