:root {
    --primary-color: #d4af37;
    /* Metallic Gold */
    --secondary-color: #1a1a1a;
    --accent-color: #f5f5f5;
    --bg-gradient: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Background Animation */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

header {
    width: 100%;
    padding: 3rem 1rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.logo-container {
    margin-bottom: 1rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    letter-spacing: 0.2rem;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    margin: 0;
}

.sub-header {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5rem;
}

main {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: #e5c150;
}

.viewer-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    padding: 2rem;
    flex-grow: 1;
    position: relative;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    animation: fadeInContainer 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInContainer {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#canvas-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 1rem 0;
}

.pdf-page-container {
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    max-width: 100%;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pdf-page-container:hover {
    transform: scale(1.02) translateY(-10px);
    box-shadow: 0 30px 80px rgba(212, 175, 55, 0.15);
    border-color: var(--primary-color);
}

canvas,
.pdf-page-image {
    display: block;
    max-width: 100%;
    height: auto !important;
    user-select: none;
    -webkit-user-drag: none;
    filter: brightness(0.95) contrast(1.05);
    transition: filter 0.6s ease;
}

.pdf-page-container:hover .pdf-page-image {
    filter: brightness(1) contrast(1);
}

#loading-indicator {
    padding: 8rem 0;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(212, 175, 55, 0.1);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: spin 2.4s linear infinite reverse;
}


@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

footer {
    width: 100%;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2.5rem;
    }

    .sub-header {
        font-size: 0.9rem;
        letter-spacing: 0.3rem;
    }

    main {
        padding: 1rem;
    }

    .viewer-container {
        padding: 1rem;
    }

    #canvas-container {
        gap: 1rem;
    }
}