body { 
    background: #222; 
    margin: 0; 
    font-family: sans-serif; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
}

#book-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}

.flipbook {
    transition: opacity 0.5s;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.page {
    background: white;
    width: 100%;
    height: 100%;
    position: relative;
    user-select: none;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-controls {
    height: 70px;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: white;
    border-top: 1px solid #333;
}

.footer-controls button {
    background: #333;
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.footer-controls button:hover {
    background: #007bff; 
}

.btn-secondary {
    background: #444 !important;
}

#page-mark {
    font-size: 14px;
    min-width: 80px;
    text-align: center;
    font-weight: 500;
}

/* Pantalla completa del loader */
#loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-container {
    position: relative;
    width: 200px; /* Ajusta al tamaño de tu logo */
    text-align: center;
}

.logo-bg {
    width: 100%;
    opacity: 0.2; /* Logo en gris o tenue */
}

.logo-fill {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 0%; /* Empezará vacío e irá subiendo */
    overflow: hidden;
    transition: height 0.3s ease;
}

.logo-fill img {
    width: 200px; /* Debe ser igual al ancho del contenedor */
    display: block;
}

#loader-text {
    color: white;
    margin-top: 15px;
    font-weight: bold;
    font-family: sans-serif;
}

.hotspot-area {
    pointer-events: auto !important;
    display: block;
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul en móviles */
}

