#flipbook-1 {
    position: relative;
    max-width: 900px;
    margin: auto;
}

.flipbook-wrapper {
    position: relative;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    overflow: hidden;
}

.fbk-flipbook {
    width: 100%;
    height: auto;
}

.fbk-page {
    background: white;
    overflow: hidden;
}

.page-canvas {
    display: block;
    margin: auto;
    max-width: 100%;
    height: auto;
}

/* Zonas clickeables para pasar página */
.nav-button {
    position: absolute;
    top: 0;
    bottom: 40px;
    /* espacio para footer */
    width: 20%;
    z-index: 20;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(0, 0, 0, 0.1);
    transition: color 0.3s;
}

.nav-button:hover {
    color: rgba(0, 0, 0, 0.4);
}

.nav-left {
    left: 0;
}

.nav-right {
    right: 0;
}

/* Estilo barra inferior */
.flipbook-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 15px;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
    font-size: 14px;
}

.flipbook-footer .page-info {
    color: #333;
}

.flipbook-footer button {
    background: #0077cc;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.flipbook-footer button:hover {
    background: #005fa3;
}

.hidden {
    display: none;
}

#spinner-container.loading {
    width: 100px; /* Un poco más grande que el spinner */
    height: 100px;
    margin: 40px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenedor del spinner */
.flipbook-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Spinner */
.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #0077cc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}