.pdf-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    direction: rtl;
}

.pdf-modal-content {
    background-color: #fefefe;
    margin: 1% auto;
    padding: 15px;
    border: 1px solid #888;
    width: auto;
    height: auto;
    max-width: 75%;
    max-height: 96%;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    align-items: center;
    /* Center horizontally */
    justify-content: center;
    /* Center vertically if height allows */
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* RTL: Mirror the flipbook so it opens from the right */
#flipbook {
    transform: scaleX(-1);
}

/* Un-mirror the content so pages display correctly */
.my-page canvas {
    transform: scaleX(-1);
}

/* Button hover */
#modal-prev-btn:hover,
#modal-next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Click zone visual feedback */
#click-zone-left:hover,
#click-zone-right:hover {
    background: rgba(0, 0, 0, 0.02);
}

@keyframes pulseLogo {
    0% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}