.catalog-page-container {
    min-height: 100vh;
    background: #f5f5f5;
}

.catalog-header {
    background: #000000;
    color: white;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 9999998;
}

.catalog-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-logo {
    height: 40px;
    margin-right: 15px;
}

.catalog-header h1 {
    flex: 1;
    font-size: 20px;
    margin: 0;
}

.catalog-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.catalog-back-btn,
.catalog-logout-btn {
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
    font-size: 12px;
}

.catalog-back-btn:hover,
.catalog-logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.catalog-viewer-container {
    max-width: 1400px;
    margin: 10px auto;
    padding: 0 20px;
    min-height: calc(100vh - 200px);
}

.catalog-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    background: white;
    padding: 6px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0; /* Sticky at the top of the page when scrolling */
    z-index: 1000;
    margin-top: 10px;
}

.catalog-header .account-menu-container {
    z-index: 9999999 !important;
    position: relative;
}

.catalog-header .account-menu-dropdown {
    z-index: 9999999 !important;
}

.catalog-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.catalog-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.catalog-btn:active {
    transform: translateY(0);
}

.download-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.fullscreen-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.page-info {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0 15px;
}

.book-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 1px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: auto;
    position: relative;
}

.book {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    width: 100%;
    max-width: 1200px;
}

.page {
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 0.6s ease;
}

.left-page {
    width: 100%;
    max-width: 100%;
}

.catalog-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 4px;
}

#pdfCanvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 4px;
}

.catalog-zoom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.zoom-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    min-width: 35px;
    transition: background 0.2s;
}

.zoom-btn:hover {
    background: #764ba2;
}

.reset-btn {
    background: #95a5a6;
    font-size: 11px;
    padding: 6px 10px;
}

.reset-btn:hover {
    background: #7f8c8d;
}

.zoom-level {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
    text-align: center;
    padding: 0 5px;
}

/* Fullscreen styles */
.book-container:fullscreen {
    background: #000;
    padding: 20px;
}

.book-container:fullscreen .book {
    max-width: 100%;
    height: 100%;
}

.book-container:fullscreen .catalog-image {
    max-height: 100vh;
    object-fit: contain;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .catalog-header {
        padding: 10px 15px;
    }
    
    .catalog-header-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .catalog-logo {
        height: 35px;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .catalog-header h1 {
        font-size: 16px;
    }
    
    .catalog-viewer-container {
        padding: 0 10px;
        margin: 5px auto;
    }
    
    .catalog-controls {
        padding: 5px 8px;
        gap: 6px;
        margin-bottom: 8px;
        top: 0; /* Sticky at the top on mobile too */
    }
    
    .catalog-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .page-info {
        font-size: 12px;
        padding: 0 8px;
    }
    
    .book-container {
        padding: 20px 10px;
        min-height: 400px;
    }
    
    .zoom-btn {
        padding: 5px 10px;
        font-size: 14px;
        min-width: 30px;
    }
    
    .reset-btn {
        font-size: 10px;
        padding: 5px 8px;
    }
    
    .zoom-level {
        font-size: 11px;
        min-width: 45px;
        padding: 0 3px;
    }
}

/* Scrollbar styling */
.book-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.book-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.book-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 6px;
}

.book-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.catalog-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
    background: #f5f5f5;
    margin-top: auto;
}

