 
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            cursor: default;
        }
        
        /* Particle canvas */
        #particle-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }
        
        body {
            background-color: #f5f3e9;
            color: #2d3e2d;
            line-height: 1.6;
            overflow-x: hidden;
            background-image: 
                radial-gradient(circle at 20% 80%, rgba(144, 164, 127, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(184, 207, 167, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(160, 184, 147, 0.05) 0%, transparent 50%);
            transition: all 0.5s ease;
        }
        
        /* Dark mode styles */
        body.dark-mode {
            background-color: #0a0e1a;
            color: #e0e0e0;
            background-image: 
                radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(79, 70, 229, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
        }
        
        /* Star field for dark mode */
        .stars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.5s ease;
            z-index: 1;
        }
        
        body.dark-mode .stars {
            opacity: 1;
        }
        
        .star {
            position: absolute;
            background: white;
            border-radius: 50%;
            animation: twinkle 3s ease-in-out infinite;
            box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
        }
        
        .star.bright-star {
            box-shadow: 0 0 6px rgba(255, 255, 255, 1), 0 0 12px rgba(255, 255, 255, 0.5);
        }
        
        @keyframes twinkle {
            0%, 100% { opacity: 0.3; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.2); }
        }
        
        @keyframes twinkle-slow {
            0%, 100% { opacity: 0.2; transform: scale(0.9); }
            50% { opacity: 0.8; transform: scale(1.1); }
        }
        
        /* Shooting stars for dark mode */
        .shooting-star {
            position: absolute;
            top: 0;
            width: 2px;
            height: 100px;
            background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8), transparent);
            opacity: 0;
            pointer-events: none;
            z-index: 2;
        }
        
        body.dark-mode .shooting-star {
            animation: shootingStar 3s ease-in-out infinite;
        }
        
        @keyframes shootingStar {
            0% {
                opacity: 0;
                transform: translateY(-100px) translateX(0) rotate(45deg);
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                opacity: 0;
                transform: translateY(500px) translateX(300px) rotate(45deg);
            }
        }
        
        /* Dark mode toggle button */
        .theme-toggle {
            width: 50px;
            height: 25px;
            background: linear-gradient(135deg, #6b8e5b 0%, #90a47f 100%);
            border-radius: 30px;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
            overflow: hidden;
            margin-right: 2rem;
            flex-shrink: 0;
        }
        
        body.dark-mode .theme-toggle {
            background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
        }
        
        .theme-toggle-inner {
            position: relative;
            width: 100%;
            height: 100%;
        }
        
        .toggle-icon {
            position: absolute;
            top: 2.5px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            left: 2.5px;
        }
        
        body.dark-mode .toggle-icon {
            left: 27.5px;
        }
        
        .sun-icon, .moon-icon {
            position: absolute;
            font-size: 12px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        
        .sun-icon {
            opacity: 1;
            transition: opacity 0.3s ease;
        }
        
        .moon-icon {
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        body.dark-mode .sun-icon {
            opacity: 0;
        }
        
        body.dark-mode .moon-icon {
            opacity: 1;
        }
        
        /* Header and Navigation */
        header {
            padding: 1.2rem 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(107, 142, 91, 0.2);
            background-color: rgba(255, 253, 245, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
            transition: all 0.3s ease;
        }
        
        header.scrolled {
            padding: 0.8rem 5%;
            background-color: rgba(255, 253, 245, 0.98);
        }
        
        body.dark-mode header {
            background-color: rgba(10, 14, 26, 0.95);
            border-bottom-color: rgba(79, 70, 229, 0.2);
        }
        
        body.dark-mode header.scrolled {
            background-color: rgba(10, 14, 26, 0.98);
        }
        
        .logo-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            cursor: pointer;
        }
        
        .logo {
            width: 45px;
            height: 45px;
            transition: all 0.3s ease;
        }
        
        header.scrolled .logo {
            width: 35px;
            height: 35px;
        }
        
        .brand {
            display: flex;
            flex-direction: column;
            position: relative;
        }
        
        .brand-name {
            font-family: 'Times New Roman', Times, serif;
            font-size: 1.8rem;
            font-weight: 500;
            color: #2d3e2d;
            letter-spacing: 1px;
            transition: all 0.3s ease;
            position: relative;
        }
        
        body.dark-mode .brand-name {
            color: #e0e0e0;
        }
        
        header.scrolled .brand-name {
            font-size: 1.4rem;
        }
        
        .tagline {
            font-size: 0.8rem;
            font-weight: 300;
            color: #7a9c6a;
            font-style: italic;
            letter-spacing: 1px;
            transition: all 0.3s ease;
        }
        
        body.dark-mode .tagline {
            color: #a5b4fc;
        }
        
        header.scrolled .tagline {
            font-size: 0.7rem;
        }
        
        nav {
            position: relative;
            display: flex;
            align-items: center;
        }
        
        nav ul {
            display: flex;
            gap: 2.5rem;
            list-style: none;
        }
        
        nav ul li {
            position: relative;
        }
        
        nav ul li a {
            text-decoration: none;
            color: #2d3e2d;
            font-size: 0.9rem;
            font-weight: 400;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            padding-bottom: 5px;
            position: relative;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        body.dark-mode nav ul li a {
            color: #e0e0e0;
        }
        
        nav ul li a:after {
            content: '';
            position: absolute;
            width: 0;
            height: 1px;
            bottom: 0;
            left: 0;
            background-color: #6b8e5b;
            transition: width 0.3s ease;
        }
        
        body.dark-mode nav ul li a:after {
            background-color: #6366f1;
        }
        
        nav ul li a:hover:after,
        nav ul li a.active:after {
            width: 100%;
        }
        
        nav ul li a:hover,
        nav ul li a.active {
            color: #6b8e5b;
        }
        
        body.dark-mode nav ul li a:hover,
        body.dark-mode nav ul li a.active {
            color: #a5b4fc;
        }
        
        /* Hero Section */
        .hero {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 5rem 5% 7rem;
            background: linear-gradient(135deg, #a0b893 0%, #b8cfa7 50%, #90a47f 100%);
            position: relative;
            overflow: hidden;
            min-height: 50vh;
            transition: all 0.5s ease;
        }
        
        body.dark-mode .hero {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
        }
        
        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 30% 50%, rgba(184, 207, 167, 0.3) 0%, transparent 40%),
                radial-gradient(circle at 70% 80%, rgba(144, 164, 127, 0.3) 0%, transparent 40%);
            z-index: 1;
        }
        
        .hero::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 80px;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" preserveAspectRatio="none"><path d="M0,40 Q300,0 600,40 T1200,40 L1200,80 L0,80 Z" fill="%23f5f3e9"/></svg>');
            z-index: 2;
            transition: all 0.5s ease;
        }
        
        body.dark-mode .hero::after {
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" preserveAspectRatio="none"><path d="M0,40 Q300,0 600,40 T1200,40 L1200,80 L0,80 Z" fill="%230a0e1a"/></svg>');
        }
        
        .collection-hero-content {
            position: relative;
            z-index: 10;
            text-align: center;
            max-width: 800px;
        }
        
        .hero-title {
            font-family: 'Times New Roman', Times, serif;
            font-size: 3.5rem;
            margin-bottom: 1.5rem;
            color: #fff;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            animation: fadeInUp 0.8s forwards;
            letter-spacing: -0.5px;
            line-height: 1.2;
        }
        
        .hero-subtitle {
            font-size: 1.2rem;
            font-weight: 300;
            color: #fff;
            line-height: 1.8;
            animation: fadeInUp 0.8s forwards 0.3s;
            opacity: 0.95;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Book Grid Section */
        .book-grid-section {
            padding: 5rem 5%;
            background: linear-gradient(to bottom, #f5f3e9, #fdfbf3);
            transition: all 0.5s ease;
        }
        
        body.dark-mode .book-grid-section {
            background: linear-gradient(to bottom, #0a0e1a, #0f172a);
        }
        
        .section-header {
            text-align: center;
            margin-bottom: 4rem;
        }
        
        .collection-section-title {
            font-family: 'Times New Roman', Times, serif;
            font-size: 2.5rem;
            color: #2d3e2d;
            margin-bottom: 1rem;
            position: relative;
            display: inline-block;
        }
        
        body.dark-mode .collection-section-title {
            color: #e0e0e0;
        }
        
        .collection-section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 2px;
            background: linear-gradient(90deg, transparent, #6b8e5b, transparent);
            opacity: 0.8;
        }
        
        body.dark-mode .collection-section-title::after {
            background: linear-gradient(90deg, transparent, #6366f1, transparent);
        }
        
        /* Search Bar Styles */
        .search-container {
            position: relative;
            max-width: 500px;
            margin: 2rem auto 3rem;
        }
        
        .search-input {
            width: 100%;
            padding: 1rem 3rem 1rem 1.5rem;
            border: 2px solid rgba(107, 142, 91, 0.2);
            border-radius: 50px;
            font-size: 1rem;
            background-color: rgba(255, 255, 255, 0.8);
            color: #2d3e2d;
            transition: all 0.3s ease;
            outline: none;
        }
        
        body.dark-mode .search-input {
            background-color: rgba(30, 41, 59, 0.8);
            border-color: rgba(99, 102, 241, 0.3);
            color: #e0e0e0;
        }
        
        .search-input::placeholder {
            color: #8a9b8a;
        }
        
        body.dark-mode .search-input::placeholder {
            color: #6b7280;
        }
        
        .search-input:focus {
            border-color: #6b8e5b;
            background-color: rgba(255, 255, 255, 0.95);
            box-shadow: 0 0 0 4px rgba(107, 142, 91, 0.1);
        }
        
        body.dark-mode .search-input:focus {
            border-color: #6366f1;
            background-color: rgba(30, 41, 59, 0.95);
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }
        
        .search-icon {
            position: absolute;
            right: 1.5rem;
            top: 50%;
            transform: translateY(-50%);
            color: #6b8e5b;
            pointer-events: none;
        }
        
        body.dark-mode .search-icon {
            color: #a5b4fc;
        }
        
        .filter-tabs {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 3rem;
            flex-wrap: wrap;
        }
        
        .filter-tab {
            padding: 0.8rem 1.5rem;
            background-color: rgba(255, 255, 255, 0.7);
            border: 1px solid rgba(107, 142, 91, 0.2);
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            color: #5a6d5a;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        body.dark-mode .filter-tab {
            background-color: rgba(30, 41, 59, 0.7);
            border-color: rgba(99, 102, 241, 0.2);
            color: #a0a0a0;
        }
        
        .filter-tab:hover {
            background-color: rgba(107, 142, 91, 0.1);
            border-color: #6b8e5b;
            transform: translateY(-2px);
        }
        
        body.dark-mode .filter-tab:hover {
            background-color: rgba(99, 102, 241, 0.1);
            border-color: #6366f1;
        }
        
        .filter-tab.active {
            background-color: #6b8e5b;
            color: white;
            border-color: #6b8e5b;
        }
        
        body.dark-mode .filter-tab.active {
            background-color: #6366f1;
            border-color: #6366f1;
        }
        
        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 2.5rem;
            max-width: 1200px;
            margin: 0 auto;
        }
        
        .book-item {
            background: linear-gradient(135deg, #ffffff 0%, #fafaf5 100%);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            transition: all 0.4s ease;
            border: 1px solid rgba(107, 142, 91, 0.1);
            cursor: pointer;
        }
        
        body.dark-mode .book-item {
            background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
            border-color: rgba(99, 102, 241, 0.1);
        }
        
        .book-item:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        }
        
        body.dark-mode .book-item:hover {
            border-color: rgba(99, 102, 241, 0.3);
        }
        
        .book-cover {
            width: 100%;
            height: 350px;
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, #90a47f 0%, #a0b893 100%);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        body.dark-mode .book-cover {
            background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
        }
        
        .book-cover-design {
            width: 90%;
            height: 90%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.3;
        }
        
        .book-info {
            padding: 1.5rem;
        }
        
        .book-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #2d3e2d;
            margin-bottom: 0.5rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        body.dark-mode .book-title {
            color: #e0e0e0;
        }
        
        .book-author {
            font-size: 0.9rem;
            color: #7a9c6a;
            margin-bottom: 1rem;
        }
        
        body.dark-mode .book-author {
            color: #a5b4fc;
        }
        
        .book-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
        }
        
        .book-genre {
            background-color: rgba(107, 142, 91, 0.1);
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            color: #6b8e5b;
        }
        
        body.dark-mode .book-genre {
            background-color: rgba(99, 102, 241, 0.2);
            color: #a5b4fc;
        }
        
        .book-price {
            font-weight: 600;
            color: #2d3e2d;
        }
        
        body.dark-mode .book-price {
            color: #e0e0e0;
        }
        
        /* Book Detail Modal */
        .book-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            overflow-y: auto;
            animation: fadeIn 0.3s ease;
        }
        
        .book-modal.active {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2rem;
        }
        
        .modal-content {
            background: linear-gradient(135deg, #ffffff 0%, #fafaf5 100%);
            border-radius: 20px;
            max-width: 800px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            animation: slideUp 0.4s ease;
        }
        
        body.dark-mode .modal-content {
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .modal-close {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            width: 40px;
            height: 40px;
            background-color: rgba(0, 0, 0, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1.5rem;
            color: #2d3e2d;
        }
        
        body.dark-mode .modal-close {
            background-color: rgba(255, 255, 255, 0.1);
            color: #e0e0e0;
        }
        
        .modal-close:hover {
            background-color: rgba(0, 0, 0, 0.2);
            transform: rotate(90deg);
        }
        
        .modal-book-details {
            display: flex;
            gap: 2rem;
            padding: 2rem;
            align-items: center; /* vertically center children (e.g., .modal-book-cover) */
        }
        
        .modal-book-cover {
            flex: 0 0 300px;
            height: 450px;
            background: linear-gradient(135deg, #90a47f 0%, #a0b893 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        
        body.dark-mode .modal-book-cover {
            background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
        }
        
        .modal-book-info {
            flex: 1;
        }
        
        .modal-book-title {
            font-size: 2rem;
            font-weight: 600;
            color: #2d3e2d;
            margin-bottom: 0.5rem;
        }
        
        body.dark-mode .modal-book-title {
            color: #e0e0e0;
        }
        
        .modal-book-author {
            font-size: 1.2rem;
            color: #7a9c6a;
            margin-bottom: 1.5rem;
        }
        
        body.dark-mode .modal-book-author {
            color: #a5b4fc;
        }
        
        .modal-book-description {
            color: #5a6d5a;
            line-height: 1.8;
            margin-bottom: 2rem;
        }
        
        body.dark-mode .modal-book-description {
            color: #a0a0a0;
        }
        
        .modal-book-actions {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            width: 100%;
        }
        
        .action-button {
            padding: 1rem 2rem;
            border-radius: 30px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            text-decoration: none;
            display: inline-block;
        }
        
        .primary-button {
            background: linear-gradient(135deg, #6b8e5b 0%, #5a7a4a 100%);
            color: white;
            box-shadow: 0 10px 25px rgba(107, 142, 91, 0.2);
            width: 100%;
            text-align: center;
        }
        
        body.dark-mode .primary-button {
            background: linear-gradient(135deg, #6366f1 0%, #4c1d95 100%);
            box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
        }
        
        .primary-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 35px rgba(107, 142, 91, 0.3);
        }
        
        .secondary-button {
            background-color: transparent;
            color: #6b8e5b;
            border: 2px solid #6b8e5b;
        }
        
        body.dark-mode .secondary-button {
            color: #a5b4fc;
            border-color: #a5b4fc;
        }
        
        .secondary-button:hover {
            background-color: rgba(107, 142, 91, 0.1);
        }
        
        body.dark-mode .secondary-button:hover {
            background-color: rgba(99, 102, 241, 0.1);
        }
        
        /* Modal Audio Player Styles - Redesigned for modal */
        .audio-player-container {
            width: 100%;
            margin-top: 1.5rem;
            padding: 1rem;
            background: linear-gradient(135deg, rgba(107, 142, 91, 0.08) 0%, rgba(144, 164, 127, 0.08) 100%);
            border-radius: 12px;
            border: 1px solid rgba(107, 142, 91, 0.15);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .audio-player-container:hover {
            background: linear-gradient(135deg, rgba(107, 142, 91, 0.12) 0%, rgba(144, 164, 127, 0.12) 100%);
            border-color: rgba(107, 142, 91, 0.25);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(107, 142, 91, 0.15);
        }

        body.dark-mode .audio-player-container {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
            border-color: rgba(99, 102, 241, 0.15);
        }

        body.dark-mode .audio-player-container:hover {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
            border-color: rgba(99, 102, 241, 0.25);
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
        }

        .audio-label {
            font-size: 0.85rem;
            color: #6b8e5b;
            margin-bottom: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .audio-label::before {
            content: '🎵';
            font-size: 1rem;
        }

        body.dark-mode .audio-label {
            color: #a5b4fc;
        }

        .custom-audio-player {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            flex-wrap: wrap;
        }
        
        .play-pause-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6b8e5b 0%, #5a7a4a 100%);
            border: none;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(107, 142, 91, 0.3);
            flex-shrink: 0;
        }
        
        body.dark-mode .play-pause-btn {
            background: linear-gradient(135deg, #6366f1 0%, #4c1d95 100%);
            box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
        }
        
        .play-pause-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 8px 20px rgba(107, 142, 91, 0.4);
        }
        
        body.dark-mode .play-pause-btn:hover {
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
        }
        
        .play-pause-btn:active {
            transform: scale(0.95);
        }
        
        .audio-progress-container {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .audio-progress-bar {
            flex: 1;
            height: 6px;
            background-color: rgba(107, 142, 91, 0.2);
            border-radius: 3px;
            position: relative;
            cursor: pointer;
            overflow: hidden;
        }
        
        body.dark-mode .audio-progress-bar {
            background-color: rgba(99, 102, 241, 0.2);
        }
        
        .audio-progress-fill {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #6b8e5b 0%, #90a47f 100%);
            border-radius: 3px;
            transition: width 0.1s linear;
        }
        
        body.dark-mode .audio-progress-fill {
            background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
        }
        
        .audio-time {
            font-size: 0.85rem;
            color: #5a6d5a;
            white-space: nowrap;
            min-width: 80px;
            text-align: right;
        }
        
        body.dark-mode .audio-time {
            color: #a0a0a0;
        }

        /* Enhanced audio player interactions */
        .audio-progress-fill::after {
            content: '';
            position: absolute;
            right: -4px;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 12px;
            background: #6b8e5b;
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.2s ease;
            border: 2px solid white;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

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

        body.dark-mode .audio-progress-fill::after {
            background: #6366f1;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .audio-progress-bar:hover {
            height: 8px;
            transition: height 0.2s ease;
        }

        /* Modal audio player responsive design */
        @media (max-width: 768px) {
            .audio-player-container {
                padding: 0.8rem;
                margin-top: 1rem;
            }

            .custom-audio-player {
                flex-direction: column;
                gap: 1rem;
                align-items: center;
            }

            .audio-progress-container {
                width: 100%;
                flex-direction: column;
                gap: 0.6rem;
            }

            .audio-time {
                text-align: center;
                font-size: 0.8rem;
                min-width: auto;
            }

            .play-pause-btn {
                width: 50px;
                height: 50px;
            }

            .audio-label {
                text-align: center;
                margin-bottom: 0.6rem;
            }
        }

        @media (max-width: 480px) {
            .audio-player-container {
                padding: 0.6rem;
                border-radius: 8px;
            }

            .audio-label {
                font-size: 0.8rem;
            }

            .play-pause-btn {
                width: 45px;
                height: 45px;
            }

            .audio-progress-bar {
                height: 8px;
            }
        }

        /* Pagination Styles */
        .pagination-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 2rem;
            margin-top: 3rem;
            padding-bottom: 2rem;
        }
        
        .pagination-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.8rem 1.5rem;
            background-color: rgba(255, 255, 255, 0.8);
            border: 2px solid rgba(107, 142, 91, 0.2);
            border-radius: 30px;
            color: #5a6d5a;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            outline: none;
        }
        
        body.dark-mode .pagination-btn {
            background-color: rgba(30, 41, 59, 0.8);
            border-color: rgba(99, 102, 241, 0.2);
            color: #a0a0a0;
        }
        
        .pagination-btn:hover:not(:disabled) {
            background-color: #6b8e5b;
            border-color: #6b8e5b;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(107, 142, 91, 0.2);
        }
        
        body.dark-mode .pagination-btn:hover:not(:disabled) {
            background-color: #6366f1;
            border-color: #6366f1;
            color: white;
            box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
        }
        
        .pagination-btn:active:not(:disabled) {
            transform: translateY(0);
        }
        
        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .pagination-btn:disabled:hover {
            background-color: rgba(255, 255, 255, 0.8);
            border-color: rgba(107, 142, 91, 0.2);
            color: #5a6d5a;
            transform: none;
            box-shadow: none;
        }
        
        body.dark-mode .pagination-btn:disabled:hover {
            background-color: rgba(30, 41, 59, 0.8);
            border-color: rgba(99, 102, 241, 0.2);
            color: #a0a0a0;
        }
        
        .pagination-info {
            font-size: 0.95rem;
            color: #5a6d5a;
            font-weight: 500;
        }
        
        body.dark-mode .pagination-info {
            color: #a0a0a0;
        }
        
        .pagination-info span {
            color: #6b8e5b;
            font-weight: 600;
        }
        
        body.dark-mode .pagination-info span {
            color: #a5b4fc;
        }
        
        /* Footer */
        footer {
            padding: 2rem 5%;
            background: linear-gradient(135deg, #2d3e2d 0%, #3a4d3a 100%);
            color: white;
            text-align: center;
            position: relative;
            overflow: hidden;
            transition: all 0.5s ease;
        }
        
        body.dark-mode footer {
            background: linear-gradient(135deg, #0a0e1a 0%, #0f172a 100%);
        }
        
        .copyright {
            font-size: 0.8rem;
            opacity: 0.7;
        }
        
        body.dark-mode .copyright {
            opacity: 0.8;
        }
        
        /* Media Queries */
        @media (max-width: 1024px) {
            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
                gap: 2rem;
            }
            
            .modal-book-details {
                flex-direction: column;
            }
            
            .modal-book-cover {
                flex: none;
                width: 100%;
                max-width: 300px;
                margin: 0 auto;
            }
        }
        
        @media (max-width: 768px) {
            header {
                flex-direction: column;
                gap: 1rem;
                text-align: center;
            }
            
            nav {
                flex-direction: column;
                gap: 1rem;
            }
            
            .theme-toggle {
                margin-right: 0;
                margin-bottom: 1rem;
            }
            
            nav ul {
                gap: 1.5rem;
            }
            
            .hero-title {
                font-size: 2.5rem;
            }
            
            .search-container {
                margin: 1.5rem auto 2rem;
            }
            
            .books-grid {
                grid-template-columns: 1fr 1fr;
                gap: 1.5rem;
            }
            
            .book-cover {
                height: 280px;
            }
        }
        
        @media (max-width: 480px) {
            nav ul {
                flex-wrap: wrap;
                justify-content: center;
                gap: 0.8rem 1.2rem;
            }
            
            nav ul li a {
                font-size: 0.85rem;
            }
            
            .hero {
                padding: 3rem 5%;
            }
            
            .hero-title {
                font-size: 2rem;
            }
            
            .search-container {
                margin: 1rem auto 1.5rem;
                padding: 0 1rem;
            }
            
            .search-input {
                font-size: 0.9rem;
                padding: 0.8rem 2.5rem 0.8rem 1.2rem;
            }
            
            .search-icon {
                right: 1.2rem;
                width: 18px;
                height: 18px;
            }
            
            .pagination-container {
                flex-wrap: wrap;
                gap: 1rem;
                margin-top: 2rem;
            }
            
            .pagination-btn {
                font-size: 0.85rem;
                padding: 0.7rem 1.2rem;
            }
            
            .pagination-info {
                font-size: 0.9rem;
                width: 100%;
                text-align: center;
                order: -1;
            }
            
            .books-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            
            .filter-tabs {
                gap: 0.5rem;
            }
            
            .filter-tab {
                padding: 0.6rem 1rem;
                font-size: 0.8rem;
            }
            
            .modal-content {
                margin: 1rem;
            }
            
            .modal-book-actions {
                flex-direction: column;
            }
            
            .action-button {
                width: 100%;
                text-align: center;
            }
            
            .custom-audio-player {
                flex-wrap: wrap;
                gap: 0.8rem;
            }
            
            .audio-progress-container {
                width: 100%;
                order: 2;
            }
        }
 
        /* Modal Audio Player - New Design */
        .modal-audio-player {
            margin-top: 2rem;
            padding: 1.5rem;
            background: linear-gradient(135deg, rgba(107, 142, 91, 0.08) 0%, rgba(144, 164, 127, 0.08) 100%);
            border-radius: 15px;
            border: 1px solid rgba(107, 142, 91, 0.15);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        body.dark-mode .modal-audio-player {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
            border-color: rgba(99, 102, 241, 0.15);
        }

        .modal-audio-player:hover {
            background: linear-gradient(135deg, rgba(107, 142, 91, 0.12) 0%, rgba(144, 164, 127, 0.12) 100%);
            border-color: rgba(107, 142, 91, 0.25);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(107, 142, 91, 0.15);
        }

        body.dark-mode .modal-audio-player:hover {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
            border-color: rgba(99, 102, 241, 0.25);
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
        }

        .audio-player-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(107, 142, 91, 0.1);
        }

        body.dark-mode .audio-player-header {
            border-bottom-color: rgba(99, 102, 241, 0.1);
        }

        .audio-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #2d3e2d;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .audio-title::before {
            content: '🎵';
            font-size: 1.2rem;
        }

        body.dark-mode .audio-title {
            color: #e0e0e0;
        }

        .audio-status {
            font-size: 0.85rem;
            color: #7a9c6a;
            font-weight: 500;
            padding: 0.3rem 0.8rem;
            background: rgba(107, 142, 91, 0.1);
            border-radius: 20px;
        }

        body.dark-mode .audio-status {
            color: #a5b4fc;
            background: rgba(99, 102, 241, 0.1);
        }

        .audio-controls {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        /* Center children (including control buttons) horizontally within the modal audio player */
        .modal-audio-player .audio-controls {
            align-items: center;
            width: 100%;
        }

        /* Keep progress section stretching full width while the container is centered */
        .modal-audio-player .audio-progress-section {
            width: 100%;
        }

        .audio-progress-section {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .progress-bar-container {
            position: relative;
            width: 100%;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background-color: rgba(107, 142, 91, 0.2);
            border-radius: 4px;
            position: relative;
            cursor: pointer;
            overflow: hidden;
        }

        body.dark-mode .progress-bar {
            background-color: rgba(99, 102, 241, 0.2);
        }

        .progress-fill {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #6b8e5b 0%, #90a47f 100%);
            border-radius: 4px;
            transition: width 0.1s linear;
        }

        body.dark-mode .progress-fill {
            background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
        }

        .progress-handle {
            position: absolute;
            top: 50%;
            left: 0%;
            width: 16px;
            height: 16px;
            background: #6b8e5b;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            cursor: pointer;
            border: 2px solid white;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        body.dark-mode .progress-handle {
            background: #6366f1;
            border-color: rgba(255, 255, 255, 0.3);
        }

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

        .progress-bar:hover {
            height: 10px;
            transition: height 0.2s ease;
        }

        .time-display {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: #5a6d5a;
            font-weight: 500;
        }

        body.dark-mode .time-display {
            color: #a0a0a0;
        }

        .control-buttons {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.8rem;
            flex-wrap: nowrap;
            width: 100%;
            margin: 0 auto;
        }

        /* Ensure inner wrapper lays out buttons horizontally and stays centered */
        .button-wraper {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.8rem;
            margin: 0 auto;
        }

        /* Ensure control buttons are horizontally centered within the modal audio player */
        .modal-audio-player .control-buttons {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            margin: 0 auto;
            align-self: center; /* ensure the entire control group centers within the parent flex column */
            text-align: center; /* extra safety for older browsers */
        }

        /* Ensure buttons participate in text centering fallback */
        .modal-audio-player .control-buttons .control-btn {
            display: inline-flex;
        }

        .control-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: rgba(107, 142, 91, 0.1);
            border: 1px solid rgba(107, 142, 91, 0.2);
            color: #6b8e5b;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        body.dark-mode .control-btn {
            background: rgba(99, 102, 241, 0.1);
            border-color: rgba(99, 102, 241, 0.2);
            color: #a5b4fc;
        }

        .control-btn:hover {
            background: rgba(107, 142, 91, 0.2);
            border-color: #6b8e5b;
            transform: scale(1.1);
        }

        body.dark-mode .control-btn:hover {
            background: rgba(99, 102, 241, 0.2);
            border-color: #6366f1;
        }

        .control-btn:active {
            transform: scale(0.95);
        }

        .play-btn {
            width: 55px;
            height: 55px;
            background: linear-gradient(135deg, #6b8e5b 0%, #5a7a4a 100%);
            border: none;
            color: white;
            box-shadow: 0 5px 15px rgba(107, 142, 91, 0.3);
        }

        body.dark-mode .play-btn {
            background: linear-gradient(135deg, #6366f1 0%, #4c1d95 100%);
            box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
        }

        .play-btn:hover {
            background: linear-gradient(135deg, #5a7a4a 0%, #4a6a3a 100%);
            box-shadow: 0 8px 20px rgba(107, 142, 91, 0.4);
        }

        body.dark-mode .play-btn:hover {
            background: linear-gradient(135deg, #4c1d95 0%, #3b1a6b 100%);
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
        }



        /* Responsive design for modal audio player */
        @media (max-width: 768px) {
            .modal-audio-player {
                padding: 1rem;
                margin-top: 1.5rem;
            }

            .audio-player-header {
                flex-direction: column;
                gap: 0.8rem;
                align-items: flex-start;
            }

            .control-buttons {
                justify-content: center;
                gap: 0.6rem;
                flex-wrap: nowrap;
            }

            .button-wraper {
                gap: 0.6rem;
            }



            .play-btn {
                width: 45px;
                height: 45px;
            }

            .control-btn {
                width: 35px;
                height: 35px;
            }
        }

        @media (max-width: 480px) {
            .modal-audio-player {
                padding: 0.8rem;
                border-radius: 10px;
            }

            .audio-title {
                font-size: 1rem;
            }

            .audio-status {
                font-size: 0.8rem;
                padding: 0.2rem 0.6rem;
            }

            .control-buttons {
                gap: 0.4rem;
                flex-wrap: nowrap;
            }

            .button-wraper {
                gap: 0.4rem;
            }

            .play-btn {
                width: 40px;
                height: 40px;
            }

            .control-btn {
                width: 30px;
                height: 30px;
            }



            .time-display {
                font-size: 0.8rem;
            }

            .progress-bar {
                height: 6px;
            }

            .progress-bar:hover {
                height: 8px;
            }
        }
 