  @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #6366f1;
            --secondary: #8b5cf6;
            --accent: #ec4899;
            --dark: #0f0f23;
            --darker: #070718;
            --card-bg: rgba(255, 255, 255, 0.03);
            --text-primary: #ffffff;
            --text-secondary: #94a3b8;
            --neon-blue: #00d4ff;
            --neon-pink: #ff0080;
            --neon-purple: #8000ff;
            --success: #10b981;
            --warning: #f59e0b;
            --sidebar-width: 320px;
        }

        body {
            font-family: 'Space Grotesk', sans-serif;
            background: var(--dark);
            color: var(--text-primary);
            cursor: none;
            overflow-x: hidden;
        }

        /* Custom Cursor */
        .cursor {
            position: fixed;
            width: 20px;
            height: 20px;
            background: radial-gradient(circle, var(--neon-blue), transparent);
            border-radius: 50%;
            pointer-events: none;
            z-index: 9999;
            mix-blend-mode: difference;
            transition: transform 0.15s ease;
        }

        /* Animated Background */
        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
        }

        .bg-animation::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 85% 75%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 45% 60%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
            animation: bgPulse 20s ease-in-out infinite alternate;
        }

        @keyframes bgPulse {
            0% { opacity: 0.4; transform: scale(1) rotate(0deg); }
            100% { opacity: 0.8; transform: scale(1.1) rotate(3deg); }
        }

        /* Layout */
        .browse-container {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar Filters */
        .filter-sidebar {
            width: var(--sidebar-width);
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(20px);
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            padding: 2rem;
            position: fixed;
            height: calc(100vh - 80px);
            left: 0;
            top: 80px;
            z-index: 100;
            overflow-y: auto;
        }

        .filter-header {
            display: none;
        }

        .logo {
            font-size: 2rem;
            font-weight: 700;
            letter-spacing: -2px;
            background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink), var(--neon-purple));
            background-size: 300% 300%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradientFlow 6s ease-in-out infinite;
        }

        @keyframes gradientFlow {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .back-btn {
            background: transparent;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 50px;
            padding: 8px 16px;
            color: var(--text-secondary);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .back-btn:hover {
            border-color: var(--primary);
            color: var(--text-primary);
            transform: translateX(-2px);
        }

        /* Search */
        .search-container {
            position: relative;
            margin-bottom: 2rem;
        }

        .search-input {
            width: 100%;
            padding: 16px 50px 16px 20px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 50px;
            color: var(--text-primary);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }

        .search-icon {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 1.2rem;
        }

        /* Filter Groups */
        .filter-group {
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .filter-group:last-child {
            border-bottom: none;
        }

        .filter-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .filter-options {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .filter-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .filter-option:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .filter-checkbox {
            appearance: none;
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .filter-checkbox:checked {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-color: var(--primary);
        }

        .filter-checkbox:checked::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-weight: bold;
            font-size: 12px;
        }

        .filter-label {
            color: var(--text-secondary);
            cursor: pointer;
            flex: 1;
        }

        .filter-count {
            color: var(--text-secondary);
            font-size: 0.8rem;
            background: rgba(255, 255, 255, 0.1);
            padding: 2px 8px;
            border-radius: 12px;
        }

        /* Price Range Slider */
        .price-range {
            margin: 1rem 0;
        }

        .price-slider {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.1);
            outline: none;
            appearance: none;
        }

        .price-slider::-webkit-slider-thumb {
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        .price-values {
            display: flex;
            justify-content: space-between;
            margin-top: 0.5rem;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Clear Filters */
        .clear-filters {
            width: 100%;
            padding: 12px;
            background: transparent;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            color: var(--text-secondary);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 1rem;
        }

        .clear-filters:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: var(--sidebar-width);
            padding: 2rem;
            margin-top: 80px;
            overflow-y: auto;
        }

        /* Header */
        .content-header {
            margin-bottom: 3rem;
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .page-title {
            font-size: 3rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .view-controls {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .view-toggle {
            display: flex;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 4px;
        }

        .view-btn {
            padding: 8px 12px;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        .view-btn.active {
            background: var(--primary);
            color: white;
        }

        .sort-select {
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
        }

        .sort-select option {
            background-color: var(--darker);
            color: var(--text-primary);
        }

        .sort-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* Categories Overview */
        .categories-overview {
            margin-bottom: 3rem;
        }

        .categories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .category-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 2rem;
            text-align: center;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .category-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
            transition: left 0.8s;
        }

        .category-card:hover::before {
            left: 100%;
        }

        .category-card:hover {
            transform: translateY(-10px) rotateX(5deg);
            border-color: rgba(99, 102, 241, 0.3);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        }

        .category-card.active {
            border-color: var(--primary);
            background: rgba(99, 102, 241, 0.1);
        }

        .category-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
            display: block;
            filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
        }

        .category-name {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .category-count {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        .category-description {
            color: var(--text-secondary);
            font-size: 0.8rem;
            margin-top: 0.5rem;
            line-height: 1.4;
        }

        /* Books Grid */
        .books-section {
            margin-top: 3rem;
        }

        .section-header {
            display: flex;
            justify-content: between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .section-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 2rem;
        }

        /* List View */
        .books-grid.list-view {
            grid-template-columns: 1fr;
        }

        .books-grid.list-view .book-card {
            display: flex;
            gap: 2rem;
            align-items: flex-start;
        }

        .books-grid.list-view .book-cover-container {
            width: 200px;
            height: 280px;
            margin-bottom: 0;
            flex-shrink: 0;
        }

        .books-grid.list-view .book-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .books-grid.list-view .book-description {
            -webkit-line-clamp: 5;
        }

        @media (max-width: 600px) {
            .books-grid.list-view .book-card {
                flex-direction: column;
            }
            .books-grid.list-view .book-cover-container {
                width: 100%;
                height: 200px;
                margin-bottom: 1.5rem;
            }
        }

        .book-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 1.5rem;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .book-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
            transition: left 0.6s;
        }

        .book-card:hover::before {
            left: 100%;
        }

        .book-card:hover {
            transform: translateY(-8px);
            border-color: rgba(99, 102, 241, 0.3);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
        }

        .book-cover-container {
            position: relative;
            width: 100%;
            height: 200px;
            margin-bottom: 1.5rem;
            border-radius: 12px;
            overflow: hidden;
        }

        .book-cover {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
            background-size: 300% 300%;
            animation: gradientFlow 8s ease-in-out infinite;
            position: relative;
        }

        .book-cover::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(0.5px);
        }

        .book-price-tag {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
        }

        .price-free {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
            border: 1px solid var(--success);
        }

        .price-paid {
            background: rgba(99, 102, 241, 0.2);
            color: var(--primary);
            border: 1px solid var(--primary);
        }

        .book-info {
            text-align: left;
        }

        .book-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .book-author {
            color: var(--text-secondary);
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }

        .book-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .book-rating {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
        }

        .stars {
            color: #fbbf24;
        }

        .book-tags {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }

        .book-tag {
            background: rgba(255, 255, 255, 0.1);
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 0.7rem;
            color: var(--text-secondary);
        }

        .book-description {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 1rem;
        }

        .book-actions {
            display: flex;
            gap: 0.75rem;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 0.9rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            flex: 1;
        }

        .btn-outline {
            background: transparent;
            border: 2px solid rgba(255, 255, 255, 0.2);
            color: var(--text-secondary);
        }

        .btn:hover {
            transform: translateY(-2px);
        }

        .btn-primary:hover {
            box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
        }

        .btn-outline:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        /* Loading States */
        .loading-skeleton {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            animation: pulse 1.5s ease-in-out infinite alternate;
        }

        @keyframes pulse {
            from { opacity: 0.3; }
            to { opacity: 0.6; }
        }

        /* Responsive Design */
        @media (max-width: 1024px) {
            .filter-sidebar {
                transform: translateX(-100%);
                transition: transform 0.3s ease;
            }

            .filter-sidebar.open {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0;
                padding-top: 4rem;
            }

            .mobile-filter-toggle {
                position: fixed;
                top: 100px;
                left: 20px;
                z-index: 101;
                background: var(--primary);
                border: none;
                border-radius: 50px;
                padding: 12px 16px;
                color: white;
                cursor: pointer;
            }
        }

        @media (max-width: 768px) {
            .main-content {
                padding: 4rem 1rem 1rem 1rem;
            }

            .page-title {
                font-size: 2rem;
            }

            .header-top {
                flex-direction: column;
                gap: 1rem;
                align-items: flex-start;
            }

            .categories-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }

            .books-grid {
                grid-template-columns: 1fr;
            }
        }