.main-section {
    display: flex;
    height: calc(100vh - 450px);
    gap: 20px;
}

.left-sidebar {
    width: 250px;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    padding: 10px;
    background: #f9f9f9;
}

.pdf-container {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#pdf-viewer {
    width: 100%;
    flex: 1;
    border: none;
}

/* Collapsible List Styling */
#library-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.letter-heading {
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    padding: 5px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.file-group {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}

.file-item {
    cursor: pointer;
    padding: 2px 0;
}

.file-item:hover {
    text-decoration: underline;
}

.file-item.selected {
    font-weight: bold;
}

/* Ensure left sidebar scrolls */
.left-sidebar {
    overflow-y: auto;
}

/* Responsive layout */
@media (max-width: 768px) {
    .main-section {
        flex-direction: column;
        height: auto;
    }

    .left-sidebar {
        width: 100%;
        max-height: 200px;
    }

    .pdf-container {
        height: auto;
    }
}
