/* Book View Styles */
.book-container {
    position: relative;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #faf4e6 0%, #f5f0e6 50%, #ede7d9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    overflow: hidden;
}

/* Chapter Navigation */
.chapter-navigation {
    position: fixed;
    left: -280px;
    top: 80px;
    width: 280px;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    z-index: var(--z-dropdown);
    transition: var(--transition-normal);
    overflow-y: auto;
}

.chapter-navigation.open {
    left: 0;
    box-shadow: var(--shadow-medium);
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-primary);
}

.nav-header h3 {
    margin: 0;
    font-size: var(--font-lg);
    color: var(--text-primary);
}

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-toggle:hover {
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.1);
}

.chapter-list {
    padding: var(--space-2);
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.chapter-item:hover {
    background-color: rgba(255, 107, 53, 0.05);
    border-color: rgba(255, 107, 53, 0.2);
    transform: translateX(4px);
}

.chapter-item.active {
    background: linear-gradient(135deg, var(--saffron), var(--gold));
    color: white;
    box-shadow: var(--shadow-medium);
}

.chapter-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-sm);
    margin-right: var(--space-3);
    flex-shrink: 0;
}

.chapter-item.active .chapter-number {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.chapter-info {
    flex: 1;
}

.chapter-name {
    font-weight: 600;
    font-size: var(--font-sm);
    margin-bottom: var(--space-1);
    line-height: 1.3;
}

.chapter-name-hindi {
    font-family: var(--font-devanagari);
    font-size: var(--font-xs);
    opacity: 0.8;
    margin-bottom: var(--space-1);
}

.verse-count {
    font-size: var(--font-xs);
    opacity: 0.7;
}

/* Book Wrapper */
.book-wrapper {
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* Book */
.book {
    position: relative;
    width: 800px;
    height: 600px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: var(--transition-slow);
}

/* Pages */
.page {
    position: absolute;
    width: 400px;
    height: 600px;
    background: linear-gradient(135deg, #fefefe 0%, #f8f8f8 100%);
    border: 1px solid #ddd;
    border-radius: var(--radius-lg);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.page-left {
    left: 0;
    transform-origin: right center;
}

.page-right {
    right: 0;
    transform-origin: left center;
}

/* Page Content */
.page-content {
    position: relative;
    padding: var(--space-8) var(--space-6);
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page-content::-webkit-scrollbar {
    display: none;
}

/* Page Decorations */
.page-decoration {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 107, 53, 0.05) 10%,
        rgba(255, 107, 53, 0.1) 50%,
        rgba(255, 107, 53, 0.05) 90%,
        transparent 100%
    );
}

.page-decoration.left {
    right: 0;
    border-left: 2px solid rgba(255, 107, 53, 0.1);
}

.page-decoration.right {
    left: 0;
    border-right: 2px solid rgba(255, 107, 53, 0.1);
}

/* Page Placeholder */
.page-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.placeholder-content h2 {
    font-family: var(--font-devanagari);
    font-size: var(--font-4xl);
    color: var(--saffron);
    margin-bottom: var(--space-4);
}

.placeholder-content .om-symbol {
    font-size: 6rem;
    color: var(--gold);
    margin-bottom: var(--space-6);
    animation: gentleFloat 4s ease-in-out infinite;
}

.placeholder-content .subtitle {
    font-style: italic;
    color: var(--text-secondary);
    font-size: var(--font-lg);
    margin-bottom: var(--space-6);
}

.decorative-border {
    width: 200px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        var(--saffron),
        var(--gold),
        var(--saffron),
        transparent
    );
    margin: 0 auto;
}

/* Verse Container */
.verse-container {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: var(--transition-normal);
}

.verse-container.current {
    background: rgba(255, 107, 53, 0.02);
    border: 2px solid rgba(255, 107, 53, 0.1);
    box-shadow: 
        0 8px 30px rgba(255, 107, 53, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.verse-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Verse Header */
.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid rgba(255, 107, 53, 0.1);
}

.chapter-info {
    text-align: left;
}

.chapter-number {
    font-size: var(--font-sm);
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: var(--space-1);
}

.chapter-name {
    font-size: var(--font-xs);
    color: var(--text-secondary);
    font-style: italic;
}

.verse-number {
    background: linear-gradient(135deg, var(--saffron), var(--gold));
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--font-sm);
    box-shadow: var(--shadow-light);
}

/* Verse Content */
.verse-content {
    margin-bottom: var(--space-6);
}

.sanskrit-text,
.translation-text,
.word-meanings {
    margin-bottom: var(--space-5);
}

.text-label {
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.text-content {
    font-size: var(--font-base);
    line-height: 1.8;
    color: var(--text-primary);
}

.sanskrit-text .text-content {
    font-family: var(--font-devanagari);
    font-size: var(--font-lg);
    font-weight: 500;
    color: var(--sanskrit-red);
    line-height: 2;
    text-align: center;
    margin-bottom: var(--space-4);
}

.sanskrit-text.featured .text-content {
    font-size: var(--font-xl);
    background: linear-gradient(135deg, var(--sanskrit-red), var(--deep-saffron));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(178, 34, 34, 0.1);
}

/* Verse Actions */
.verse-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 107, 53, 0.2);
    color: var(--primary-color);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-sm);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.action-btn[data-primary] {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-light);
}

.action-btn[data-primary]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.action-btn .material-icons {
    font-size: 18px;
}

/* Book Controls */
.book-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--space-8);
    gap: var(--space-6);
}

.page-control {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-sm);
    font-weight: 600;
    box-shadow: var(--shadow-light);
    min-width: 120px;
    justify-content: center;
}

.page-control:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.page-control:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.page-indicator {
    background: rgba(255, 255, 255, 0.9);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.current-page {
    color: var(--primary-color);
}

.page-separator {
    margin: 0 var(--space-1);
    color: var(--text-secondary);
}

/* Verse Navigation */
.verse-navigation {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    padding: var(--space-3);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 107, 53, 0.1);
    max-width: 90vw;
    overflow-x: auto;
}

.nav-slider {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.scroll-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.scroll-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transition: var(--transition-fast);
    flex-shrink: 0;
    cursor: pointer;
}

.scroll-dot:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.scroll-dot.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(255, 107, 53, 0.1);
    z-index: var(--z-fixed);
    transition: all 0.5s ease;
}

/* Hide progress bar completely in focus mode */
body.focus-mode .reading-progress {
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--gold));
    transition: width var(--transition-normal);
    width: 0%;
}

/* Quick Actions */
.quick-actions {
    position: fixed;
    bottom: var(--space-20);
    right: var(--space-6);
    z-index: var(--z-dropdown);
}

.main-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.quick-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.quick-actions.open .quick-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.quick-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Page Flip Animation */
.book.flipping-left .page-left {
    animation: flipLeft 0.8s ease-in-out;
}

.book.flipping-right .page-right {
    animation: flipRight 0.8s ease-in-out;
}

@keyframes flipLeft {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

@keyframes flipRight {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .book {
        width: 700px;
        height: 500px;
    }
    
    .page {
        width: 350px;
        height: 500px;
    }
    
    .page-content {
        padding: var(--space-6) var(--space-4);
    }
}

@media (max-width: 768px) {
    .book-container {
        padding: var(--space-4);
    }
    
    .book {
        width: 600px;
        height: 400px;
    }
    
    .page {
        width: 300px;
        height: 400px;
    }
    
    .page-content {
        padding: var(--space-4) var(--space-3);
        font-size: var(--font-sm);
    }
    
    .sanskrit-text .text-content {
        font-size: var(--font-base);
    }
    
    .verse-navigation {
        bottom: var(--space-4);
        padding: var(--space-2);
    }
    
    .quick-actions {
        bottom: var(--space-16);
        right: var(--space-4);
    }
}

@media (max-width: 480px) {
    .book {
        width: 95vw;
        height: 80vh;
        max-width: none;
        max-height: none;
    }
    
    /* Mobile: Single page view */
    .page {
        width: 100%;
        height: 100%;
        position: relative;
        border-radius: var(--radius-lg);
        transform: none !important;
    }
    
    .page-left {
        left: 0;
        right: 0;
        transform-origin: center;
    }
    
    .page-right {
        left: 0;
        right: 0;
        transform-origin: center;
        display: none; /* Hide right page on mobile by default */
    }
    
    /* Show only current page on mobile */
    body[data-mobile-page="left"] .page-right {
        display: none;
    }
    
    body[data-mobile-page="right"] .page-left {
        display: none;
    }
    
    body[data-mobile-page="right"] .page-right {
        display: block;
    }
    
    .page-content {
        padding: var(--space-4) var(--space-3);
        font-size: var(--font-sm);
        height: calc(100% - 60px); /* Leave space for swipe indicator */
    }
    
    .verse-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
        margin-bottom: var(--space-4);
    }
    
    .verse-actions {
        flex-wrap: wrap;
        gap: var(--space-2);
        justify-content: center;
    }
    
    .action-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-xs);
        flex: 1;
        min-width: 80px;
    }
    
    .book-controls {
        position: absolute;
        bottom: var(--space-4);
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        gap: var(--space-4);
        background: rgba(255, 255, 255, 0.9);
        padding: var(--space-2) var(--space-4);
        border-radius: var(--radius-lg);
        backdrop-filter: blur(10px);
    }
    
    .page-control {
        min-width: 80px;
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-xs);
        background: transparent;
        border: 1px solid rgba(255, 107, 53, 0.3);
    }
    
    .page-control:disabled {
        opacity: 0.3;
    }
    
    /* Swipe indicator */
    .swipe-indicator {
        position: absolute;
        bottom: var(--space-2);
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: var(--space-2);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: var(--space-1) var(--space-3);
        border-radius: var(--radius-lg);
        font-size: var(--font-xs);
        z-index: 10;
        opacity: 0;
        transition: var(--transition-fast);
    }
    
    .swipe-indicator.show {
        opacity: 1;
    }
    
    .swipe-indicator .material-icons {
        font-size: 14px;
    }
    
    /* Touch feedback */
    .book.swiping {
        transition: transform 0.1s ease-out;
    }
    
    .book.swipe-left {
        transform: translateX(-20px);
    }
    
    .book.swipe-right {
        transform: translateX(20px);
    }
}

/* Focus Mode Styles */
body.focus-mode {
    overflow: hidden;
    background: linear-gradient(135deg, #f5f0e6 0%, #ede7d9 50%, #faf4e6 100%);
    transition: all 0.5s ease;
}

body.focus-mode * {
    transition: all 0.3s ease;
}

.book-container.focus-mode-zoom {
    background: transparent;
    transform: none;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: var(--space-6);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Focus mode book adjustments */
.focus-mode .book {
    transform: none;
    filter: none;
    width: 800px;
    height: 600px;
    max-width: 90vw;
    max-height: 85vh;
}

/* Focus mode pages */
.focus-mode .page {
    background: linear-gradient(135deg, #fefefe 0%, #f8f8f8 100%);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
}

/* Enhanced typography in focus mode - subtle improvements only */
.focus-mode .sanskrit-text .text-content {
    font-size: 1.1em;
    line-height: 1.8;
    font-weight: 500;
}

.focus-mode .translation-text .text-content {
    font-size: 1.02em;
    line-height: 1.7;
}

.focus-mode .verse-header {
    font-size: 1.02em;
    font-weight: 600;
}

.focus-mode .verse-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 107, 53, 0.1);
}

/* Cursor auto-hide in focus mode */
body.cursor-hidden {
    cursor: none;
}

body.cursor-hidden * {
    cursor: none !important;
}

/* Focus mode indicator */
body.focus-mode::before {
    content: "Focus Mode - Press ESC to exit, Arrow keys to navigate";
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 10000;
    opacity: 0;
    animation: focusIndicatorShow 3s ease-in-out;
}

@keyframes focusIndicatorShow {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Smooth transitions for UI elements */
#mainHeader,
.verse-navigation,
.chapter-navigation,
.quick-actions,
.book-controls {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Focus mode responsive adjustments */
@media (max-width: 768px) {
    .book-container.focus-mode-zoom {
        padding: var(--space-4);
    }
    
    .focus-mode .book {
        width: 700px;
        height: 500px;
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .focus-mode .page {
        width: 350px;
        height: 500px;
    }
    
    .focus-mode .sanskrit-text .text-content {
        font-size: 1.08em;
        line-height: 1.7;
    }
    
    .focus-mode .translation-text .text-content {
        font-size: 1.01em;
        line-height: 1.65;
    }
}

@media (max-width: 480px) {
    .book-container.focus-mode-zoom {
        padding: var(--space-3);
    }
    
    .focus-mode .book {
        width: 95vw;
        height: 80vh;
        max-width: none;
        max-height: none;
    }
    
    .focus-mode .page {
        width: 100%;
        height: 100%;
    }
    
    .focus-mode .sanskrit-text .text-content {
        font-size: 1.05em;
        line-height: 1.6;
    }
    
    body.focus-mode::before {
        font-size: 11px;
        padding: 6px 12px;
        top: 10px;
    }
}

/* Hide global audio player in book view */
body[data-view="book"] .audio-player {
    display: none !important;
}

/* Hide any unnecessary white divs or containers */
body[data-view="book"] .toast-container:empty {
    display: none;
}

/* Page Flip Animations */
.page.flipping {
    animation: pageFlip 0.6s ease-in-out;
}

.page.flipping-forward {
    animation: pageFlipForward 0.6s ease-in-out;
    transform-origin: left center;
}

.page.flipping-backward {
    animation: pageFlipBackward 0.6s ease-in-out;
    transform-origin: right center;
}

@keyframes pageFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(-90deg); }
    100% { transform: rotateY(0deg); }
}

@keyframes pageFlipForward {
    0% { 
        transform: rotateY(0deg);
        z-index: 2;
    }
    50% { 
        transform: rotateY(-90deg);
        z-index: 2;
    }
    100% { 
        transform: rotateY(-180deg);
        z-index: 1;
    }
}

@keyframes pageFlipBackward {
    0% { 
        transform: rotateY(0deg);
        z-index: 2;
    }
    50% { 
        transform: rotateY(90deg);
        z-index: 2;
    }
    100% { 
        transform: rotateY(180deg);
        z-index: 1;
    }
}

/* Navigation Progress Indicator */
.navigation-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 107, 53, 0.1);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.navigation-progress.active {
    opacity: 1;
    visibility: visible;
}

.progress-line {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    animation: progressFlow 0.6s ease-out;
}

@keyframes progressFlow {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth transitions for content updates */
.page-content {
    transition: opacity var(--transition-fast);
}

.page-content.updating {
    opacity: 0.7;
}

/* Prevent content jumping during transitions */
.book {
    min-height: 400px;
}

.page {
    min-height: 300px;
}