body {
    width: 100%;
    background-color: rgb(235, 235, 235);
}

#flipbook {
    width: 1080px;
    height: 702px;
    margin: auto;
    overflow-x: hidden;
}
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin: auto;
    width: 100%;
}

.nav-buttons button {
    padding: 10px 15px;
    font-size: 16px;
    background-color: rgba(254,0,0,255);
    color: white;
    border: none;
    cursor: pointer;
    margin: 1rem;
    border-radius: 3rem;
    transition: 0.2s ease;
    z-index: 1005;
}

.nav-buttons button:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    color: rgba(254,0,0,255);
    background-color: white;
}

.progress-container {
    width: 90%;
    height: 10px;
    background-color: #ddd;
    margin: 2rem auto;
    border-radius: 1rem;
    z-index: 1004;
}

.progress-bar {
    width: 0;
    height: 100%;
    background-color: rgba(254, 0, 0, 255);
    transition: width 0.5s ease;
    border-radius: 1rem;
}

.button-book-container {
    display: flex;
    align-items: center;
    overflow-y:hidden;
    position: absolute;
    width: 100%;
    height: 100%
}

.block-box {
    position: fixed; /* Changed to fixed to stay on top during page flip */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001; /* Higher than flipbook z-index */
}

.block {/* Maintain absolute positioning within the .block-box */
    width: 100%; 
    padding-top: calc(100% * 8 / 11.55);
    z-index: 1002; /* Ensure it's above the block-box */
}

.brick {
    width: 100%;
    height: 100%;
    background-color: rgb(235, 235, 235);
    opacity: 1; /* Set opacity as needed */
    z-index: 1003; /* Ensure it sits on top of both block and block-box */

}

.ui {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0.5;
    width: 100%; 
    height: 100%;
    z-index: 1005;
}

.flipbook-container {
    display: none; /* Default state, shown only for larger screens */
}

.pdf-container {
    display: none; /* Default state, shown only for mobile screens */
}

/* Container for scrollable PDF */
.pdf-container {
    width: 100%;
    height: 100vh; /* Full viewport height */
    overflow-y: scroll; /* Enable scrolling */
    padding: 10px;
    box-sizing: border-box;
}

/* Ensure each page of the PDF is as wide as the screen */
.pdf-container canvas {
    width: 100% !important; /* Force canvas to be 100% width */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 10px; /* Add some space between pages */
}

/* WebKit-based browsers (Chrome, Safari, etc.) */
.pdf-container::-webkit-scrollbar {
    width: 12px; /* Width of the scrollbar */
}

.pdf-container::-webkit-scrollbar-thumb {
    background-color: red; /* Red color for the thumb */
    border-radius: 6px; /* Rounded corners for the thumb */
}

.pdf-container::-webkit-scrollbar-track {
    background-color: #f0f0f0; /* Light background for the track */
}

/* Firefox */
.pdf-container {
    scrollbar-color: red #f0f0f0; /* Thumb color | Track color */
    scrollbar-width: thin; /* Thin scrollbar */
}


@media (max-width: 768px) {
    .button-book-container,
    .ui {
        display: none; /* Hide the flipbook and controls */
    }

    #pdf-scroll-container {
        display: block; /* Show the scrollable PDF container */
        overflow-y: auto;
        max-height: 100vh; /* Ensure it scrolls within the viewport */
    }
}

@media (min-width: 769px) {
    #pdf-scroll-container {
        display: none; /* Hide the scrollable PDF on larger screens */
    }
}
