@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    display: grid;
    place-content: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: #000000;
    padding: 10px;
}

.site-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 120px;
    z-index: 9999;
    pointer-events: none;
}

.flipbook {
    /* Dimensions are set dynamically by JavaScript */
    max-width: 100%;
    max-height: 100%;
}

.flipbook .hard {
    background: #fff !important;
    color: #000000;
    font-weight: bold;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 0;
    margin: 0;
}

.flipbook .hard small{
    font-style: italic;
    font-weight: lighter;
    font-size: 16px;
    letter-spacing: 1px;
    margin-top: 10px;
    opacity: 0.9;
}

.flipbook .page {
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    border: none !important;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.page canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

.page img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flipbook .page small{
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c1810;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-description {
    font-size: 13px;
    color: #666;
    text-align: center;
    max-width: 80%;
    line-height: 1.5;
}

.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 100px;
    font-weight: 300;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 1000;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-arrow:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.2);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                 0 0 40px rgba(255, 255, 255, 0.6);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(1.0);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.prev-arrow {
    left: 40px;
}

.next-arrow {
    right: 40px;
}

.nav-arrow.animating {
    pointer-events: none;
    opacity: 0.5;
}

/* Download Button */
.download-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 10000;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Pagination Dots */
.pagination-dots {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 10000;
}

.pagination-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.pagination-dot.active {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8),
                0 0 24px rgba(255, 255, 255, 0.4);
}

.pagination-dot.near {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.pagination-dot.far {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
}

.pagination-dot.hidden {
    opacity: 0;
    transform: scale(0);
    width: 0;
    margin: 0;
    padding: 0;
}

.pagination-dot:hover:not(.hidden) {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.download-btn svg {
    width: 28px;
    height: 28px;
    transition: all 0.4s ease;
}

.download-btn:hover {
    transform: scale(1.2);
}

.download-btn:hover svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 16px rgba(255, 255, 255, 0.6));
}

.download-btn:active {
    transform: scale(1.0);
}

.download-btn:active svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-btn.downloading:hover {
    transform: scale(1.0);
}

/* Download Progress Bar */
.download-progress {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.download-btn.downloading .download-progress {
    opacity: 1;
}

.download-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 255, 255, 0.6) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8),
                0 0 16px rgba(255, 255, 255, 0.4);
}

.download-btn.downloading .download-progress::after {
    animation: progressGlow 1.5s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8),
                    0 0 16px rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 255, 255, 1),
                    0 0 24px rgba(255, 255, 255, 0.6);
    }
}

/* Remove any shadows or borders from turn.js */
.flipbook .page,
.flipbook .own-size,
.flipbook > div {
    box-shadow: none !important;
    border: none !important;
}

/* Tablet styles */
@media screen and (max-width: 1024px) {
    body {
        padding: 5px;
    }
    
    .site-logo {
        width: 80px;
        top: 10px;
        left: 10px;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 36px;
    }
    
    .prev-arrow {
        left: 20px;
    }
    
    .next-arrow {
        right: 20px;
    }
    
    .download-btn {
        width: 45px;
        height: 45px;
        bottom: 25px;
        right: 25px;
    }
    
    .pagination-dots {
        bottom: 25px;
        gap: 5px;
    }
    
    .pagination-dot {
        width: 5px;
        height: 5px;
    }
    
    .pagination-dot.active {
        width: 9px;
        height: 9px;
    }
    
    .pagination-dot.near {
        width: 7px;
        height: 7px;
    }
    
    .pagination-dot.far {
        width: 4px;
        height: 4px;
    }
    
    .download-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .flipbook .hard {
        font-size: 24px;
    }
    
    .flipbook .hard small {
        font-size: 14px;
    }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    body {
        padding: 0;
        overflow-x: hidden;
    }
    
    .site-logo {
        width: 60px;
        top: 10px;
        left: 10px;
    }
    
    /* Don't override dimensions - let JavaScript handle it */
    .flipbook {
        /* Size is set by JS */
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 32px;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .prev-arrow {
        left: 10px;
    }
    
    .next-arrow {
        right: 10px;
    }
    
    .download-btn {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }
    
    .pagination-dots {
        bottom: 20px;
        gap: 4px;
    }
    
    .pagination-dot {
        width: 4px;
        height: 4px;
    }
    
    .pagination-dot.active {
        width: 8px;
        height: 8px;
    }
    
    .pagination-dot.near {
        width: 6px;
        height: 6px;
    }
    
    .pagination-dot.far {
        width: 3px;
        height: 3px;
    }
    
    .download-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .download-progress {
        width: 50px;
    }
    
    .flipbook .hard {
        font-size: 20px;
        padding: 15px;
    }
    
    .flipbook .hard small {
        font-size: 12px;
    }
    
    .page-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .page-description {
        font-size: 12px;
    }
    
    .flipbook .page small {
        font-size: 12px;
    }
}

/* Small mobile styles */
@media screen and (max-width: 480px) {
    .site-logo {
        width: 50px;
        top: 8px;
        left: 8px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .prev-arrow {
        left: 5px;
    }
    
    .next-arrow {
        right: 5px;
    }
    
    .download-btn {
        width: 38px;
        height: 38px;
        bottom: 15px;
        right: 15px;
    }
    
    .pagination-dots {
        bottom: 15px;
        gap: 3px;
    }
    
    .pagination-dot {
        width: 3px;
        height: 3px;
    }
    
    .pagination-dot.active {
        width: 7px;
        height: 7px;
    }
    
    .pagination-dot.near {
        width: 5px;
        height: 5px;
    }
    
    .pagination-dot.far {
        width: 3px;
        height: 3px;
    }
    
    .download-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .download-progress {
        width: 45px;
    }
    
    .flipbook .hard {
        font-size: 18px;
        letter-spacing: 2px;
        padding: 10px;
    }
    
    .flipbook .hard small {
        font-size: 11px;
    }
    
    .page-title {
        font-size: 14px;
    }
    
    .page-description {
        font-size: 11px;
        max-width: 90%;
    }
}

/* Landscape mobile optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
    
    .site-logo {
        width: 40px;
        top: 5px;
        left: 5px;
    }
    
    .download-btn {
        width: 35px;
        height: 35px;
        bottom: 10px;
        right: 10px;
    }
    
    .pagination-dots {
        bottom: 10px;
        gap: 3px;
    }
    
    .pagination-dot {
        width: 3px;
        height: 3px;
    }
    
    .pagination-dot.active {
        width: 6px;
        height: 6px;
    }
    
    .pagination-dot.near {
        width: 5px;
        height: 5px;
    }
    
    .pagination-dot.far {
        width: 2px;
        height: 2px;
    }
    
    .download-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .download-progress {
        width: 40px;
        bottom: -6px;
    }
}