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

        :root {
            --navy:      #0f2847;
            --navy2:     #1a3a5c;
            --navy3:     #0b1e35;
            --gold:      #c9a84c;
            --gold2:     #e8c96a;

            --primary: var(--gold);
            --primary-dark: #a8893a;
            --secondary: var(--gold2);
            --dark: var(--navy3);
            --dark-light: var(--navy);
            --light: #f4f4f9;
            --text-light: #e0e0e0;
            --shadow: 0 10px 30px rgba(0,0,0,0.4);
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
            color: var(--text-light);
            min-height: 100vh;
            padding-bottom: 60px;
        }

        .header {
            background: rgba(11, 30, 53, 0.95);
            backdrop-filter: blur(10px);
            padding: 1.5rem 2rem;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 2px solid var(--primary);
        }

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

       .logo {
           font-size: 2rem;
           font-weight: bold;
       }
       
       .logo a {
           text-decoration: none;
           background: linear-gradient(135deg, var(--primary), var(--secondary));
           -webkit-background-clip: text;
           -webkit-text-fill-color: transparent;
           background-clip: text;
           display: inline-block;
       }
       
       .logo-img {
           vertical-align: middle;
           margin-right: 0.5rem;
           width: 50px;
           height: 50px;
       }

        .user-actions {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(201, 168, 76, 0.4);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-light);
            border: 2px solid var(--primary);
        }

        .btn-secondary:hover {
            background: var(--primary);
            color: white;
        }

        .subscription-badge {
            background: linear-gradient(135deg, #FFD700, #FFA500);
            color: var(--dark);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: bold;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
        }

        .hero {
            text-align: center;
            padding: 3rem 0;
            margin-bottom: 3rem;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, white, var(--text-light));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero p {
            font-size: 1.2rem;
            color: var(--text-light);
            opacity: 0.8;
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .book-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            padding: 0;  /* Remove any padding */
        }

        .book-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(201, 168, 76, 0.3);
            border-color: var(--primary);
        }

        .book-card::after {
            content: 'View';
            position: absolute;
            bottom: 1rem;
            right: 1rem;
            background: rgba(201, 168, 76, 0.9);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .book-card:hover::after {
            opacity: 1;
        }

        .book-cover {
            width: 100%;
            height: 450px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            color: white;
            overflow: hidden;
            position: relative;
            margin: 0;  /* Remove margin */
            padding: 0;  /* Remove padding */
        }

        .book-cover img {
            width: 100%;
            height: 100%;
            object-fit: contain;  /* Shows full cover */
            object-position: center;
            display: block;
            background: #0b1e35;  /* Dark background for sides */
        }

        .book-info {
            padding: 1.5rem;
        }

        .book-title {
            font-size: 1.3rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
            color: white;
        }

        .book-author {
            color: var(--primary);
            font-size: 1rem;
            margin-bottom: 0.75rem;
        }

        .book-description {
            font-size: 0.9rem;
            color: var(--text-light);
            opacity: 0.7;
            line-height: 1.5;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--dark-light);
            border-radius: 16px;
            padding: 2rem;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            border: 2px solid var(--primary);
            animation: slideIn 0.3s ease;
            position: relative;
        }

        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .modal-header h2 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .modal-price {
            font-size: 3rem;
            font-weight: bold;
            color: var(--primary);
            margin: 1rem 0;
        }

        .modal-features {
            list-style: none;
            margin: 2rem 0;
        }

        .modal-features li {
            padding: 0.75rem 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .modal-features li:before {
            content: "";
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-size: contain;
        }

        .modal-actions {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

        .modal-actions .btn {
            flex: 1;
        }

        .close-modal {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            font-size: 2rem;
            color: var(--text-light);
            cursor: pointer;
            opacity: 0.7;
        }

        .close-modal:hover {
            opacity: 1;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .form-group label {
            font-size: 0.9rem;
            color: var(--text-light);
        }

        .form-group input {
            padding: 0.75rem;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            color: white;
            font-size: 1rem;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .auth-switch {
            text-align: center;
            margin-top: 1rem;
            font-size: 0.9rem;
        }

        .auth-switch a {
            color: var(--primary);
            cursor: pointer;
            text-decoration: none;
        }

        .auth-switch a:hover {
            text-decoration: underline;
        }

        .loading {
            text-align: center;
            padding: 3rem;
            font-size: 1.2rem;
        }

        .spinner {
            border: 4px solid rgba(255, 255, 255, 0.1);
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 0 auto 1rem;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: var(--dark-light);
            color: white;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            border-left: 4px solid var(--primary);
            box-shadow: var(--shadow);
            z-index: 2000;
            animation: slideInRight 0.3s ease;
            max-width: 400px;
        }

        .toast.success {
            border-left-color: #4CAF50;
        }

        .toast.error {
            border-left-color: #f44336;
        }

        /* Search Container */
        .search-container {
            max-width: 700px;
            margin: 0 auto 3rem;
            position: relative;
        }

        .search-box {
            position: relative;
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 50px;
            padding: 0.75rem 1.5rem;
            transition: all 0.3s ease;
        }

        .search-box:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 20px rgba(201, 168, 76, 0.25);
            background: rgba(255, 255, 255, 0.08);
        }

        .search-icon {
            color: var(--text-light);
            opacity: 0.5;
            margin-right: 1rem;
            flex-shrink: 0;
        }

        .search-input {
            flex: 1;
            background: transparent;
            border: none;
            color: white;
            font-size: 1rem;
            outline: none;
            padding: 0.5rem 0;
        }

        .search-input::placeholder {
            color: var(--text-light);
            opacity: 0.5;
        }

        .clear-search {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            font-size: 1.5rem;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            margin-left: 0.5rem;
        }

        .clear-search:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .search-results {
            position: absolute;
            top: calc(100% + 0.5rem);
            left: 0;
            right: 0;
            background: var(--dark-light);
            border: 2px solid var(--primary);
            border-radius: 16px;
            max-height: 400px;
            overflow-y: auto;
            z-index: 100;
            display: none;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        .search-results.active {
            display: block;
        }

        .search-result-item {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

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

        .search-result-item:hover {
            background: rgba(201, 168, 76, 0.15);
        }

        .search-result-cover {
            width: 50px;
            height: 70px;
            border-radius: 4px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
            overflow: hidden;
        }

        .search-result-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .search-result-info {
            flex: 1;
        }

        .search-result-title {
            font-weight: bold;
            color: white;
            margin-bottom: 0.25rem;
        }

        .search-result-author {
            font-size: 0.9rem;
            color: var(--primary);
        }

        .search-no-results {
            padding: 2rem;
            text-align: center;
            color: var(--text-light);
            opacity: 0.7;
        }

        .search-highlight {
            background: rgba(201, 168, 76, 0.25);
            padding: 0 2px;
            border-radius: 2px;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2rem;
            }
            
            .books-grid {
                grid-template-columns: repeat(2, 1fr);  /* 2 columns on mobile */
                gap: 1rem;
                padding: 0 0.5rem;
            }

            .book-cover {
                height: 280px;  /* Shorter height for mobile */
            }

            .book-card {
                border-radius: 8px;
            }

            .header-content {
                flex-direction: column;
                gap: 1rem;
            }

            .modal-content {
                width: 95%;
                padding: 1.5rem;
            }

            .user-actions {
                flex-wrap: wrap;
                justify-content: center;
            }

            .btn {
                padding: 0.6rem 1.2rem;
                font-size: 0.9rem;
            }
        }

        /* Add this new media query for very small phones */
        @media (max-width: 480px) {
            .books-grid {
                grid-template-columns: 1fr;  /* 1 column on very small screens */
                gap: 1.5rem;
            }

            .book-cover {
                height: 350px;  /* Taller for single column */
            }
        }

        /* Install Prompt Banner */
        /* Install FAB */
        .install-fab {
            display: none;
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 1500;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.75rem;
        }

        .install-fab.visible {
            display: flex;
            animation: fabIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

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

        .install-fab-tooltip {
            background: var(--dark-light);
            border: 1px solid rgba(255,255,255,0.12);
            color: var(--text-light);
            font-size: 0.82rem;
            padding: 0.5rem 0.85rem;
            border-radius: 8px;
            white-space: nowrap;
            box-shadow: 0 4px 16px rgba(0,0,0,0.4);
            opacity: 0;
            transform: translateX(10px);
            transition: all 0.2s ease;
            pointer-events: none;
        }

        .install-fab:hover .install-fab-tooltip {
            opacity: 1;
            transform: translateX(0);
        }

        .install-fab-btn {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            border: none;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
            transition: all 0.25s ease;
            position: relative;
        }

        .install-fab-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 28px rgba(201, 168, 76, 0.6);
        }

        .install-fab-btn:active {
            transform: scale(0.96);
        }
