.pdf-viewer {
    width: 100%; /* Changed from #pdf-viewer */
    height: 90vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    margin: 20px 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pdf-container {
    flex: 1;
    overflow: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    /* Scrollbar styles */
    scrollbar-width: auto;
    scrollbar-color: #888 #ffffff;
}

/* Custom scrollbar styling */
.pdf-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pdf-container::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 6px;
}

.pdf-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
    border: 3px solid #ffffff;
}

.pdf-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.page-wrapper {
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background: white;
    display: inline-block;
    max-width: 100%;
}

.pdf-page {
    display: block;
    max-width: 100%;
}

.pdf-page-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    pointer-events: none;
}

.pdf-controls {
    background: #333;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    z-index: 100;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-level {
    color: white;
    min-width: 60px;
    text-align: center;
    font-size: 14px;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #4285f4;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.zoom-btn:hover {
    background: #2b6cd4;
}

.top-btn {
    padding: 8px 16px;
    border: none;
    background: #4285f4;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.top-btn:hover {
    background: #2b6cd4;
}

.fullscreen-btn {
    padding: 8px 16px;
    border: none;
    background: #673ab7;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.fullscreen-btn:hover {
    background: #512da8;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 18px;
}


/* Responsive styles for different screen sizes */
@media screen and (max-width: 1200px) {
    .pdf-viewer {
        height: 65vh;
    }
}


@media screen and (max-width: 600px) {
    .pdf-container {
        height: 40vh;
        padding: 0;
        
    }
    
    .pdf-viewer {
        height: 40vh;
       
        margin: 10px 0;
    }
    
    .zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .pdf-controls {
        padding: 8px;
        gap: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .zoom-level {
        min-width: 45px;
        font-size: 12px;
    }
    
    .top-btn,
    .fullscreen-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .page-wrapper {
        margin-bottom: 8px;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    }
    
    .pdf-page-number {
        font-size: 10px;
        padding: 2px 6px;
        bottom: 3px;
        right: 3px;
    }
    
    .loading-indicator {
        padding: 8px 16px;
        font-size: 14px;
    }
}