* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#flipbook {
    background: white;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

#flipbook .page {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

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

.controls {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    z-index: 100;
    transition: all 0.3s ease;
}

.controls:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.control-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.control-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
}

.control-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 5px;
}

.zoom-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.zoom-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(245, 87, 108, 0.4);
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.zoom-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
}

.zoom-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-info {
    color: #333;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 0.95rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    height: 36px;
    min-width: 80px;
    justify-content: center;
    border: 1px solid rgba(222, 226, 230, 0.5);
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    display: none;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Separadores visuales entre grupos de controles */
.controls::before {
    content: '';
    position: absolute;
    left: 33%;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.controls::after {
    content: '';
    position: absolute;
    right: 33%;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), transparent);
}

/* Efectos de sombra para el flipbook */
#flipbook .page-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .controls {
        padding: 10px 20px;
        gap: 8px;
        bottom: 20px;
    }
    
    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .page-info {
        font-size: 0.85rem;
        padding: 0 12px;
        min-width: 70px;
        height: 32px;
    }
    
    .controls::before,
    .controls::after {
        display: none;
    }
}

/* Animación sutil para los botones */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
}

.control-btn:not(:disabled) {
    animation: pulse 3s infinite;
}

.zoom-btn:not(:disabled) {
    animation: pulse 3s infinite 1.5s;
}

/* PDF Selector Styles */
.pdf-selector-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-selector-container label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    color: #333;
}

#pdf-selector {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#pdf-selector:hover {
    border-color: #aaa;
}

#pdf-selector:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}