body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    height: 100vh;
    overflow: hidden; /* Evita el scroll en el body */
}

.container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 250px;
    background-color: #333;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar h2 {
    margin-top: 0;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

#pdf-list {
    list-style: none;
    padding: 0;
}

#pdf-list li {
    padding: 12px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#pdf-list li:hover {
    background-color: #555;
}

#pdf-list li.active {
    background-color: #007bff;
    font-weight: bold;
}

.viewer-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#viewer-controls {
    background-color: #444;
    color: white;
    padding: 10px;
    text-align: center;
    flex-shrink: 0; /* Evita que se encoja */
}

#viewer-controls button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#viewer-controls button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

#page-num, #page-count {
    margin: 0 15px;
    font-weight: bold;
}

#canvas-container {
    flex-grow: 1;
    overflow: auto; /* Permite scroll si el PDF es grande */
    background-color: #e0e0e0;
    text-align: center;
    padding: 20px;
    position: relative;
}

#pdf-canvas {
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#loading-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    color: #555;
}