body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: Arial, sans-serif;
}

#pdfViewer {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #000;
}

.page-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    opacity: 0;
    transform: scale(1.05);
    transition: all 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.page-container.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.page-container.fading-out {
    opacity: 0;
    transform: scale(0.95);
    z-index: 1;
}

.page-container.next-entering {
    opacity: 0;
    transform: translateY(100%) scale(0.9);
}

.page-container.prev-entering {
    opacity: 0;
    transform: translateY(-100%) scale(0.9);
}

.page-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    right: 40px;
    opacity: 0.8;
    transition: all 0.6s ease;
    z-index: 50;
    pointer-events: none;
}

.scroll-indicator.hidden {
    opacity: 0;
    transform: translateX(20px) translateY(20px);
}

.scroll-arrow {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseFloat 3s ease-in-out infinite;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 70%);
    backdrop-filter: blur(15px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 4s ease-in-out infinite;
}

.scroll-arrow::after {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 3px solid rgba(255, 255, 255, 0.9);
    border-bottom: 3px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    margin-top: -3px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

@keyframes pulseFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        border-color: rgba(255, 255, 255, 0.6);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    25% {
        transform: translateY(-8px) scale(1.05);
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow:
            0 12px 40px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.2);
    }

    50% {
        transform: translateY(-12px) scale(1.08);
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow:
            0 16px 48px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 25px rgba(255, 255, 255, 0.3);
    }

    75% {
        transform: translateY(-8px) scale(1.05);
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow:
            0 12px 40px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.2);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }

    100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00c851, #007e33);
    width: 9.09%;
    /* 1/11 pages = 9.09% */
    transition: width 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(0, 200, 81, 0.5);
}

/* Dot Navigation */
.dot-navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 12px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.dot.active {
    background: #00c851;
    box-shadow: 0 0 15px rgba(0, 200, 81, 0.6);
    transform: scale(1.3);
}

/* Loading animation for images */
.page-image.loading {
    opacity: 0.5;
}

.page-image.loaded {
    opacity: 1;
}

/* Mobile Device Optimizations */
.mobile-device .page-image {
    object-fit: contain !important;
}

.mobile-device .scroll-indicator {
    bottom: 25px;
    right: 25px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Adjust page image for mobile */
    .page-image {
        object-fit: contain; /* Show full page instead of cropping */
        object-position: center;
    }
    
    /* Make progress bar thicker on mobile */
    .progress-container {
        height: 6px;
    }
    
    /* Larger dots for easier touch */
    .dot-navigation {
        right: 15px;
        padding: 15px 8px;
        gap: 15px;
    }
    
    .dot {
        width: 16px;
        height: 16px;
    }
    
    .dot:hover {
        transform: scale(1.1); /* Less aggressive scaling */
    }
    
    .dot.active {
        transform: scale(1.2);
    }
    
    /* Adjust scroll indicator for mobile */
    .scroll-indicator {
        bottom: 30px;
        right: 30px;
    }
    
    .scroll-arrow {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    /* Very small screens */
    .dot-navigation {
        right: 10px;
        padding: 12px 6px;
        gap: 12px;
    }
    
    .dot {
        width: 14px;
        height: 14px;
    }
    
    .scroll-indicator {
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-arrow {
        width: 40px;
        height: 40px;
    }
}