:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Top Header */
.top-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    height: auto;
    min-height: 70px;
    z-index: 1030;
    transition: transform 0.3s ease;
}

.top-header .navbar-brand {
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.search-form {
    max-width: 400px;
    width: 100%;
}

.user-actions .btn {
    margin-left: 10px;
    border-radius: 20px;
    padding: 8px 20px;
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1.2rem;
}

.mobile-menu {
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.mobile-menu-content {
    padding: 20px 0;
}

.mobile-menu .search-form {
    margin-bottom: 20px;
}

.mobile-user-actions .btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

/* Mobile Navigation Menu Styles */
.mobile-nav-menu {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 5px;
}

.mobile-nav-item:last-child {
    margin-bottom: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.mobile-nav-link i {
    font-size: 1.1rem;
    width: 20px;
}

.mobile-dropdown {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    background: var(--light-bg);
    margin-top: 5px;
    border-radius: 8px;
    padding: 10px 0;
}

.mobile-dropdown .dropdown-item {
    padding: 8px 20px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.mobile-dropdown .dropdown-item:hover {
    background: var(--secondary-color);
    color: white;
}

.mobile-language-switcher .btn {
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 500;
}

/* Main Navigation */
.main-navbar {
    background: var(--primary-color);
    padding: 12px 0;
    height: 60px;
    z-index: 1020;
    transition: top 0.3s ease;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .main-navbar {
        margin-top: 10px;
    }
    
    .hero-section {
        margin-top: 10px !important;
    }
}

.main-navbar .navbar-nav .nav-link {
    color: white;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navbar .navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.language-switcher {
    color: white;
}

.language-switcher .dropdown-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 20px;
    padding: 8px 15px;
}

.language-switcher .dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hero-section {
    padding: 160px 0 80px;
    position: relative;
}

.hero-banner {
    background: linear-gradient(rgba(44, 62, 80, 0.3), rgba(52, 152, 219, 0.3)), url('/static/assets/img/banner.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 60vh;
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    border-radius: 20px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.book-card {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    background: white;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.book-cover {
    height: 480px !important;
    width: 315px !important;
    overflow: hidden;
    border-radius: 10px;
    margin: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}

.book-cover img {
    width: 305px !important;
    height: 479px !important;
    /* object-fit: cover; */
    /* transform: scale(1.03); */
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* Swiper specific book cover sizing */
.featured-books-swiper .book-cover {
    height: 305px;
    width: 200px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px !important;
    width: 315px !important;
}



.featured-books-swiper .book-cover img {
    width: 305px !important;
    height: 479px !important;
    /* object-fit: cover; */
    /* transform: scale(1.03); */
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.featured-books-swiper .book-card:hover .book-cover img {
    transform: scale(1.05);
}

/* .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
} */

.book-card:hover .book-cover img {
    transform: scale(1.03);
}

.book-card .card-body {
    padding: 20px;
    padding-top: 10px;
}

.category-badge {
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    width: 90px;
    text-align: center;
}

.stats-section {
    background: var(--light-bg);
    padding: 60px 0;
}

.stat-card {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

.btn-primary {
    background: var(--secondary-color);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.section-title {
    position: relative;
    margin-bottom: 50px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.swiper {
    padding-bottom: 50px;
}

/* Featured books swiper specific styles */
.featured-books-swiper {
    padding: 0 20px;
}

.featured-books-swiper .swiper-slide {
    width: 350px !important;
    max-width: 350px;
}

@media (min-width: 992px) {
    .featured-books-swiper .swiper-slide {
        width: 400px !important;
        max-width: 400px;
    }
}

@media (min-width: 1200px) {
    .featured-books-swiper .swiper-slide {
        width: 450px !important;
        max-width: 450px;
    }
}

.swiper-pagination-bullet {
    background: var(--secondary-color);
}

.genre-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.genre-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.genre-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Mobile App Section */
.mobile-app-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.mobile-app-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.05"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
}

.mobile-app-content {
    position: relative;
    z-index: 2;
}

.app-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
}

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

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.download-btn img {
    height: 60px;
    width: auto;
    display: block;
}

.app-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.app-features li {
    padding: 10px 0;
    font-size: 1.1rem;
    position: relative;
    padding-left: 30px;
}

.app-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00ff88;
    font-weight: bold;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 160px 0 60px;
    }
    
    .hero-banner {
        height: 50vh;
        padding: 60px 0;
        border-radius: 15px;
    }
    
    .hero-banner::before {
        border-radius: 15px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .book-cover {
        height: 180px;
        margin: 12px;
    }
    
    .book-card .card-body {
        padding: 15px;
        padding-top: 8px;
    }
    
    .featured-books-swiper .swiper-slide {
        width: 100% !important;
        max-width: 100%;
        padding: 0 10px;
        height: 520px !important; /* Bo'yini cho'zish */
    }
    
    .featured-books-swiper .book-card {
        height: 100% !important; /* To'liq balandlik */
        max-height: none;
        display: flex;
        flex-direction: column;
        overflow: visible; /* Overflow ko'rinadigan qilish */
    }
    
    .featured-books-swiper .book-cover {
        height: 250px; /* Bo'yini kamaytirish */
        width: 100%;
        margin: 15px 0 10px 0; /* Pastki margin kamaytirish */
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }
    
    .featured-books-swiper .book-cover img {
        width: 140px; /* Kenglikni oshirish */
        height: 200px; /* Bo'yini kamaytirish */
        object-fit: cover;
    }
    
    .featured-books-swiper .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Yuqoridan boshlash */
        padding: 15px 20px 20px 20px; /* Pastki padding oshirish */
        min-height: 200px; /* Minimal balandlik */
    }
    
    .featured-books-swiper .card-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .featured-books-swiper .text-muted {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .featured-books-swiper .btn {
        margin-top: auto; /* Tugmani pastga surish */
        margin-bottom: 10px;
    }
    
    .stat-number {
        font-size: 2rem;
    }

    /* Mobile Header */
    .top-header {
        padding: 8px 0;
        min-height: 60px;
    }
    
    .top-header .navbar-brand {
        font-size: 1.5rem;
    }
    
    .mobile-menu-toggle {
        padding: 6px 10px;
        font-size: 1.1rem;
    }
    
    .mobile-menu-content {
        padding: 15px 0;
    }
    
    .mobile-user-actions .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .main-navbar {
        padding: 8px 0;
        height: 50px;

    }
    
    .main-navbar .navbar-nav {
        flex-wrap: wrap;
    }
    
    .main-navbar .nav-link {
        padding: 5px 10px;
        font-size: 0.9rem;
    }

    /* Mobile App Section Mobile */
    .mobile-app-section {
        padding: 60px 0;
        text-align: center;
    }

    .app-image {
        max-width: 280px;
        margin: 0 auto 30px;
    }

    .download-buttons {
        gap: 15px;
    }

    .download-btn img {
        height: 50px;
    }

    .app-features {
        text-align: left;
        max-width: 300px;
        margin: 30px auto;
    }

    .app-features li {
        font-size: 1rem;
    }
}

/* Books Page Styles */
.books-page {
    min-height: 100vh;
    padding: 40px 0;
}

.filters-sidebar .card {
    position: sticky;
    top: 160px;
}

.filter-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.form-check {
    margin-bottom: 8px;
}

.form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.sort-options .form-select {
    min-width: 150px;
}

.view-toggle .btn {
    width: 40px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.books-grid .book-item {
    transition: all 0.3s ease;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.pagination .page-link:hover {
    background-color: var(--light-bg);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* List View Styles */
.list-view .book-card {
    flex-direction: row;
    max-width: 100%;
}

.list-view .book-cover {
    width: 120px;
    height: 160px;
    flex-shrink: 0;
    border-radius: 10px 0 0 10px;
}

.list-view .card-body {
    flex: 1;
    padding: 20px;
}

/* Mobile Filter Button */
#mobileFilterBtn {
    display: none !important;
    position: fixed;
    left:20px;
    bottom:20px;
    z-index: 1050;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    #mobileFilterBtn {
        display: flex !important;
    }
    .books-page {
        margin-top: 120px;
        padding-bottom: 100px; /* Fixed button uchun joy */
    }
    
    .filters-sidebar {
        display: none !important;
    }
    
    .results-header {
        padding: 15px;
    }
    
    .results-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
    }
    
    .sort-options .form-select {
        min-width: 120px;
    }
}



#mobileFilterBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#mobileFilterBtn:active {
    transform: scale(0.95);
}

/* Mobile Filters Modal */
#mobileFiltersModal .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100vh;
}

#mobileFiltersModal .modal-content {
    height: 100vh;
    border-radius: 0;
    border: none;
}

#mobileFiltersModal .modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

#mobileFiltersModal .filter-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

#mobileFiltersModal .filter-group:last-child {
    border-bottom: none;
}

#mobileFiltersModal .filter-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#mobileFiltersModal .form-check {
    margin-bottom: 12px;
}

#mobileFiltersModal .form-check-label {
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#mobileFiltersModal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    background: var(--light-bg);
}

/* Mobile Filter Button Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

#mobileFilterBtn.active {
    animation: pulse 2s infinite;
}

/* Book Detail Page Styles */
.book-detail-page {
    min-height: 100vh;
    padding: 40px 0;
}

.book-cover-large img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

.book-actions .btn {
    transition: all 0.3s ease;
}

.book-actions .btn:hover {
    transform: translateY(-2px);
}

.book-info .book-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.2;
}

.book-info .book-author {
    font-size: 1.5rem;
    font-weight: 500;
}

.book-meta .meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.book-rating {
    display: flex;
    align-items: center;
}

.book-rating .stars {
    font-size: 1.2rem;
}

.book-rating .rating-text {
    color: var(--text-color);
    font-weight: 500;
}

.book-description {
    margin-top: 30px;
}

.book-description h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.book-description p {
    text-align: justify;
    line-height: 1.8;
    margin-bottom: 15px;
}

.book-tags .badge {
    font-size: 0.8rem;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
}

.reading-progress-section .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.reviews-section .section-title {
    color: var(--primary-color);
    font-weight: 600;
}

.reviews-summary {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.rating-breakdown .progress {
    height: 8px;
    background-color: #e9ecef;
}

.review-item {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.review-item .stars {
    font-size: 0.9rem;
}

.review-actions .btn {
    font-size: 0.8rem;
    padding: 4px 12px;
}

.similar-books-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--light-bg);
}

.similar-books-section .section-title {
    color: var(--primary-color);
    font-weight: 600;
}

.similar-books-section .book-card {
    transition: all 0.3s ease;
}

.similar-books-section .book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.similar-books-section .book-cover {
    height: 200px;
}

.similar-books-section .card-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .book-detail-page {
        margin-top: 120px;
        padding: 20px 0;
    }
    
    .book-info .book-title {
        font-size: 2rem;
    }
    
    .book-info .book-author {
        font-size: 1.2rem;
    }
    
    .book-meta .row {
        margin: 0;
    }
    
    .book-meta .col-md-6 {
        padding: 0;
        margin-bottom: 10px;
    }
    
    .book-actions .btn {
        margin-bottom: 10px;
    }
    
    .reviews-summary {
        padding: 20px;
    }
    
    .reviews-summary .row {
        text-align: center;
    }
    
    .reviews-summary .col-md-8 {
        margin-top: 20px;
    }
    
    .similar-books-section .book-cover {
        height: 180px;
    }
}

/* PDF Reader Modal Styles */
.modal-fullscreen .modal-content {
    height: 100vh;
    border-radius: 0;
}

.modal-fullscreen .modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 10px 20px;
    min-height: 60px;
}

.pdf-controls, .zoom-controls, .reading-options {
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 15px;
    margin-left: 15px;
}

.pdf-controls:first-child {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
}

.page-info {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
}

.page-info input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.page-info input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    color: white;
    box-shadow: none;
}

#zoomLevel {
    color: white;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.pdf-viewer-container {
    height: calc(100vh - 60px);
    overflow: auto;
    background: #f8f9fa;
    position: relative;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

#pdfCanvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: white;
}

.pdf-embed-container {
    height: 100%;
    width: 100%;
}

.demo-pdf-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    min-height: 100%;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.pdf-page {
    background: white;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.pdf-page .page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.pdf-page .page-header h2 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.pdf-page .page-header h4 {
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 0;
}

.pdf-page .page-content {
    line-height: 1.8;
    text-align: justify;
}

.pdf-page .page-content h3 {
    color: var(--primary-color);
    margin: 30px 0 20px 0;
    font-weight: 600;
}

.pdf-page .page-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.pdf-page .blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
}

.pdf-page .page-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-color);
}

.reading-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: var(--secondary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Night Mode */
.night-mode .pdf-viewer-container {
    background: #1a1a1a;
}

.night-mode .demo-pdf-content {
    background: #2d2d2d;
}

.night-mode .pdf-page {
    background: #2d2d2d;
    color: #e0e0e0;
}

.night-mode .pdf-page .page-header h2 {
    color: #4a9eff;
}

.night-mode .pdf-page .page-header h4 {
    color: #7db8ff;
}

.night-mode .pdf-page .page-content h3 {
    color: #4a9eff;
}

.night-mode .pdf-page .blockquote {
    background: #3a3a3a;
    border-left-color: #7db8ff;
}

.night-mode .pdf-page .page-footer {
    border-top-color: #555;
    color: #ccc;
}

/* Mobile PDF Reader */
@media (max-width: 768px) {
    .modal-fullscreen .modal-header {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    
    .modal-fullscreen .modal-header .d-flex {
        flex-wrap: wrap;
        gap: 10px !important;
    }
    
    .pdf-controls, .zoom-controls, .reading-options {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .page-info input {
        width: 50px !important;
    }
    
    .demo-pdf-content {
        width: 100% !important;
        padding: 20px 15px;
    }
    
    .pdf-page {
        padding: 20px;
    }
    
    .pdf-page .page-content p {
        font-size: 1rem;
    }
}

/* Audio Player Modal Styles */
.audio-player-container {
    height: calc(100vh - 60px);
    background: #f8f9fa;
}

/* Playlist Sidebar */
.playlist-sidebar {
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.playlist-header h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.search-playlist input {
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.playlist-content {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.chapter-group {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.chapter-header {
    background: var(--light-bg);
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.chapter-header:hover {
    background: #e9ecef;
}

.chapter-header .chapter-icon {
    transition: transform 0.3s ease;
    margin-right: 10px;
}

.chapter-header[aria-expanded="true"] .chapter-icon {
    transform: rotate(90deg);
}

.chapter-sections {
    background: white;
}

.section-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.section-item:last-child {
    border-bottom: none;
}

.section-item:hover {
    background: #f8f9fa;
}

.section-item.active {
    background: var(--secondary-color);
    color: white;
}

.section-item.active .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.section-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.section-play-icon {
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-item:hover .section-play-icon,
.section-item.active .section-play-icon {
    opacity: 1;
}

/* Main Audio Player */
.audio-main {
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-player-main {
    max-width: 600px;
    width: 100%;
}

.audio-cover img {
    max-width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
}

.audio-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.audio-author {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.current-chapter {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Progress Bar */
.audio-progress-container {
    margin: 30px 0;
}

.audio-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.audio-progress-fill {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

.audio-progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    left: 0%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-progress-bar:hover .audio-progress-handle {
    opacity: 1;
}

.current-time,
.total-time {
    font-weight: 500;
    color: var(--text-color);
}

/* Main Controls */
.audio-main-controls {
    margin: 40px 0;
}

.play-pause-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-pause-btn i {
    margin-left: 3px; /* Center play icon */
}

.play-pause-btn.playing i {
    margin-left: 0;
}

/* Additional Controls */
.volume-control {
    min-width: 150px;
}

.volume-slider {
    width: 100px;
}

.volume-slider::-webkit-slider-thumb {
    background: var(--secondary-color);
}

.volume-slider::-moz-range-thumb {
    background: var(--secondary-color);
    border: none;
}

/* Speed Control Dropdown */
.speed-dropdown {
    position: relative;
}

.speed-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 100px;
    display: none;
}

.speed-menu.show {
    display: block;
}

.speed-option {
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.speed-option:hover {
    background: var(--light-bg);
}

.speed-option.active {
    background: var(--secondary-color);
    color: white;
}

/* Timer Modal */
.timer-modal {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    display: none;
}

.timer-modal.show {
    display: block;
}

.timer-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.timer-option {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timer-option:hover {
    border-color: var(--secondary-color);
    background: var(--light-bg);
}

.timer-option.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Mobile Audio Player */
@media (max-width: 768px) {
    .audio-player-container .row {
        flex-direction: column;
    }
    
    .playlist-sidebar {
        display: none !important;
    }
    
    .audio-main {
        height: 100vh;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .audio-player-main {
        width: 100%;
        max-width: 400px;
    }
    
    .audio-cover img {
        max-width: 180px;
        height: 180px;
    }
    
    .audio-main-controls {
        margin: 30px 0;
    }
    
    .play-pause-btn {
        width: 70px;
        height: 70px;
    }
    
    .audio-additional-controls {
        flex-wrap: wrap;
        gap: 15px !important;
        justify-content: center;
    }
    
    .volume-control {
        min-width: 120px;
    }
    
    .audio-progress-container {
        margin: 25px 0;
    }
    
    .audio-book-info {
        margin-bottom: 30px;
    }
    
    .audio-title {
        font-size: 1.5rem;
    }
    
    .audio-author {
        font-size: 1rem;
    }
    
    .current-chapter {
        font-size: 1rem;
    }
}

/* Mobile Playlist Modal */
.mobile-playlist-content {
    max-height: 60vh;
    overflow-y: auto;
}

.mobile-playlist-content .chapter-group {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.mobile-playlist-content .chapter-header {
    background: var(--light-bg);
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.mobile-playlist-content .chapter-header:hover {
    background: #e9ecef;
}

.mobile-playlist-content .chapter-header .chapter-icon {
    transition: transform 0.3s ease;
    margin-right: 10px;
}

.mobile-playlist-content .chapter-header[aria-expanded="true"] .chapter-icon {
    transform: rotate(90deg);
}

.mobile-playlist-content .chapter-sections {
    background: white;
}

.mobile-playlist-content .section-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-playlist-content .section-item:last-child {
    border-bottom: none;
}

.mobile-playlist-content .section-item:hover {
    background: #f8f9fa;
}

.mobile-playlist-content .section-item.active {
    background: var(--secondary-color);
    color: white;
}

.mobile-playlist-content .section-item.active .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.mobile-playlist-content .section-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.mobile-playlist-content .section-play-icon {
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-playlist-content .section-item:hover .section-play-icon,
.mobile-playlist-content .section-item.active .section-play-icon {
    opacity: 1;
}

/* User Profile Page Styles */
.user-profile-page {
    padding-top: 160px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Profile Sidebar */
.profile-sidebar {
    position: sticky;
    top: 180px;
}

.profile-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.profile-avatar {
    position: relative;
    display: inline-block;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.profile-name {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-email {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.profile-join-date {
    font-size: 0.85rem;
}

/* Profile Navigation */
.profile-nav {
    background: white;
    border-radius: 15px;
    padding: 20px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.profile-nav .nav-link {
    color: var(--text-color);
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.profile-nav .nav-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.profile-nav .nav-link.active {
    background: var(--secondary-color);
    color: white;
}

.profile-nav .nav-link i {
    font-size: 1.1rem;
}

.profile-nav .badge {
    font-size: 0.75rem;
}

/* Profile Content */
.profile-content-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.profile-content-card h4 {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Styles */
.form-actions {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

/* Statistics */
.profile-stats h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 15px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Books Grid */
.books-grid .book-card {
    transition: transform 0.3s ease;
}

.books-grid .book-card:hover {
    transform: translateY(-5px);
}

.saved-book .book-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.saved-book:hover .book-actions {
    opacity: 1;
}

.saved-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
}

/* List View */
.books-grid.list-view .row {
    display: block;
}

.books-grid.list-view .col-lg-3 {
    width: 100%;
    margin-bottom: 15px;
}

.books-grid.list-view .book-card {
    display: flex;
    align-items: center;
    padding: 15px;
}

.books-grid.list-view .book-cover {
    width: 80px;
    height: 100px;
    margin-right: 20px;
    flex-shrink: 0;
}

.books-grid.list-view .book-cover img {
    width: 100%;
    height: 100%;
}

.books-grid.list-view .book-info {
    flex: 1;
}

/* Purchased Books */
.purchased-books-list {
    max-height: 600px;
    overflow-y: auto;
}

.purchased-book-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.purchased-book-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.purchased-book-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.purchased-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success-color);
}

.purchased-actions .btn {
    margin-left: 5px;
}

.purchase-summary {
    border: 2px solid var(--border-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.summary-label {
    font-weight: 500;
    color: var(--text-color);
}

.summary-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Read Books */
.read-books-list {
    max-height: 600px;
    overflow-y: auto;
}

.read-book-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.read-book-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.read-book-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.reading-progress {
    width: 200px;
}

.reading-progress .progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 5px;
}

.reading-time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.read-actions .btn {
    margin-left: 5px;
}

.reading-stats {
    border: 2px solid var(--border-color);
}

.reading-stats .stat-item {
    text-align: center;
}

.reading-stats .stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.reading-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Settings */
.settings-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

.settings-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

/* .settings-items - Bu Tailwind CSS property, Bootstrap da ishlatilmaydi */

.setting-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item.border-danger {
    border-color: #dc3545 !important;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.setting-item h6 {
    margin-bottom: 5px;
    font-weight: 500;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .user-profile-page {
        padding-top: 140px;
    }
    
    .profile-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .profile-card {
        padding: 20px 15px;
    }
    
    .profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .avatar-edit-btn {
        width: 30px;
        height: 30px;
        bottom: 0;
        right: 0;
    }
    
    .profile-nav .nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .profile-content-card {
        padding: 20px 15px;
    }
    
    .stat-card {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .books-grid .col-lg-3 {
        width: 50%;
        padding: 0 7.5px;
    }
    
    .books-grid.list-view .col-lg-3 {
        width: 100%;
        padding: 0 15px;
    }
    
    .purchased-book-item,
    .read-book-item {
        padding: 15px;
    }
    
    .reading-progress {
        width: 150px;
    }
    
    .setting-item {
        padding: 12px 0;
    }
    
    .setting-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .setting-item .form-check-input,
    .setting-item .form-select,
    .setting-item .btn {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .book-card{
        overflow: auto;
    }
    .book-cover {
        height: 160px;
        margin: 5px;
        overflow: auto !important;
    }
    
    .book-card .card-body {
        padding: 12px;
        padding-top: 5px;
    }
    
    .featured-books-swiper .swiper-slide {
        width: 100% !important;
        max-width: 100%;
        padding: 0 5px;
        height: 690px !important; /* Kichik ekranlar uchun */
    }
    
    .featured-books-swiper .book-card {
        height: 100% !important;
        max-height: none;
        display: flex;
        flex-direction: column;
        overflow: visible; /* Overflow ko'rinadigan qilish */
    }
    
    .featured-books-swiper .book-cover {
        height: 220px; /* Kichik ekranlar uchun */
        width: 100%;
        margin: 12px 0 8px 0; /* Pastki margin kamaytirish */
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }
    
    .featured-books-swiper .book-cover img {
        width: 120px; /* Kichik ekranlar uchun */
        height: 180px; /* Kichik ekranlar uchun */
        object-fit: cover;
    }
    
    .featured-books-swiper .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Yuqoridan boshlash */
        padding: 12px 15px 18px 15px; /* Pastki padding oshirish */
        min-height: 180px; /* Minimal balandlik */
    }
    
    .featured-books-swiper .card-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .featured-books-swiper .text-muted {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .featured-books-swiper .btn {
        margin-top: auto; /* Tugmani pastga surish */
        margin-bottom: 8px;
    }
    
    .books-grid .col-lg-3 {
        width: 100%;
        padding: 0 15px;
    }
    
    .purchased-actions,
    .read-actions {
        margin-top: 10px;
    }
    
    .purchased-actions .btn,
    .read-actions .btn {
        margin: 2px;
        font-size: 0.8rem;
    }
}