body {
    background-color: #222;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.pdf-viewer-container {
    width: 100%;
    height: auto; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}


#pdf-viewer {
    width: 100%;
    height: auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto; 
    overflow-x: hidden;
}


#pdf-viewer canvas {
    max-width: 90%;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    background-color: #fff;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}


.zoomed canvas {
    max-width: none;
    max-height: auto;
    box-shadow: none;
    border-radius: 0;
}


#loading-container,
#error-message {
    position: fixed; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    padding: 20px 40px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 200;
}

.loading-spinner {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.alert-message p {
    margin: 0;
    font-size: 1.1rem;
}


.controls-bar {
    position: fixed; 
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50px;
    z-index: 100;
    touch-action: manipulation;
}

.page-info {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-btn .fa-search-plus, .nav-btn .fa-search-minus {
    font-size: 1.2rem;
}

@media (max-width: 820px) {
    #zoom-toggle {
        display: none;
    }
}

@media (min-width: 821px) {
    .controls-bar {
        left: 50%;
        bottom: 20px;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 25px;
        padding: 12px 25px;
    }
}