/* Fullscreen Single Page Book Styles */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Prevent scrolling, we'll handle swipe/slide */
    background: #fefefe;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-saffron) 0%, var(--secondary-gold) 100%);
    color: white;
    font-weight: 600;
    z-index: 100;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.back-btn {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.fullscreen-book-container {
    position: relative;
    width: 100vw;
    height: calc(100vh - 60px); /* Adjust for header height approx */
    overflow: hidden;
    background: #f5eedc;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

/* Page base styles */
.sp-page {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    box-sizing: border-box;
    padding: 2rem 15vw; /* Margins for readability */
    background: linear-gradient(to bottom, #f5eedc 0%, #e8dcb5 100%);
    overflow-y: auto;
    position: relative;

    /* Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-saffron) transparent;
}

.sp-page::-webkit-scrollbar {
    width: 6px;
}
.sp-page::-webkit-scrollbar-thumb {
    background-color: rgba(255, 107, 53, 0.5);
    border-radius: 3px;
}

/* Page Content Formatting */
.page-inner-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255,255,255,0.5);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    min-height: calc(100% - 6rem);
    position: relative;
    border: 1px solid rgba(212, 192, 152, 0.5);
}

/* Cover Style */
.sp-cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    border: 8px solid var(--primary-saffron);
    background: linear-gradient(135deg, rgba(255,107,53,0.1) 0%, transparent 100%);
}

.sp-title {
    font-size: 3.5rem;
    color: var(--primary-saffron);
    margin-bottom: 1rem;
    font-weight: 700;
}

.sp-subtitle {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-style: italic;
}

/* Index Style */
.sp-index-title {
    font-size: 2.2rem;
    color: var(--primary-saffron);
    border-bottom: 2px solid var(--secondary-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.sp-index-list {
    list-style: none;
    padding: 0;
}

.sp-index-item {
    padding: 1rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s, background 0.3s;
}

.sp-index-item:hover {
    color: var(--primary-saffron);
    background: rgba(255, 107, 53, 0.05);
}

/* Entity Style */
.sp-entity-page {
    text-align: center;
}

.sp-entity-name {
    font-size: 3rem;
    color: var(--primary-saffron);
    margin-bottom: 0.5rem;
}

.sp-entity-subtitle {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.sp-entity-details {
    text-align: left;
    margin-top: 2rem;
    font-size: 1.2rem;
}

.sp-detail-row {
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sp-detail-label {
    font-weight: 600;
    color: var(--text-dark);
    display: inline-block;
    width: 150px;
}

/* Navigation Overlays */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-saffron);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: background 0.3s, transform 0.3s;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:disabled {
    background: rgba(200, 200, 200, 0.5);
    color: #999;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.prev-btn { left: 2vw; }
.next-btn { right: 2vw; }

/* Page Number */
.sp-page-number {
    position: absolute;
    bottom: 1rem;
    right: 2rem;
    font-size: 1rem;
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sp-page {
        padding: 1rem 5vw;
    }

    .page-inner-content {
        padding: 1.5rem;
    }

    .sp-title {
        font-size: 2.5rem;
    }

    .sp-entity-name {
        font-size: 2rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}
