body {
    margin: 0;
    padding: 0;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: sans-serif;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.flip-book {
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: none; /* Hidden until loaded */
}

.page {
    background-color: white;
    padding: 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.page canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Loading indicator */
.Leyendo {
    color: white;
    font-size: 1.2rem;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 2000;
}

.Leyendo::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Bottom Controls Bar */
.bottom-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    gap: 20px; /* Space between groups */
    align-items: center;
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Vertical divider between groups */
.control-group:not(:last-child)::after {
    content: '';
    display: block;
    width: 1px;
    height: 20px;
    background: #555;
    margin-left: 10px;
}

.bottom-controls button {
    background: #555;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.bottom-controls button:hover {
    background: #777;
}

.bottom-controls input {
    background: #333;
    border: 1px solid #555;
    color: white;
    border-radius: 5px;
    padding: 5px;
    width: 50px;
    text-align: center;
    font-size: 1rem;
}

.bottom-controls span {
    font-family: sans-serif;
    font-size: 1rem;
}
