/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #121620; /* Dark background */
    color: #ffffff;
    font-family: sans-serif;
    overflow-y: scroll; /* Always show scrollbar to prevent layout shift */
}

/* Main Container */
#pdf-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px 0;
}

/* Page Wrapper */
.page-container {
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-color: #1b212f; /* Placeholder color while loading */
}

canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* Loading Spinner */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121620;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(189, 155, 101, 0.3); /* Gold tint */
    border-radius: 50%;
    border-top-color: #bd9b65; /* Gold */
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Download Button (Floating) */
.download-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #bd9b65;
    color: #121620;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(189, 155, 101, 0.4);
    transition: transform 0.2s ease;
    z-index: 100;
    font-size: 14px;
    text-transform: uppercase;
}

.download-btn:hover {
    transform: translateY(-2px);
}
