.flipbook-viewport {
    width: 100%;
    height: auto;
    position: relative;
    margin: 20px auto;
    overflow: hidden;
    display: none; /* Oculto inicialmente */
}
.flipbook {
    width: 100%;
    height: 100%;
}
.flipbook .page {
    background: #fff;
}
.flipbook .page canvas {
    width: 100%;
    height: auto;
}
.nav-buttons {
    text-align: center;
    margin: 10px 0;
    display: none; /* Oculto inicialmente */
}
.nav-buttons button {
    margin: 0 5px;
    padding: 5px 15px;
}
.zoom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    overflow: hidden;
}
.zoom-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
}
.zoom-content canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.zoom-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
}
.pdf-loader {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}
.pdf-loader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 100;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: rgba(0,0,0,0.8);
}

.fullscreen-btn svg {
    width: 16px;
    height: 16px;
}


/* Estilos para las páginas */
.flipbook-viewport-single .page,
.flipbook-viewport .page {
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    background-color: white;
}

/* Ajustes para pantalla completa */
.flipbook-viewport-single.fullscreen-active {
    background: white;
}

.flipbook-viewport-single.fullscreen-active .flipbook-single {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Ajustar para dispositivos móviles */
@media (max-width: 768px) {
    .flipbook-viewport-single.fullscreen-active {
        padding: 10px;
    }
    
    .fullscreen-btn {
        top: 10px;
        right: 10px;
    }
}