/* Custom styles for EPUB Reader */
body {
    padding-bottom: 80px; /* Space for fixed navigation */
}

.book-card .card-content {
    text-align: justify;
    text-justify: inter-word;
}

.book-card .card-content p {
    margin-bottom: 1rem;
}

.book-card .card-content h1,
.book-card .card-content h2,
.book-card .card-content h3,
.book-card .card-content h4,
.book-card .card-content h5,
.book-card .card-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Card animations */
.book-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .reader-controls .row > div {
        text-align: center;
    }
    
    .reader-controls .d-flex {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .fixed-bottom .d-flex {
        gap: 1rem;
    }
    
    .fixed-bottom .btn {
        flex: 1;
    }
}

/* Focus and accessibility */
.book-card:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Dark mode improvements */
[data-bs-theme="dark"] .book-card {
    background-color: var(--bs-gray-900);
    border-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .card-content {
    color: var(--bs-gray-100);
}
