/* PDF Flipbook Viewer Styles */
.pdf-viewer-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.pdf-title {
    font-size: 20px;
    font-weight: 600;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.btn-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-control svg {
    width: 20px;
    height: 20px;
}

.page-info {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 80px;
    text-align: center;
}

.pdf-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
    position: relative;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

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

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

.pdf-canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 80vh;
    overflow: auto;
    padding: 20px;
}

#pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    background: white;
}

.flipbook-container {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    margin: 0 auto;
}

.error-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.error-message p {
    font-size: 18px;
    margin-bottom: 20px;
}

.error-message a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    transition: border-color 0.3s ease;
}

.error-message a:hover {
    border-color: white;
}

/* Fullscreen styles */
.pdf-viewer-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.pdf-viewer-container.fullscreen #flipbook {
    width: 90vw;
    height: calc(100vh - 120px);
}

/* Responsive */
@media (max-width: 768px) {
    .pdf-viewer-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pdf-title {
        max-width: 100%;
        font-size: 18px;
    }
    
    .pdf-controls {
        align-self: stretch;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    #flipbook {
        width: 95vw;
        height: 400px;
    }
    
    .btn-control {
        height: 44px;
        width: 44px;
    }
}