:root {
            --primary-color: #ff4757;
            --primary-light: #ff6b81;
            --primary-dark: #e84118;
            --secondary-color: #2f3542;
            --secondary-light: #57606f;
            --secondary-dark: #1e272e;
            --text-light: #f1f2f6;
            --text-dark: #2f3542;
            --text-muted: #747d8c;
            --bg-light: #ffffff;
            --bg-dark: #1e272e;
            --card-bg: #ffffff;
            --card-bg-dark: #2f3542;
            --gradient: linear-gradient(135deg, #ff4757, #2f3542);
            --gradient-light: linear-gradient(135deg, #ff6b81, #57606f);
            --gradient-dark: linear-gradient(135deg, #e84118, #1e272e);
            --message-sent-bg: linear-gradient(135deg, #ff4757, #ff6b81);
            --message-received-bg: #f1f2f6;
            --message-received-text: #2f3542;
            --typing-indicator-bg: #f1f2f6;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
            --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
            --border-radius: 12px;
            --border-radius-sm: 8px;
            --border-radius-xs: 6px;
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            --transition-fast: all 0.15s ease;
            --header-height: 70px;
            --nav-height: 70px;
            --max-width: 1200px;
        }

        [data-theme="dark"] {
            --primary-color: #ff6b81;
            --primary-light: #ff8fa3;
            --primary-dark: #ff4757;
            --secondary-color: #1e272e;
            --secondary-light: #2f3542;
            --secondary-dark: #12181f;
            --text-light: #f1f2f6;
            --text-dark: #dfe4ea;
            --text-muted: #a4b0be;
            --bg-light: #2f3542;
            --bg-dark: #1e272e;
            --card-bg: #2f3542;
            --card-bg-dark: #1e272e;
            --gradient: linear-gradient(135deg, #ff6b81, #1e272e);
            --gradient-light: linear-gradient(135deg, #ff8fa3, #2f3542);
            --gradient-dark: linear-gradient(135deg, #ff4757, #12181f);
            --message-sent-bg: linear-gradient(135deg, #ff6b81, #ff4757);
            --message-received-bg: #1e272e;
            --message-received-text: #dfe4ea;
            --typing-indicator-bg: #1e272e;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
            --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s, border-color 0.3s;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--bg-light);
            color: var(--text-dark);
            min-height: 100vh;
            padding-top: var(--header-height);
            padding-bottom: var(--nav-height);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Enhanced Header with Glass Morphism */
        .header {
            background-color: rgba(47, 53, 66, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--text-light);
            height: var(--header-height);
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: var(--shadow-md);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            padding: 0 20px;
            transition: all 0.3s ease;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        [data-theme="dark"] .header {
            background-color: rgba(30, 39, 46, 0.95);
        }

        .header.scrolled {
            height: 60px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        }

        .logo-container {
            display: flex;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            background: var(--gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            display: flex;
            align-items: center;
            text-decoration: none;
            transition: transform 0.3s ease;
            position: relative;
            overflow: hidden;
            padding: 5px 0;
        }

        .logo::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: var(--gradient);
            transform-origin: right;
            transition: transform 0.3s ease;
        }

        .logo:hover {
            transform: scale(1.05);
        }

        .logo:hover::after {
            transform: scaleX(1);
            transform-origin: left;
        }

        .logo i {
            margin-right: 10px;
            font-size: 1.5rem;
            color: var(--primary-color);
        }

        .logo-text {
            display: inline-block;
            position: relative;
        }

        .logo-text::after {
            content: '❤️‍🔥';
            position: absolute;
            right: -25px;
            top: -5px;
            font-size: 1.2rem;
            animation: pulse 1.5s infinite;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .search-container {
            position: relative;
            width: 250px;
            transition: all 0.3s ease;
        }

        .search-container.active {
            width: 300px;
        }

        .search-input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border: none;
            border-radius: 30px;
            background-color: rgba(255, 255, 255, 0.1);
            color: var(--text-light);
            font-family: 'Poppins', sans-serif;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .search-input:focus {
            outline: none;
            background-color: rgba(255, 255, 255, 0.2);
            box-shadow: 0 0 0 2px var(--primary-color);
        }

        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
            opacity: 0.7;
            font-size: 1rem;
        }

        .search-results {
            position: absolute;
            top: calc(100% + 5px);
            left: 0;
            right: 0;
            background-color: var(--card-bg);
            border-radius: var(--border-radius-sm);
            box-shadow: var(--shadow-xl);
            max-height: 400px;
            overflow-y: auto;
            z-index: 1001;
            display: none;
            animation: fadeIn 0.3s ease;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        [data-theme="dark"] .search-results {
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

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

        .search-result-item {
            padding: 12px 15px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        [data-theme="dark"] .search-result-item {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .search-result-item:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        [data-theme="dark"] .search-result-item:hover {
            background-color: rgba(255, 255, 255, 0.05);
        }

        .search-result-item h4 {
            font-size: 0.95rem;
            color: var(--text-dark);
            margin-bottom: 5px;
            font-weight: 500;
        }

        .search-result-item p {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .no-results {
            padding: 20px;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .theme-toggle {
            background: none;
            border: none;
            color: var(--text-light);
            font-size: 1.3rem;
            cursor: pointer;
            position: relative;
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: transform 0.5s ease, background-color 0.3s ease;
        }

        .theme-toggle:hover {
            transform: rotate(180deg) scale(1.1);
            background-color: rgba(255, 255, 255, 0.1);
        }

        .theme-toggle .sun {
            display: none;
            position: absolute;
        }

        .theme-toggle .moon {
            display: block;
            position: absolute;
        }

        [data-theme="dark"] .theme-toggle .sun {
            display: block;
        }

        [data-theme="dark"] .theme-toggle .moon {
            display: none;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-color);
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--gradient);
            color: white;
            font-weight: 600;
            font-size: 1rem;
            position: relative;
            overflow: hidden;
        }

        .user-avatar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .user-avatar:hover {
            transform: scale(1.1);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .user-avatar:hover::after {
            opacity: 1;
        }

        /* Bottom Navigation with Glass Morphism */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: rgba(47, 53, 66, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: var(--nav-height);
            z-index: 1000;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        [data-theme="dark"] .bottom-nav {
            background-color: rgba(30, 39, 46, 0.95);
        }

        .nav-item {
            color: var(--text-light);
            font-size: 1.3rem;
            padding: 10px;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
        }

        .nav-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: 50%;
            background: var(--gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
        }

        .nav-item:hover {
            transform: translateY(-5px);
            color: white;
        }

        .nav-item:hover::before {
            opacity: 1;
        }

        .nav-item.active {
            color: white;
            transform: translateY(-5px);
        }

        .nav-item.active::before {
            opacity: 1;
        }

        .nav-item.active::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 6px;
            height: 6px;
            background-color: var(--primary-color);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--primary-color);
        }

        .notification-badge {
            position: absolute;
            top: 5px;
            right: 5px;
            background-color: var(--primary-color);
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            animation: pulse 2s infinite;
            z-index: 1;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        .add-btn {
            background: var(--gradient);
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.7rem;
            transform: translateY(-20px);
            box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
            transition: var(--transition);
            cursor: pointer;
            border: none;
            outline: none;
            z-index: 1001;
            position: relative;
            overflow: hidden;
        }

        .add-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .add-btn:hover {
            transform: translateY(-20px) scale(1.1);
            box-shadow: 0 8px 25px rgba(255, 71, 87, 0.6);
            background: var(--gradient-light);
            animation: none;
        }

        .add-btn:hover::after {
            opacity: 1;
        }

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

        /* Main Content */
        .container {
            padding: 20px;
            max-width: var(--max-width);
            margin: 0 auto;
        }

        .page-title {
            font-size: 2rem;
            margin-bottom: 20px;
            color: var(--primary-color);
            position: relative;
            display: inline-block;
            font-weight: 600;
            padding-bottom: 8px;
        }

        .page-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 4px;
            background: var(--gradient);
            border-radius: 4px;
            transform-origin: left;
            animation: scaleIn 0.5s ease-out forwards;
        }

        @keyframes scaleIn {
            from { transform: scaleX(0); }
            to { transform: scaleX(1); }
        }

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

        .book-card {
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow-md);
            transition: var(--transition);
            position: relative;
            border: 1px solid rgba(0, 0, 0, 0.1);
            transform: translateY(30px);
            opacity: 0;
            animation: cardAppear 0.6s ease forwards;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        [data-theme="dark"] .book-card {
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        @keyframes cardAppear {
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .book-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
        }

        .book-img-container {
            height: 220px;
            overflow: hidden;
            position: relative;
            background-color: rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        [data-theme="dark"] .book-img-container {
            background-color: rgba(255, 255, 255, 0.05);
        }

        .book-img {
            width: auto;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

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

        .book-info {
            padding: 15px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .book-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-dark);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .book-author {
            font-size: 0.85rem;
            color: var(--primary-color);
            margin-bottom: 12px;
            font-weight: 500;
        }

        .book-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .book-meta i {
            margin-right: 5px;
            color: var(--primary-color);
            font-size: 0.8rem;
        }

        .book-admin-info {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: auto;
            padding-top: 10px;
            border-top: 1px dashed rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        [data-theme="dark"] .book-admin-info {
            border-top: 1px dashed rgba(255, 255, 255, 0.1);
        }

        .book-admin-info i {
            color: var(--primary-color);
            font-size: 0.8rem;
        }

        .download-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: var(--border-radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 500;
            font-size: 0.85rem;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            margin-top: 10px;
        }

        .download-btn::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -60%;
            width: 40px;
            height: 200%;
            background: rgba(255, 255, 255, 0.2);
            transform: rotate(30deg);
            transition: all 0.5s ease;
        }

        .download-btn:hover::after {
            left: 120%;
        }

        .download-btn i {
            margin-right: 8px;
            font-size: 0.8rem;
        }

        .download-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(255, 71, 87, 0.4);
            background: var(--gradient-light);
        }

        /* Enhanced Profile Page */
        .profile-page {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--bg-light);
            z-index: 2000;
            transform: translateX(100%);
            transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
            overflow-y: auto;
            padding: 20px;
            opacity: 0;
            visibility: hidden;
        }

        .profile-page.active {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
        }

        .profile-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 20px;
            padding-top: 20px;
            text-align: center;
            position: relative;
        }

        .profile-back-btn {
            background: none;
            border: none;
            color: var(--primary-color);
            font-size: 1.3rem;
            position: absolute;
            left: 0;
            top: 0;
            cursor: pointer;
            transition: transform 0.3s ease;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .profile-back-btn:hover {
            transform: translateX(-5px);
            background-color: rgba(255, 71, 87, 0.1);
        }

        .profile-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--primary-color);
            margin-bottom: 15px;
            background: var(--gradient);
            color: white;
            font-size: 2.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            box-shadow: var(--shadow-md);
            position: relative;
            overflow: hidden;
        }

        .profile-avatar::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(255, 255, 255, 0.3),
                rgba(255, 255, 255, 0)
            );
            transform: rotate(30deg);
            transition: all 0.5s ease;
        }

        .profile-avatar:hover::before {
            transform: rotate(30deg) translateX(50%);
        }

        .profile-info {
            width: 100%;
            margin-top: 10px;
        }

        .profile-info h2 {
            font-size: 1.8rem;
            margin-bottom: 8px;
            color: var(--text-dark);
            position: relative;
            display: inline-block;
            font-weight: 600;
        }

        .profile-info h2::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 50px;
            height: 3px;
            background: var(--gradient);
            border-radius: 3px;
        }

        .profile-username {
            color: var(--primary-color);
            margin-bottom: 8px;
            font-size: 1.1rem;
            font-weight: 500;
        }

        .profile-email {
            color: var(--text-muted);
            margin-bottom: 15px;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .profile-email i {
            margin-right: 8px;
            font-size: 0.95rem;
        }

        .profile-bio {
            margin: 20px 0;
            color: var(--text-dark);
            line-height: 1.7;
            padding: 20px;
            background-color: rgba(0, 0, 0, 0.05);
            border-radius: var(--border-radius);
            border-left: 4px solid var(--primary-color);
            font-size: 0.95rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        [data-theme="dark"] .profile-bio {
            background-color: rgba(255, 255, 255, 0.05);
        }

        .profile-bio::before {
            content: '"';
            position: absolute;
            top: 10px;
            left: 15px;
            font-size: 3.5rem;
            color: var(--primary-color);
            opacity: 0.1;
            font-family: serif;
            line-height: 1;
        }

        .profile-bio::after {
            content: '"';
            position: absolute;
            bottom: -20px;
            right: 15px;
            font-size: 3.5rem;
            color: var(--primary-color);
            opacity: 0.1;
            font-family: serif;
            line-height: 1;
        }

        .profile-stats {
            display: flex;
            justify-content: space-between;
            margin: 30px 0;
            background: rgba(0, 0, 0, 0.05);
            border-radius: var(--border-radius);
            padding: 20px;
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
        }

        [data-theme="dark"] .profile-stats {
            background: rgba(255, 255, 255, 0.05);
        }

        .profile-stats::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--gradient);
        }

        .stat-item {
            text-align: center;
            padding: 10px;
            flex: 1;
            transition: transform 0.3s ease;
            position: relative;
        }

        .stat-item:not(:last-child)::after {
            content: '';
            position: absolute;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            width: 1px;
            height: 40px;
            background-color: rgba(0, 0, 0, 0.1);
        }

        [data-theme="dark"] .stat-item:not(:last-child)::after {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .stat-item:hover {
            transform: translateY(-5px);
        }

        .stat-number {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 5px;
            position: relative;
            display: inline-block;
        }

        .stat-number::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 3px;
            background: var(--gradient);
            border-radius: 3px;
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 500;
        }

        .profile-books-title {
            font-size: 1.6rem;
            margin: 30px 0 20px;
            color: var(--primary-color);
            position: relative;
            display: inline-block;
            text-align: center;
            width: 100%;
            font-weight: 600;
        }

        .profile-books-title::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: var(--gradient);
            border-radius: 3px;
        }

        .profile-actions {
            display: flex;
            gap: 15px;
            margin-top: 25px;
            justify-content: center;
        }

        .edit-profile {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: var(--border-radius-sm);
            font-size: 1rem;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: var(--shadow-md);
            position: relative;
            overflow: hidden;
            flex: 1;
            max-width: 200px;
        }

        .edit-profile::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .edit-profile:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(255, 71, 87, 0.5);
            background: var(--gradient-light);
        }

        .edit-profile:hover::after {
            opacity: 1;
        }

        .logout-btn {
            background: var(--secondary-color);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: var(--border-radius-sm);
            font-size: 1rem;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: var(--shadow-md);
            position: relative;
            overflow: hidden;
            flex: 1;
            max-width: 200px;
        }

        .logout-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .logout-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(47, 53, 66, 0.3);
            background: var(--secondary-light);
        }

        .logout-btn:hover::after {
            opacity: 1;
        }

        /* Full Page Chat */
        .chat-page {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--bg-light);
            z-index: 2000;
            transform: translateX(100%);
            transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
            display: flex;
            flex-direction: column;
            opacity: 0;
            visibility: hidden;
        }

        .chat-page.active {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
        }

        .chat-header {
            padding: 15px;
            background: var(--gradient);
            color: white;
            text-align: center;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            height: var(--header-height);
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
        }

        .chat-back-btn {
            position: absolute;
            left: 15px;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            transition: transform 0.3s ease;
            background: none;
            border: none;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .chat-back-btn:hover {
            transform: translateX(-5px);
            background-color: rgba(255, 255, 255, 0.1);
        }

        .chat-title {
            font-size: 1.3rem;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background-color: var(--bg-light);
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .message {
            display: flex;
            flex-direction: column;
            max-width: 85%;
            opacity: 0;
            transform: translateY(10px);
            animation: messageAppear 0.4s forwards;
            animation-delay: 0.1s;
        }

        @keyframes messageAppear {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message.sent {
            align-self: flex-end;
            align-items: flex-end;
        }

        .message.received {
            align-self: flex-start;
            align-items: flex-start;
        }

        .message-content {
            padding: 12px 16px;
            border-radius: 18px;
            font-size: 1rem;
            line-height: 1.5;
            word-break: break-word;
            position: relative;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-sm);
        }

        .message.sent .message-content {
            background: var(--message-sent-bg);
            color: white;
            border-top-right-radius: 5px;
        }

        .message.received .message-content {
            background-color: var(--message-received-bg);
            color: var(--message-received-text);
            border-top-left-radius: 5px;
        }

        .message-time {
            font-size: 0.75rem;
            color: var(--text-dark);
            opacity: 0.7;
            margin-top: 6px;
            align-self: flex-end;
        }

        .message.sent .message-time {
            color: rgba(255, 255, 255, 0.7);
        }

        .message-sender {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 6px;
        }

        .chat-input-container {
            display: flex;
            padding: 15px;
            background-color: var(--bg-light);
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            align-items: center;
            box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.05);
        }

        [data-theme="dark"] .chat-input-container {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .chat-input {
            flex: 1;
            padding: 12px 16px;
            border: none;
            border-radius: 25px;
            font-family: 'Poppins', sans-serif;
            background-color: var(--typing-indicator-bg);
            color: var(--text-dark);
            outline: none;
            resize: none;
            max-height: 120px;
            overflow-y: auto;
            margin-right: 12px;
            font-size: 1rem;
            box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.1);
            transition: var(--transition);
        }

        [data-theme="dark"] .chat-input {
            box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
        }

        .chat-input:focus {
            box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.3), inset 0 1px 4px rgba(0, 0, 0, 0.1);
        }

        .send-btn {
            background: var(--gradient);
            color: white;
            border: none;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
            font-size: 1.2rem;
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
        }

        .send-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .send-btn:hover {
            transform: scale(1.1);
            background: var(--gradient-light);
            box-shadow: 0 4px 15px rgba(255, 71, 87, 0.5);
        }

        .send-btn:hover::after {
            opacity: 1;
        }

        .send-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            background: var(--secondary-light);
        }

        .typing-indicator {
            display: flex;
            align-items: center;
            padding: 10px 15px;
            background-color: var(--typing-indicator-bg);
            border-radius: 18px;
            margin-left: 20px;
            margin-bottom: 8px;
            align-self: flex-start;
            opacity: 0;
            transition: opacity 0.3s ease;
            font-size: 0.85rem;
            color: var(--text-muted);
            box-shadow: var(--shadow-sm);
        }

        .typing-indicator.active {
            opacity: 1;
        }

        .typing-indicator span {
            height: 7px;
            width: 7px;
            background-color: var(--primary-color);
            border-radius: 50%;
            display: inline-block;
            margin: 0 3px;
            animation: typingAnimation 1.4s infinite ease-in-out;
        }

        .typing-indicator span:nth-child(1) {
            animation-delay: 0s;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typingAnimation {
            0%, 60%, 100% {
                transform: translateY(0);
            }
            30% {
                transform: translateY(-4px);
            }
        }

        /* Message status indicators */
        .message-status {
            display: inline-block;
            margin-left: 6px;
            font-size: 0.8rem;
        }

        .message-status.sent {
            color: rgba(255, 255, 255, 0.7);
        }

        .message-status.delivered {
            color: rgba(255, 255, 255, 0.9);
        }

        /* Message bubble tail effect */
        .message.sent .message-content::after {
            content: '';
            position: absolute;
            right: -6px;
            top: 0;
            width: 12px;
            height: 20px;
            background: var(--message-sent-bg);
            clip-path: polygon(0 0, 100% 0, 100% 100%);
        }

        .message.received .message-content::after {
            content: '';
            position: absolute;
            left: -6px;
            top: 0;
            width: 12px;
            height: 20px;
            background: var(--message-received-bg);
            clip-path: polygon(0 0, 100% 0, 0 100%);
        }

        /* Loading Spinner */
        .spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            margin-right: 10px;
        }

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

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-muted);
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 15px;
            color: var(--primary-color);
            opacity: 0.7;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-15px); }
            60% { transform: translateY(-8px); }
        }

        .empty-state h3 {
            margin-bottom: 12px;
            color: var(--text-dark);
            font-size: 1.4rem;
            font-weight: 600;
        }

        .empty-state p {
            font-size: 0.95rem;
            max-width: 350px;
            margin: 0 auto;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        .modal.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            width: 90%;
            max-width: 450px;
            padding: 25px;
            box-shadow: var(--shadow-xl);
            transform: translateY(-30px);
            transition: transform 0.3s ease, opacity 0.3s ease;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        [data-theme="dark"] .modal-content {
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .modal.active .modal-content {
            transform: translateY(0);
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 1.7rem;
            color: var(--text-dark);
            cursor: pointer;
            background: none;
            border: none;
            transition: var(--transition);
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .close-modal:hover {
            color: var(--primary-color);
            transform: rotate(90deg);
            background-color: rgba(255, 71, 87, 0.1);
        }

        .modal-title {
            font-size: 1.7rem;
            margin-bottom: 20px;
            color: var(--primary-color);
            text-align: center;
            position: relative;
            padding-bottom: 12px;
            font-weight: 600;
        }

        .modal-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background: var(--gradient);
            border-radius: 4px;
        }

        .form-group {
            margin-bottom: 20px;
            position: relative;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--text-dark);
            font-size: 0.9rem;
        }

        .form-input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: var(--border-radius-sm);
            font-family: 'Poppins', sans-serif;
            background-color: var(--bg-light);
            color: var(--text-dark);
            transition: var(--transition);
            font-size: 0.95rem;
        }

        [data-theme="dark"] .form-input {
            border-color: rgba(255, 255, 255, 0.2);
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
        }

        .file-input-container {
            position: relative;
            overflow: hidden;
            display: inline-block;
            width: 100%;
        }

        .file-input-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 12px 18px;
            border-radius: var(--border-radius-sm);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            width: 100%;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
        }

        .file-input-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .file-input-btn:hover {
            background: var(--gradient-light);
        }

        .file-input-btn:hover::after {
            opacity: 1;
        }

        .file-input {
            position: absolute;
            left: 0;
            top: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        .file-name {
            margin-top: 8px;
            font-size: 0.85rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .submit-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 12px 18px;
            border-radius: var(--border-radius-sm);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            width: 100%;
            transition: var(--transition);
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
        }

        .submit-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .submit-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
            background: var(--gradient-light);
        }

        .submit-btn:hover::after {
            opacity: 1;
        }

        .auth-switch {
            text-align: center;
            margin-top: 15px;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .auth-switch a {
            color: var(--primary-color);
            font-weight: 500;
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .auth-switch a:hover {
            color: var(--primary-light);
            text-decoration: underline;
        }

        /* Discover Modal */
        .discover-list {
            max-height: 60vh;
            overflow-y: auto;
            padding-right: 10px;
        }

        .discover-item {
            display: flex;
            padding: 15px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            align-items: center;
            cursor: pointer;
            border-radius: var(--border-radius-sm);
            margin-bottom: 8px;
            background-color: rgba(0, 0, 0, 0.03);
        }

        [data-theme="dark"] .discover-item {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            background-color: rgba(255, 255, 255, 0.03);
        }

        .discover-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

        .discover-item:hover {
            background-color: rgba(0, 0, 0, 0.05);
            transform: translateX(5px);
        }

        [data-theme="dark"] .discover-item:hover {
            background-color: rgba(255, 255, 255, 0.05);
        }

        .discover-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--gradient);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            flex-shrink: 0;
            font-size: 1.1rem;
            box-shadow: var(--shadow-sm);
        }

        .discover-content {
            flex: 1;
        }

        .discover-title {
            font-size: 1rem;
            color: var(--text-dark);
            margin-bottom: 5px;
            font-weight: 600;
        }

        .discover-description {
            font-size: 0.85rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* Toast Notifications */
        .toast {
            position: fixed;
            top: 25px;
            right: 25px;
            padding: 15px 20px;
            border-radius: var(--border-radius-sm);
            background-color: var(--secondary-color);
            color: white;
            box-shadow: var(--shadow-xl);
            transform: translateX(150%);
            transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            z-index: 3000;
            display: flex;
            align-items: center;
            max-width: 350px;
            border-left: 5px solid var(--primary-color);
        }

        .toast.show {
            transform: translateX(0);
        }

        .toast.success {
            background-color: #27ae60;
            border-left-color: #2ecc71;
        }

        .toast.error {
            background-color: #e74c3c;
            border-left-color: #ff4757;
        }

        .toast.warning {
            background-color: #f39c12;
            border-left-color: #f1c40f;
        }

        .toast.info {
            background-color: #3498db;
            border-left-color: #2980b9;
        }

        .toast i {
            margin-right: 10px;
            font-size: 1.2rem;
        }

        .toast-close {
            margin-left: 15px;
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.2s ease;
            font-size: 1rem;
        }

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

        /* Book Status Badges */
        .status-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 4px 8px;
            border-radius: var(--border-radius-xs);
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            z-index: 1;
            box-shadow: var(--shadow-sm);
        }

        .status-approved {
            background-color: #27ae60;
            color: white;
        }

        .status-pending {
            background-color: #f39c12;
            color: white;
        }

        .status-rejected {
            background-color: #e74c3c;
            color: white;
        }

        /* Book Card Hover Overlay */
        .book-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            padding: 15px;
            text-align: center;
            color: white;
        }

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

        .book-overlay-title {
            font-size: 1.1rem;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .book-overlay-author {
            font-size: 0.9rem;
            margin-bottom: 12px;
            color: rgba(255, 255, 255, 0.9);
        }

        .book-overlay-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: var(--border-radius-xs);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            margin-top: 8px;
        }

        .book-overlay-btn:hover {
            background: var(--gradient-light);
            transform: translateY(-2px);
        }

        /* Responsive Styles */
        @media (max-width: 992px) {
            .container {
                padding: 20px;
            }
            
            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 15px;
            }
        }

        @media (max-width: 768px) {
            .header {
                padding: 0 15px;
            }

            .logo {
                font-size: 1.6rem;
            }

            .logo i {
                font-size: 1.3rem;
            }

            .search-container {
                width: 200px;
            }

            .search-container.active {
                width: 250px;
            }

            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
            }
            
            .nav-item {
                font-size: 1.2rem;
                width: 45px;
                height: 45px;
            }
            
            .add-btn {
                width: 55px;
                height: 55px;
                font-size: 1.5rem;
            }

            .profile-info h2 {
                font-size: 1.6rem;
            }

            .profile-stats {
                flex-direction: column;
                gap: 12px;
            }

            .stat-item:not(:last-child)::after {
                display: none;
            }

            .stat-item {
                padding: 12px 0;
            }

            .chat-input {
                padding: 12px 15px;
            }

            .send-btn {
                width: 42px;
                height: 42px;
            }

            .book-img-container {
                height: 180px;
            }
        }

        @media (max-width: 576px) {
            .header {
                padding: 0 10px;
                height: var(--header-height);
                flex-direction: row;
                justify-content: space-between;
            }

            .logo {
                font-size: 1.5rem;
            }

            .logo i {
                font-size: 1.2rem;
            }

            .header-actions {
                gap: 10px;
            }

            .search-container {
                position: absolute;
                top: var(--header-height);
                left: 0;
                right: 0;
                width: 100%;
                margin: 0;
                padding: 10px;
                background-color: var(--secondary-color);
                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
                z-index: 999;
                display: none;
            }

            [data-theme="dark"] .search-container {
                background-color: var(--secondary-dark);
            }

            .search-container.active {
                display: block;
                width: 100%;
            }

            .search-input {
                display: block;
                width: 100%;
                padding: 10px 15px 10px 40px;
                border-radius: var(--border-radius);
                background-color: var(--secondary-light);
            }

            .search-results {
                top: calc(100% + 10px);
                left: 10px;
                right: 10px;
                width: auto;
            }

            .books-grid {
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            .book-img-container {
                height: 150px;
            }

            .profile-info h2 {
                font-size: 1.5rem;
            }

            .profile-bio {
                padding: 15px;
                font-size: 0.9rem;
            }

            .stat-number {
                font-size: 1.6rem;
            }

            .chat-input-container {
                padding: 12px;
            }

            .chat-input {
                padding: 12px 15px;
                margin-right: 10px;
                font-size: 0.95rem;
            }

            .send-btn {
                width: 40px;
                height: 40px;
                font-size: 1.1rem;
            }

            .message-content {
                padding: 10px 14px;
                font-size: 0.95rem;
            }
            
            .modal-content {
                padding: 20px;
                width: 95%;
            }
            
            .modal-title {
                font-size: 1.5rem;
            }

            .profile-actions {
                flex-direction: column;
                gap: 10px;
            }

            .edit-profile, .logout-btn {
                max-width: 100%;
                width: 100%;
            }

            .profile-avatar {
                width: 100px;
                height: 100px;
                font-size: 2.2rem;
            }
        }

        @media (max-width: 400px) {
            .container {
                padding: 15px 10px;
            }
            
            .page-title {
                font-size: 1.7rem;
            }
            
            .books-grid {
                grid-template-columns: 1fr;
            }

            .profile-info h2 {
                font-size: 1.4rem;
            }
            
            .profile-bio {
                padding: 12px;
            }
            
            .chat-input {
                padding: 10px 14px;
                font-size: 0.9rem;
            }
            
            .modal-content {
                padding: 15px;
            }

            .profile-avatar {
                width: 90px;
                height: 90px;
                font-size: 2rem;
            }
        }