/* =========================================================================
   Revista Futebol - Flipbook Reader Styles (Sports Theme & PDF)
   ========================================================================= */

body.reader-mode {
    background: #0A0A0A;
    /* Dark background to make the magazine pop */
    overflow: hidden;
    /* Prevent scrolling, StPageFlip handles everything */
}

/* Reader Nav */
.reader-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 2px solid var(--primary);
}

.back-btn {
    color: var(--text-light-muted);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.back-btn:hover {
    color: var(--primary);
}

.reader-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-indicator {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-light-muted);
    min-width: 150px;
    text-align: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Reader Container */
.reader-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 70px;
    padding-bottom: 20px;
}

.book-wrapper {
    position: relative;
    /* Soft shadow behind the book */
    box-shadow: 0 0 80px rgba(0, 144, 58, 0.15);
    width: 95vw;
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Magazine / Pages (StPageFlip elements) */
.magazine {
    transition: transform 0.3s;
    width: 100%;
    height: 100%;
}

.page {
    background-color: #FFFFFF;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.page-content {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    background-color: white;
}

/* PDF Canvas specific */
.pdf-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures the PDF page fits without stretching incorrectly */
    display: block;
}

/* StPageFlip Center Shadow (Simulates the hinge/fold of a real book) */
.page.--left .page-content {
    background: linear-gradient(to right, #FFFFFF 92%, #e5e5e5 100%);
}

.page.--right .page-content {
    background: linear-gradient(to left, #FFFFFF 92%, #e5e5e5 100%);
}

/* Cover shadows for extra depth */
.page-cover.--left .page-content {
    box-shadow: inset -5px 0 20px rgba(0, 0, 0, 0.2) !important;
}

.page-cover.--right .page-content {
    box-shadow: inset 5px 0 20px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 768px) {
    .reader-nav {
        padding: 0.8rem;
        flex-direction: column;
        gap: 0.8rem;
        justify-content: center;
    }

    .reader-brand {
        font-size: 1.2rem;
    }

    .page-indicator {
        min-width: 100px;
        font-size: 0.9rem;
    }

    .book-wrapper {
        box-shadow: 0 0 30px rgba(0, 144, 58, 0.15);
        /* Reduced shadow glow for mobile */
    }
}