
        :root {
            --primary-color: #FF8C00;
            --secondary-color: #FFA500;
            --accent-color: #FFB84D;
            --text-dark: #333333;
            --text-light: #666666;
            --bg-light: #FFF8F0;
            --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
            --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background: linear-gradient(135deg, #FFF8F0 0%, #FFE8CC 100%);
            min-height: 100vh;
        }

        /* Header Section */
        .elibrary-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            padding: 2rem 1rem;
            box-shadow: var(--shadow-md);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
        }

        .elibrary-title {
            color: white;
            font-size: clamp(1.5rem, 4vw, 2.5rem);
            font-weight: 700;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
            margin-bottom: 1.5rem;
            text-align: center;
            letter-spacing: 2px;
        }

        /* Modern Search Bar */
        .modern-searchbar {
            max-width: 700px;
            margin: 0 auto;
            position: relative;
        }

        .search-wrapper {
            background: white;
            border-radius: 50px;
            padding: 0.5rem 1.5rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            box-shadow: var(--shadow-lg);
            transition: all 0.3s ease;
        }

        .search-wrapper:focus-within {
            box-shadow: 0 8px 32px rgba(255, 140, 0, 0.3);
            transform: translateY(-2px);
        }

        .search-icon {
            color: var(--primary-color);
            width: 24px;
            height: 24px;
        }

        .search-input {
            flex: 1;
            border: none;
            outline: none;
            font-size: 1rem;
            padding: 0.75rem 0;
            color: var(--text-dark);
        }

        .search-input::placeholder {
            color: #999;
        }

        .voice-search-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 50%;
            transition: background 0.3s ease;
        }

        .voice-search-btn:hover {
            background: rgba(255, 140, 0, 0.1);
        }

        .voice-search {
            width: 24px;
            height: 24px;
        }

        /* Main Container */
        .main-container {
            max-width: 1400px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        /* Sidebar */
        .elibrary-sidebar {
            background: white;
            border-radius: 20px;
            padding: 1.5rem;
            box-shadow: var(--shadow-md);
            position: sticky;
            top: 140px;
            height: fit-content;
        }

        .sidebar-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 3px solid var(--primary-color);
        }

        .category-btn {
            width: 100%;
            background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
            border: 2px solid transparent;
            color: var(--text-dark);
            padding: 0.875rem 1.25rem;
            margin-bottom: 0.75rem;
            border-radius: 12px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            cursor: pointer;
            text-align: left;
            position: relative;
            overflow: hidden;
            text-decoration: none;
            display: block;
        }

        .category-btn::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: var(--primary-color);
            transform: scaleY(0);
            transition: transform 0.3s ease;
        }

        .category-btn:hover {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            transform: translateX(8px);
            border-color: var(--primary-color);
        }

        .category-btn:hover::before {
            transform: scaleY(1);
        }

        .category-btn.active {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            border-color: var(--primary-color);
        }

        /* Toggle button styling */
        .toggle-btn {
            position: relative;
            padding-right: 3rem;
        }

        .toggle-icon {
            position: absolute;
            right: 1.25rem;
            top: 50%;
            transform: translateY(-50%);
            transition: transform 0.3s ease;
            font-size: 0.8rem;
        }

        .category-btn.expanded .toggle-icon {
            transform: translateY(-50%) rotate(180deg);
        }

        /* Sub categories container */
        .sub-categories {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease, opacity 0.4s ease;
            opacity: 0;
        }

        .sub-categories.show {
            max-height: 1000px;
            opacity: 1;
        }

        /* Sub category buttons indent */
        .sub-category-btn {
            padding-left: 2rem;
            font-size: 0.9rem;
            background: linear-gradient(135deg, #FFF5E6 0%, white 100%);
        }

        .sub-category-btn:hover {
            padding-left: 2.5rem;
        }

        /* Back button styling */
        .back-btn {
            background: linear-gradient(135deg, #E8E8E8 0%, #F5F5F5 100%);
            color: var(--text-dark);
            font-weight: 700;
            margin-top: 0.5rem;
            border: 2px solid #DDD;
        }

        .back-btn:hover {
            background: linear-gradient(135deg, #D0D0D0 0%, #E0E0E0 100%);
            border-color: var(--primary-color);
            transform: translateX(-5px);
        }

        /* Main categories wrapper */
        .main-categories {
            /* Keep visible always - accordion style */
        }

        /* Mobile Sidebar Toggle */
        .sidebar-toggle {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            border: none;
            border-radius: 50%;
            width: 60px;
            height: 60px;
            box-shadow: var(--shadow-lg);
            cursor: pointer;
            z-index: 999;
            font-size: 1.5rem;
            align-items: center;
            justify-content: center;
        }

        /* Book Grid */
        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 2rem;
            padding: 1rem;
        }

        /* Book Card Styles */
        .book-card {
            perspective: 1000px;
            height: 400px;
            cursor: pointer;
        }

        .book-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.6s;
            transform-style: preserve-3d;
        }

        .book-card:hover .book-card-inner {
            transform: rotateY(180deg);
        }

        .book-card-front,
        .book-card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        }

        .book-card-front {
            background: white;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 1.5rem;
            transition: all 0.3s ease;
        }

        .book-card:hover .book-card-front {
            box-shadow: 0 12px 32px rgba(255, 140, 0, 0.3);
        }

        .book-cover-wrapper {
            width: 100%;
            height: 240px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            position: relative;
            overflow: hidden;
            border-radius: 12px;
            background: linear-gradient(135deg, #FFF8F0 0%, #FFE8CC 100%);
        }

        .book-cover {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.3s ease;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

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

        .book-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
            width: 100%;
        }

        .book-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #333;
            margin-bottom: 0.5rem;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 2.8em;
        }

        .book-author {
            font-size: 0.9rem;
            color: #666;
            font-style: italic;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .book-author::before {
            content: "✍️ ";
        }

        .book-card-back {
            background: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
            transform: rotateY(180deg);
            display: flex;
            flex-direction: column;
            padding: 2rem 1.5rem;
            color: white;
        }

        .book-back-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 1rem;
            text-align: center;
            border-bottom: 2px solid rgba(255, 255, 255, 0.5);
            padding-bottom: 0.75rem;
        }

        .book-excerpt {
            flex: 1;
            font-size: 0.95rem;
            line-height: 1.6;
            overflow-y: auto;
            text-align: justify;
            margin-bottom: 1rem;
            padding-right: 0.5rem;
        }

        .book-excerpt::-webkit-scrollbar {
            width: 6px;
        }

        .book-excerpt::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

        .book-excerpt::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
        }

        .book-excerpt::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        .read-more-btn {
            background: white;
            color: #FF8C00;
            border: none;
            padding: 0.875rem 1.5rem;
            border-radius: 50px;
            font-weight: 700;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        .read-more-btn:hover {
            background: #FFE8CC;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.3);
            color: #FF8C00;
        }

        .read-more-btn::after {
            content: "→";
            font-size: 1.2rem;
        }

        /* Pagination */
        .pagination-wrapper {
            display: flex;
            justify-content: center;
            margin: 3rem 0;
        }

        .pagination {
            background: white;
            padding: 1rem 1.5rem;
            border-radius: 50px;
            box-shadow: var(--shadow-md);
        }

        .pagination .page-link {
            color: var(--primary-color);
            border: none;
            padding: 0.5rem 1rem;
            margin: 0 0.25rem;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .pagination .page-link:hover {
            background: var(--primary-color);
            color: white;
            transform: translateY(-2px);
        }

        .pagination .page-item.active .page-link {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            border: none;
            color: white !important;
        }

        /* Modal Styling */
        .modal-content {
            border-radius: 20px;
            border: none;
            overflow: hidden;
        }

        .modal-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            border: none;
            padding: 1.5rem;
        }

        .modal-body {
            padding: 2rem;
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .modal-body .btn {
            padding: 0.875rem 2rem;
            border-radius: 12px;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .modal-body .btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        /* Overlay for mobile sidebar */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .sidebar-overlay.active {
            display: block;
            opacity: 1;
        }

        /* Responsive Design */
        @media (max-width: 1024px) {
            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                gap: 1.5rem;
            }
        }

        @media (max-width: 768px) {
            .elibrary-header {
                padding: 1.5rem 1rem;
            }

            .elibrary-sidebar {
                position: fixed;
                left: -100%;
                top: 0;
                bottom: 0;
                width: 280px;
                z-index: 1001;
                transition: left 0.3s ease;
                border-radius: 0 20px 20px 0;
                overflow-y: auto;
            }

            .elibrary-sidebar.active {
                left: 0;
            }

            .sidebar-toggle {
                display: flex;
            }

            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
                gap: 1rem;
            }

            .search-wrapper {
                padding: 0.4rem 1rem;
            }

            .book-card {
                height: 380px;
            }

            .book-cover-wrapper {
                height: 220px;
            }
        }

        @media (max-width: 480px) {
            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 0.875rem;
            }

            .elibrary-title {
                font-size: 1.5rem;
            }

            .book-card {
                height: 350px;
            }

            .book-cover-wrapper {
                height: 200px;
            }
        }
