
    .hero-buttons-container {
        gap: 1.5rem !important;
    }

    .hero-buttons-container form {
        margin: 0;
        display: inline-block;
    }

    /* Floating Time Display Styles */
    .floating-time-container {
        position: absolute;
        top: 45%;
        right: 60px;
        transform: translateY(-50%);
        z-index: 10;
        text-align: left;
    }

    @media (min-width: 1200px) {
        .floating-time-container {
            right: 80px;
        }
    }

    @media (max-width: 1199px) and (min-width: 992px) {
        .floating-time-container {
            right: 40px;
            top: 40%;
        }
    }

    .floating-time {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 15px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        min-width: 200px;
    }

    .floating-time:last-child {
        margin-bottom: 0;
    }

    .floating-time-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        /* Changed from flex-end to flex-start */
        margin-bottom: 10px;
        font-size: 0.9rem;
        opacity: 0.9;
    }

    .floating-time-header i {
        margin-left: 0;
        /* Changed from 8px */
        margin-right: 8px;
        /* Added */
    }

    .floating-time-display {
        display: flex;
        align-items: baseline;
        justify-content: flex-start;
        /* Changed from flex-end to flex-start */
        gap: 8px;
    }

    .floating-time-text {
        font-size: 1.8rem;
        font-weight: 700;
        color: white;
        font-family: 'Courier New', monospace;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .floating-am-pm {
        font-size: 0.9rem;
        font-weight: 600;
        color: #f39c12;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    }

    .floating-date {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.9);
        margin-top: 5px;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    }

    .floating-time-zone {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
        margin-top: 3px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    /* 24/7 Access Badge */
    .access-highlight {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 15px;
        padding: 25px;
        text-align: center;
        color: white;
    }

    .access-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        font-size: 1.5rem;
        font-weight: 700;
    }

    .access-badge i {
        font-size: 2rem;
        color: #f39c12;
    }

    .access-highlight p {
        color: rgba(255, 255, 255, 0.95);
        margin: 0;
    }

    /* Slideshow Navigation - Moved to left/right of dots */
    .slideshow-nav {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        /* Space between arrows and dots */
        z-index: 3;
        pointer-events: none;
        width: auto;
        /* Remove full width */
        min-width: 200px;
        /* Ensure enough width for arrows + dots */
    }

    .slide-arrow {
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        width: 40px;
        /* Slightly smaller for better fit */
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        pointer-events: all;
        flex-shrink: 0;
        /* Prevent arrows from shrinking */
    }

    .slide-arrow:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }

    /* Slideshow Dots - Now inside slideshow-nav container */
    .slideshow-dots {
        display: flex;
        gap: 10px;
        margin: 0 15px;
        /* Space between arrows and dots */
    }

    .dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .dot.active,
    .dot:hover {
        background: white;
        transform: scale(1.2);
    }


    /* Responsive adjustments */
    @media (max-width: 768px) {
        .floating-time-container {
            position: relative;
            top: auto;
            right: auto;
            transform: none;
            text-align: center;
            margin: 20px auto;
            max-width: 300px;
        }

        .floating-time {
            min-width: auto;
            margin: 10px auto;
        }

        .floating-time-header {
            justify-content: center;
        }

        .floating-time-display {
            justify-content: center;
        }
    }

    /* Hero Section Styles - ORIGINAL */
    .hero-section {
        position: relative;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: transparent;
    }

    /* Remove any overlays from hero slideshow */
    .hero-section::before,
    .hero-section::after {
        display: none !important;
    }

    .hero-slideshow::before,
    .hero-slideshow::after {
        display: none !important;
    }

    .hero-slideshow {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background: none !important;
    }

    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 2s ease-in-out;
        background-color: transparent !important;
    }

    .hero-slide.active {
        opacity: 1 !important;
    }

    .hero-content {
        position: relative;
        z-index: 2;
        text-align: center;
        color: white;
        max-width: 800px;
        padding: 40px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }

    /* Just a little shift to the left on larger screens */
    @media (min-width: 992px) {
        .hero-content {
            margin-left: 20px;
        }
    }

    .hero-title {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
        animation: fadeInUp 1s ease-out;
        color: #ffffff;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 2.5rem;
        opacity: 0.95;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
        animation: fadeInUp 1s ease-out 0.3s both;
        color: #f8f9fa;
        font-weight: 500;
        line-height: 1.6;
    }

    /* Enhanced Hero Buttons Container */
    .hero-buttons-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1.5rem !important;
        flex-wrap: wrap !important;
    }

    .hero-buttons-container>* {
        flex-shrink: 0;
        margin: 0 !important;
    }

    /* Make form inline so it doesn't break the layout */
    .hero-buttons-container form {
        display: inline !important;
        margin: 0 !important;
    }

    /* Apply same base styles to all hero buttons */
    .hero-btn {
        white-space: nowrap;
        padding: 15px 30px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        border-radius: 50px !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
        border: 2px solid transparent !important;
        min-width: 180px !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        backdrop-filter: blur(10px) !important;
    }

    .hero-btn:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5) !important;
        text-decoration: none !important;
    }

    .hero-btn i {
        margin-right: 8px !important;
    }

    /* Primary button (Get Started) */
    .btn-primary.hero-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        color: white !important;
    }

    .btn-primary.hero-btn:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        color: white !important;
    }

    /* Outline button (Learn More) */
    .btn-outline-light.hero-btn {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        color: white !important;
        backdrop-filter: blur(10px) !important;
    }

    .btn-outline-light.hero-btn:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.8) !important;
        color: white !important;
    }

    /* Guest button - standalone */
    .guest-btn {
        background: linear-gradient(135deg, #a38e6bff 0%, #e67e22 100%) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
        padding: 8px 35px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 50px !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    }

    .guest-btn:hover {
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        color: white !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3) !important;
    }

    /* Responsive for mobile */
    @media (max-width: 768px) {
        .hero-content {
            padding: 30px 20px;
            margin: 20px;
            max-width: calc(100% - 40px);
        }

        .hero-title {
            font-size: 2.5rem;
        }

        .hero-subtitle {
            font-size: 1.1rem;
        }

        .hero-buttons-container {
            flex-direction: column !important;
            gap: 15px !important;
        }

        .hero-buttons-container form {
            display: block !important;
            width: 100%;
        }
    }

    /* Extra compact for very small mobile screens */
    @media (max-width: 400px) {
        .hero-content {
            padding: 25px 15px;
            margin: 15px;
        }

        .hero-title {
            font-size: 2rem;
        }

        .hero-subtitle {
            font-size: 1rem;
            margin-bottom: 2rem;
        }

        .hero-buttons-container {
            gap: 12px !important;
        }

        .hero-btn {
            padding: 12px 20px !important;
            font-size: 0.95rem !important;
            min-width: auto !important;
            width: 100% !important;
            max-width: 280px !important;
        }

        .guest-btn {
            padding: 10px 20px !important;
            font-size: 0.9rem !important;
            width: 100% !important;
            max-width: 280px !important;
        }
    }

    /* Animations */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

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

    /* Navbar Styles */
    .navbar {
        background: rgba(44, 62, 80, 0.95) !important;
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
    }

    .navbar-brand {
        font-size: 1.4rem;
        font-weight: 700;
    }

    .navbar-brand i {
        color: #f39c12;
    }

    /* Dropdown Styles */
    .dropdown-menu {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .dropdown-menu {
        background: #2c3e50;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-item {
        color: #2c3e50 !important;
        padding: 10px 20px;
        transition: all 0.3s ease;
    }

    body.dark-mode .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .dropdown-item:hover {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea !important;
    }

    body.dark-mode .dropdown-item:hover {
        background: rgba(102, 126, 234, 0.2);
        color: #f39c12 !important;
    }

    .dropdown-item i {
        margin-right: 10px;
        color: #667eea;
    }

    body.dark-mode .dropdown-item i {
        color: #f39c12;
    }

    /* Mobile dropdown fix */
    @media (max-width: 768px) {
        .dropdown-item {
            color: #2c3e50 !important;
        }

        body.dark-mode .dropdown-item {
            color: white !important;
        }

        .dropdown-item:hover {
            color: #667eea !important;
        }

        body.dark-mode .dropdown-item:hover {
            color: #f39c12 !important;
        }
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .floating-time-container {
            position: relative;
            top: auto;
            right: auto;
            transform: none;
            text-align: center;
            margin: 20px auto;
            max-width: 300px;
        }

        .floating-time {
            min-width: auto;
            margin: 10px auto;
        }

        .floating-time-header {
            justify-content: center;
        }

        .floating-time-display {
            justify-content: center;
        }
    }

    /* Card Text Colors for Day/Night Mode and Equal Sizes */
    .library-hours,
    .feature-card {
        color: #000000 !important;
        transition: color 0.3s ease;
        height: 100%;
        min-height: 380px;
        /* Equal height for both cards */
        display: flex;
        flex-direction: column;
    }

    .library-hours .access-features,
    .library-hours ul {
        flex-grow: 1;
    }

    body.dark-mode .library-hours,
    body.dark-mode .feature-card {
        color: #ffffff !important;
    }

    body.dark-mode .library-hours .text-muted,
    body.dark-mode .feature-card .text-muted {
        color: #bdc3c7 !important;
    }

    /* Theme Toggle Button */
    .theme-toggle {
        position: fixed;
        top: 100px;
        right: 30px;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }

    .theme-toggle:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    }

    /* Dark Mode Styles */
    body.dark-mode {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    body.dark-mode .hero-section {
        background: transparent;
    }

    body.dark-mode .navbar {
        background: rgba(26, 26, 26, 0.95) !important;
    }

    body.dark-mode .floating-time {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }

    /* About Section Styles */
    .about-section {
        padding: 100px 0;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }

    body.dark-mode .about-section {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .about-card {
        background: white;
        border-radius: 20px;
        padding: 40px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        height: 100%;
        transition: all 0.3s ease;
    }

    body.dark-mode .about-card {
        background: rgba(52, 73, 94, 0.8);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }

    .about-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }

    body.dark-mode .about-card:hover {
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    }

    /* Mission & Vision Cards */
    .mission-vision {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 20px;
        padding: 40px;
        margin: 20px 0;
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
        transition: all 0.3s ease;
    }

    .mission-vision:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    }

    .mission-vision h4 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
    }

    .mission-vision h4 i {
        margin-right: 15px;
        font-size: 2rem;
        color: rgba(255, 255, 255, 0.9);
    }

    .mission-vision p {
        font-size: 1.1rem;
        line-height: 1.7;
        margin: 0;
        opacity: 0.95;
    }

    /* Services Section */
    .services-section {
        padding: 100px 0;
        background: white;
    }

    body.dark-mode .services-section {
        background: #1a1a1a;
    }

    .service-card {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 20px;
        padding: 40px 30px;
        text-align: center;
        height: 100%;
        transition: all 0.3s ease;
        border: 2px solid transparent;
    }

    body.dark-mode .service-card {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .service-card:hover {
        transform: translateY(-10px);
        border-color: #667eea;
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    }

    .service-icon {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 25px;
        font-size: 2rem;
        color: white;
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    }

    .service-card h4 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 20px;
        color: #2c3e50;
    }

    body.dark-mode .service-card h4 {
        color: #ffffff;
    }

    .service-card p {
        color: #6c757d;
        line-height: 1.6;
    }

    body.dark-mode .service-card p {
        color: #bdc3c7;
    }

    /* Contact Section */
    .contact-section {
        padding: 100px 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .contact-card {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 40px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        height: 100%;
        transition: all 0.3s ease;
    }

    .contact-card:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-5px);
    }

    /* Clickable Contact Card */
    .contact-card-link {
        text-decoration: none;
        color: inherit;
        display: block;
    }

    .contact-card-link:hover {
        text-decoration: none;
        color: inherit;
    }

    .clickable-card {
        cursor: pointer;
        position: relative;
    }

    .clickable-card:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-8px);
    }

    .map-hint {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 600;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .clickable-card:hover .map-hint {
        opacity: 1;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
        font-size: 1.5rem;
    }

    .contact-card h5 {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .contact-card p {
        margin: 0;
        opacity: 0.9;
        line-height: 1.6;
    }

    /* Contact Form Styles */
    .contact-form {
        background: rgba(255, 255, 255, 0.1);
        padding: 30px;
        border-radius: 15px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .contact-form .form-control {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        padding: 12px 15px;
        color: #2c3e50;
    }

    .contact-form .form-control:focus {
        background: white;
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    }

    .contact-form label {
        color: white;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .contact-form .btn-primary {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        border: none;
        padding: 12px 40px;
        border-radius: 25px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .contact-form .btn-primary:hover {
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
    }

    /* Social Links */
    .social-links {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
    }

    .social-link {
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2rem;
        text-decoration: none;
        transition: all 0.3s ease;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .social-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
        color: white;
        text-decoration: none;
        border-color: rgba(255, 255, 255, 0.4);
    }

    /* Login Modal Styles */
    .login-modal {
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
    }

    .login-modal .modal-content {
        background: white;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .login-modal .modal-content {
        background: #2c3e50;
    }

    .login-modal .modal-header {
        background: transparent;
        padding: 15px 20px 0;
    }

    .login-modal .close {
        color: #6c757d;
        opacity: 0.8;
        font-size: 2rem;
        font-weight: 300;
        text-shadow: none;
    }

    body.dark-mode .login-modal .close {
        color: white;
    }

    .login-modal .close:hover {
        opacity: 1;
        color: #667eea;
    }

    .login-form {
        padding: 20px 40px 40px;
    }

    .login-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .login-header h3 {
        color: #2c3e50;
        font-weight: 700;
        margin-bottom: 10px;
        font-size: 1.8rem;
    }

    body.dark-mode .login-header h3 {
        color: white;
    }

    .login-header p {
        color: #6c757d;
        margin: 0;
        font-size: 1rem;
    }

    body.dark-mode .login-header p {
        color: #bdc3c7;
    }

    .login-form .form-group {
        margin-bottom: 25px;
    }

    .login-form label {
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 8px;
        font-size: 0.95rem;
    }

    body.dark-mode .login-form label {
        color: white;
    }

    .login-form .form-control {
        border: 2px solid #e9ecef;
        border-radius: 10px;
        padding: 12px 15px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .login-form .form-control:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        outline: none;
    }

    body.dark-mode .login-form .form-control {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }

    body.dark-mode .login-form .form-control:focus {
        border-color: #667eea;
        background: #34495e;
    }

    .btn-login {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        padding: 14px 30px;
        border-radius: 10px;
        font-size: 1.1rem;
        font-weight: 600;
        width: 100%;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .btn-login:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }

    .login-form .guest-btn {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        border: none;
        color: white;
        padding: 12px 30px;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 600;
        width: 100%;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .login-form .guest-btn:hover {
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
        color: white;
    }

    .login-form .btn-outline-primary {
        border: 2px solid #667eea;
        color: #667eea;
        background: transparent;
        padding: 10px 20px;
        border-radius: 10px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .login-form .btn-outline-primary:hover {
        background: #667eea;
        color: white;
        transform: translateY(-2px);
    }

    body.dark-mode .login-form .btn-outline-primary {
        border-color: #667eea;
        color: #667eea;
    }

    body.dark-mode .login-form .btn-outline-primary:hover {
        background: #667eea;
        color: white;
    }

    .login-form .text-primary {
        color: #667eea !important;
        text-decoration: none;
        font-weight: 500;
    }

    .login-form .text-primary:hover {
        color: #5a6fd8 !important;
        text-decoration: underline;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .hero-title {
            font-size: 2.5rem;
        }

        .hero-subtitle {
            font-size: 1.1rem;
        }

        .hero-buttons-container {
            flex-direction: column;
            gap: 15px;
        }

        .hero-btn {
            min-width: auto;
            width: 100%;
            max-width: 300px;
        }

        .about-card,
        .service-card,
        .contact-card {
            margin-bottom: 30px;
        }

        .theme-toggle {
            top: 80px;
            right: 20px;
            width: 45px;
            height: 45px;
        }

        .floating-time-container {
            position: relative;
            top: auto;
            right: auto;
            transform: none;
            text-align: center;
            margin: 20px auto;
            max-width: 300px;
        }

        .floating-time {
            min-width: auto;
            margin: 10px auto;
        }

        .floating-time-header {
            justify-content: center;
        }

        .floating-time-display {
            justify-content: center;
        }
    }

    /* Animation Classes */
    .animate__animated {
        animation-duration: 1s;
        animation-fill-mode: both;
    }

    .animate__fadeIn {
        animation-name: fadeIn;
    }

    .animate__fadeInUp {
        animation-name: fadeInUp;
    }

    .animate__delay-1s {
        animation-delay: 1s;
    }

    .animate__delay-2s {
        animation-delay: 2s;
    }

    /* Custom Animations */
    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translate3d(0, 40px, 0);
        }

        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    /* Smooth Scrolling */
    html {
        scroll-behavior: smooth;
    }

    /* Custom Scrollbar */
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    ::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    }

    body.dark-mode ::-webkit-scrollbar-track {
        background: #2c3e50;
    }

    /* Loading Animation */
    .loading {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: #fff;
        animation: spin 1s ease-in-out infinite;
    }

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

    /* Utility Classes */
    .text-gradient {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .bg-gradient {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .shadow-lg {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }

    .border-radius-lg {
        border-radius: 20px;
    }

    /* Print Styles */
    @media print {

        .navbar,
        .theme-toggle,
        .floating-time-container,
        .hero-buttons-container {
            display: none !important;
        }

        .hero-section {
            background: white !important;
            color: black !important;
            min-height: auto !important;
        }

        .about-section,
        .services-section,
        .contact-section {
            background: white !important;
            color: black !important;
        }
    }

    /* Ethiopian AM/PM display */
    #ethiopian-am-pm {
        display: inline-block !important;
    }

    /* Stats Section */
    .stats-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }

    body.dark-mode .stats-section {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .stat-item {
        padding: 20px;
        transition: transform 0.3s ease;
    }

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

    .stat-label {
        color: #333 !important; /* Dark color for day mode - Force black */
        font-weight: 600;
        margin-top: 5px;
        font-size: 1.1rem;
    }

    body.dark-mode .stat-label {
        color: rgba(255, 255, 255, 0.9) !important; /* Light color for dark mode */
    }

    .stat-number {
        font-size: 3rem;
        font-weight: 700;
        margin-bottom: 10px;
    }

    /* Features Section (24/7 Access & What We Offer) */
    .features-section {
        background: white;
    }

    body.dark-mode .features-section {
        background: #1a1a1a;
    }

    .feature-box {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 20px;
        padding: 40px;
        height: 100%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    body.dark-mode .feature-box {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .feature-box:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .feature-header {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .feature-header i {
        font-size: 2.5rem;
        color: #667eea;
    }

    .feature-header h3 {
        font-size: 1.8rem;
        font-weight: 700;
        margin: 0;
        color: #2c3e50;
    }

    body.dark-mode .feature-header h3 {
        color: white;
    }

    .feature-box h4 {
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: 15px;
        color: #34495e;
    }

    body.dark-mode .feature-box h4 {
        color: #ecf0f1;
    }

    .feature-box p {
        color: #6c757d;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    body.dark-mode .feature-box p {
        color: #bdc3c7;
    }

    .feature-grid {
        display: grid;
        gap: 20px;
    }

    .feature-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px;
        background: rgba(102, 126, 234, 0.1);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .feature-item:hover {
        background: rgba(102, 126, 234, 0.2);
        transform: translateX(5px);
    }

    .feature-item i {
        font-size: 1.8rem;
        color: #667eea;
        min-width: 40px;
    }

    .feature-item strong {
        display: block;
        font-size: 1.1rem;
        color: #2c3e50;
        margin-bottom: 3px;
    }

    body.dark-mode .feature-item strong {
        color: white;
    }

    .feature-item p {
        margin: 0;
        font-size: 0.9rem;
        color: #6c757d;
    }

    body.dark-mode .feature-item p {
        color: #95a5a6;
    }

    .feature-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .feature-secondary {
        font-size: 1rem;
        font-weight: 600;
        color: #2c3e50;
    }

    body.dark-mode .feature-secondary {
        color: #ffffff;
    }

    .feature-list-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 12px 15px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }

    body.dark-mode .feature-list-item {
        background: rgba(52, 73, 94, 0.5);
    }

    .feature-list-item:hover {
        transform: translateX(5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .feature-list-item i {
        font-size: 1.5rem;
        min-width: 30px;
    }

    .feature-list-item span {
        font-size: 1rem;
        font-weight: 500;
        color: #2c3e50;
    }

    body.dark-mode .feature-list-item span {
        color: white;
    }

    /* Why Choose Section */
    .why-choose-section {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .section-title {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .section-subtitle {
        font-size: 1.2rem;
        opacity: 0.9;
    }

    .why-card {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 40px 30px;
        text-align: center;
        height: 100%;
        border: 2px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

    .why-card:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-10px);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .why-icon {
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 25px;
        font-size: 2rem;
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .why-card h4 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 15px;
        color: white;
    }

    .why-card p {
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.6;
        margin: 0;
    }

    /* Journey Timeline Section */
    .journey-section {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .timeline {
        position: relative;
        max-width: 800px;
        margin: 0 auto;
        padding: 20px 0;
    }

    .timeline::before {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    }

    .timeline-item {
        position: relative;
        margin-bottom: 50px;
        display: flex;
        align-items: center;
    }

    .timeline-item:nth-child(odd) {
        flex-direction: row;
    }

    .timeline-item:nth-child(even) {
        flex-direction: row-reverse;
    }

    .timeline-icon {
        width: 60px;
        height: 60px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #667eea;
        border: 4px solid rgba(255, 255, 255, 0.3);
        z-index: 2;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-content {
        width: 45%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 25px;
        border-radius: 15px;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: auto;
        margin-left: 0;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: auto;
        margin-right: 0;
    }

    .timeline-content h4 {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 10px;
        color: white;
    }

    .timeline-content p {
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.6;
    }

    /* Values Section */
    .values-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }

    body.dark-mode .values-section {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .value-card {
        background: white;
        border-radius: 15px;
        padding: 30px;
        text-align: center;
        height: 100%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    body.dark-mode .value-card {
        background: rgba(52, 73, 94, 0.8);
    }

    .value-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .value-card i {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .value-card h5 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 15px;
        color: #2c3e50;
    }

    body.dark-mode .value-card h5 {
        color: white;
    }

    .value-card p {
        color: #6c757d;
        line-height: 1.6;
        margin: 0;
    }

    body.dark-mode .value-card p {
        color: #bdc3c7;
    }

    /* Scroll to Top Button */
    .scroll-to-top {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 999;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }

    .scroll-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .scroll-to-top:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    }

    /* Responsive adjustments for new sections */
    @media (max-width: 768px) {
        .stat-number {
            font-size: 2rem;
        }

        .feature-box {
            padding: 25px;
            margin-bottom: 20px;
        }

        .feature-header h3 {
            font-size: 1.5rem;
        }

        /* 2-column grid for feature-grid on mobile */
        .feature-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        /* Make feature items more compact on mobile */
        .feature-item {
            padding: 10px;
            gap: 10px;
        }

        .feature-item i {
            font-size: 1.3rem;
            min-width: 30px;
        }

        .feature-item strong {
            font-size: 0.9rem;
            margin-bottom: 2px;
        }

        .feature-item p {
            font-size: 0.75rem;
        }

        /* Center the third card (Cloud Storage) */
        .feature-item:nth-child(3) {
            grid-column: span 2;
            max-width: 50%;
            margin: 0 auto;
        }

        /* 2x2 grid for feature-list on mobile */
        .feature-list {
            display: grid !important;
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 10px !important;
        }

        /* Make feature-list items more compact */
        .feature-list-item {
            padding: 8px 10px !important;
            gap: 8px !important;
        }

        .feature-list-item i {
            font-size: 1.2rem;
            min-width: 25px;
        }

        .feature-list-item span {
            font-size: 0.85rem;
        }

        /* Center the 5th item (Free Wi-Fi Access) */
        .feature-list-item:nth-child(5) {
            grid-column: span 2 !important;
            max-width: 50% !important;
            margin: 0 auto !important;
        }

        .timeline::before {
            left: 30px;
        }

        .timeline-icon {
            left: 30px;
        }

        .timeline-item {
            flex-direction: row !important;
        }

        .timeline-content {
            width: calc(100% - 80px);
            margin-left: 80px !important;
            margin-right: 0 !important;
        }

        .scroll-to-top {
            bottom: 20px;
            right: 20px;
            width: 45px;
            height: 45px;
        }
    }
 
/* STYLES FROM USER_DASHBOARD.PHP */

        /* ALL YOUR EXISTING CSS STYLES REMAIN EXACTLY THE SAME */
        :root {
            --primary: #3498db;
            --secondary: #2c3e50;
            --success: #27ae60;
            --warning: #e67e22;
            --danger: #e74c3c;
            --light: #ecf0f1;
            --dark: #2c3e50;
            --shelf-color: #8B4513;
            --gradient-start: #667eea;
            --gradient-end: #764ba2;
        }

        * {
            box-sizing: border-box;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            transition: all 0.3s ease;
            overflow-x: hidden;
        }

        /* Enhanced Navbar */
        .navbar {
            background: linear-gradient(135deg, var(--secondary) 0%, #34495e 100%) !important;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            padding: 12px 0;
            z-index: 1030;
            backdrop-filter: blur(10px);
        }

        .navbar-brand {
            font-weight: 700;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
        }

        .navbar-nav .nav-link {
            position: relative;
            padding: 8px 15px;
            margin: 0 5px;
            border-radius: 20px;
            transition: all 0.3s ease;
        }

        .navbar-nav .nav-link:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .navbar-nav .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background: var(--primary);
            transition: all 0.3s ease;
            transform: translateX(-50%);
        }

        .navbar-nav .nav-link:hover::after {
            width: 80%;
        }

        /* Enhanced User Dropdown */
        .user-dropdown-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            padding: 8px 15px;
            color: white;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
        }

        .user-dropdown-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 8px;
        }

        .dropdown-menu {
            border: none;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 10px 0;
            margin-top: 10px;
        }

        .dropdown-item {
            padding: 10px 20px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
        }

        .dropdown-item:hover {
            background: linear-gradient(135deg, var(--primary), #2980b9);
            color: white;
            transform: translateX(5px);
        }

        /* Enhanced Notification System */
        .notification-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            animation: pulse 2s infinite;
            box-shadow: 0 2px 10px rgba(231, 76, 60, 0.5);
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
            }

            70% {
                transform: scale(1.05);
                box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
            }

            100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
            }
        }

        .notification-dropdown {
            min-width: 400px;
            max-height: 500px;
            overflow-y: auto;
            border-radius: 15px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        }

        .notification-item {
            padding: 15px;
            border-bottom: 1px solid #f8f9fa;
            transition: all 0.3s ease;
            cursor: pointer;
            border-radius: 10px;
            margin: 5px;
        }

        .notification-item:hover {
            background: #f8f9fa;
            transform: translateX(5px);
        }

        .notification-item.new {
            background: rgba(52, 152, 219, 0.05);
            border-left: 4px solid var(--primary);
        }

        .notification-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }

        /* Enhanced File Icons */
        .file-icon {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 8px;
            color: white;
            font-size: 12px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        .file-pdf {
            background: #e74c3c;
        }

        .file-video {
            background: #9b59b6;
        }

        .file-audio {
            background: #f39c12;
        }

        .file-document {
            background: #3498db;
        }

        .file-image {
            background: #27ae60;
        }

        .file-archive {
            background: #34495e;
        }

        /* Enhanced Hero Section */
        .dashboard-hero {
            background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
            color: white;
            padding: 120px 0 60px;
            margin-bottom: 40px;
            position: relative;
            overflow: hidden;
            clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
        }

        .dashboard-hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,100"></polygon></svg>');
            background-size: cover;
        }

        .dashboard-hero h1 {
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            font-weight: 800;
        }

        /* Enhanced Theme Toggle */
        .theme-toggle {
            position: fixed;
            top: 100px;
            right: 30px;
            z-index: 9999;
        }

        .theme-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), #2980b9);
            border: 3px solid white;
            color: white;
            font-size: 20px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .theme-btn:hover {
            transform: scale(1.1) rotate(15deg);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        }

        /* Enhanced Cards */
        .user-welcome-card,
        .stats-card,
        .search-section,
        .bookshelf-section,
        .category-card,
        .student-stats {
            background: white;
            border-radius: 20px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            position: relative;
            z-index: 1;
            overflow: hidden;
            border: none;
        }

        .user-welcome-card::before,
        .stats-card::before,
        .search-section::before,
        .bookshelf-section::before,
        .category-card::before,
        .student-stats::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--success));
            z-index: 2;
        }

        .stats-card:hover,
        .category-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        }

        .stats-card {
            text-align: center;
            padding: 30px 20px;
            position: relative;
        }

        .stats-card i {
            margin-bottom: 15px;
            background: linear-gradient(135deg, var(--primary), var(--gradient-end));
            -webkit-background-clip: text;
            background-clip: text;
            /* ADD THIS */
            -webkit-text-fill-color: transparent;
            color: transparent;
            /* ADD THIS for fallback */
            font-size: 2.5rem;
        }

        .stats-card h4 {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 10px;
            color: var(--dark);
        }

        .stats-card p {
            color: #6c757d;
            margin-bottom: 0;
        }

        /* Enhanced Search Section */
        .search-container {
            max-width: 800px;
            margin: 0 auto;
        }

        .search-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .search-box {
            display: flex;
            gap: 12px;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
        }

        .search-input-group {
            flex: 1;
            min-width: 300px;
            position: relative;
        }

        .search-input {
            height: 54px;
            border-radius: 25px;
            padding: 15px 50px;
            border: 2px solid #e9ecef;
            font-size: 16px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        }

        .search-input:focus {
            border-color: var(--primary);
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
        }

        .search-btn {
            background: linear-gradient(135deg, var(--primary), #2980b9);
            border: none;
            border-radius: 25px;

            height: 54px;
            min-width: 120px;
            padding: 12px 25px;
            color: white;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
        }

        .search-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
        }

        /* Enhanced Bookshelf */
        .bookshelf-section {
            position: relative;
        }

        .bookshelf-header {
            display: flex;
            align-items: center;
            /* Vertically centers all content */
            justify-content: space-between;
            /* Pushes left and right items to edges */
            margin-bottom: 30px;
            padding: 20px 0;
            border-bottom: 2px solid #f8f9fa;
            min-height: 80px;
            width: 100%;
            /* Ensure full width */
        }

        .bookshelf-header h3 {
            margin-bottom: 0 !important;
            display: flex;
            align-items: center;
        }

        .books-count {
            background: linear-gradient(135deg, var(--primary), #2980b9);
            color: white;
            padding: 12px 25px;
            border-radius: 25px;
            font-weight: 600;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 45px;
        }

        /* For dark mode */
        body.dark-mode .bookshelf-header {
            border-bottom-color: #4a5f7a;
        }

        .bookshelf {
            background: var(--shelf-color);
            border-radius: 10px;
            padding: 30px 20px 10px;
            position: relative;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            min-height: 180px;
            margin-bottom: 30px;
        }

        .bookshelf-container {
            overflow-x: auto;
            overflow-y: hidden;
            padding-bottom: 15px;
        }

        .bookshelf-container::-webkit-scrollbar {
            height: 8px;
        }

        .bookshelf-container::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.1);
            border-radius: 10px;
        }

        .bookshelf-container::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 10px;
        }

        .bookshelf-container::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #764ba2, #667eea);
        }

        .books-row {
            display: flex;
            justify-content: flex-start;
            gap: 15px;
            flex-wrap: nowrap;
            min-width: min-content;
        }
        
        .books-row a {
            text-decoration: none;
            display: inline-block;
        }

        .book {
            width: 90px;
            height: 140px;
            background: linear-gradient(45deg, #3498db, #2980b9);
            border-radius: 4px 8px 8px 4px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
            transform-style: preserve-3d;
            overflow: hidden;
        }

        .book:hover {
            transform: translateY(-15px) rotate(5deg);
            z-index: 100;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
        }

        .book::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
            z-index: 1;
        }

        .book-spine {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 5px;
            background: rgba(0, 0, 0, 0.3);
        }

        .book-title {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 85%;
            color: white;
            font-size: 11px;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
            z-index: 2;
            text-align: center;
            line-height: 1.3;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            word-wrap: break-word;
        }

        .book-author {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 85%;
            color: white;
            font-size: 8px;
            font-weight: normal;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            z-index: 2;
            text-align: center;
            opacity: 0.9;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Book color variations */
        .book-color-1 {
            background: linear-gradient(45deg, #3498db, #2980b9);
        }

        .book-color-2 {
            background: linear-gradient(45deg, #e74c3c, #c0392b);
        }

        .book-color-3 {
            background: linear-gradient(45deg, #27ae60, #219653);
        }

        .book-color-4 {
            background: linear-gradient(45deg, #f39c12, #e67e22);
        }

        .book-color-5 {
            background: linear-gradient(45deg, #9b59b6, #8e44ad);
        }

        .book-color-6 {
            background: linear-gradient(45deg, #34495e, #2c3e50);
        }

        .book-color-7 {
            background: linear-gradient(45deg, #1abc9c, #16a085);
        }

        .book-color-8 {
            background: linear-gradient(45deg, #e84393, #fd79a8);
        }

        /* Enhanced Category Cards */
        .category-card {
            text-align: center;
            padding: 30px 20px;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .category-icon {
            font-size: 3rem;
            margin-bottom: 20px;
            background: linear-gradient(135deg, var(--primary), var(--gradient-end));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }

        .category-card .card-title {
            font-weight: 600;
            margin-bottom: 20px;
            color: var(--dark);
        }

        .category-card .btn {
            border-radius: 20px;
            padding: 10px 25px;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .category-card .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
        }

        /* Enhanced Student Stats */
        .student-stats {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .student-stats::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--success));
        }

        .stat-item {
            text-align: center;
            padding: 20px;
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 5px;
            background: linear-gradient(135deg, var(--primary), var(--gradient-end));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }

        .stat-label {
            color: #6c757d;
            font-size: 14px;
            font-weight: 500;
        }

        /* Enhanced Floating Action Button */
        .floating-action {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 1000;
        }

        .floating-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), #2980b9);
            border: none;
            color: white;
            font-size: 20px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .floating-btn:hover {
            transform: translateY(-5px) scale(1.1);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
        }

        /* Enhanced Footer */
        footer {
            background: linear-gradient(135deg, var(--secondary) 0%, #34495e 100%) !important;
            margin-top: 50px;
            padding: 40px 0 !important;
            position: relative;
        }

        footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--success));
        }

        /* Dark Mode Enhancements */
        body.dark-mode {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: #ecf0f1;
        }

        body.dark-mode .user-welcome-card,
        body.dark-mode .stats-card,
        body.dark-mode .search-section,
        body.dark-mode .bookshelf-section,
        body.dark-mode .category-card,
        body.dark-mode .student-stats {
            background: #34495e;
            color: #ecf0f1;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }

        body.dark-mode .search-input {
            background: #2c3e50;
            border-color: #4a5f7a;
            color: #ecf0f1;
        }

        body.dark-mode .search-input:focus {
            background: #2c3e50;
            border-color: var(--primary);
            color: #ecf0f1;
        }

        body.dark-mode .dropdown-menu {
            background: #34495e;
            border: 1px solid #4a5f7a;
        }

        body.dark-mode .dropdown-item {
            color: #ecf0f1;
        }

        body.dark-mode .dropdown-item:hover {
            background: linear-gradient(135deg, var(--primary), #2980b9);
            color: white;
        }

        body.dark-mode .notification-item:hover {
            background: #2c3e50;
        }

        /* Responsive Enhancements */
        @media (max-width: 768px) {
            .notification-dropdown {
                min-width: 300px;
                right: -50px;
            }

            .dashboard-hero {
                padding: 100px 0 40px;
                clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
            }

            .theme-toggle {
                top: 80px;
                right: 15px;
            }

            .theme-btn,
            .floating-btn {
                width: 50px;
                height: 50px;
                font-size: 18px;
            }

            .books-row {
                gap: 10px;
            }

            .book {
                width: 70px;
                height: 110px;
            }
        }

        /* Animation Enhancements */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

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

        .animate-fadeInUp {
            animation: fadeInUp 0.6s ease-out;
        }

        /* Loading Animation */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, .3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }

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

        /* Enhanced Tooltips */
        .tooltip {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .tooltip .tooltip-inner {
            background: var(--dark);
            border-radius: 10px;
            padding: 8px 12px;
            font-size: 14px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        /* Custom Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, var(--primary), #2980b9);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #2980b9, var(--primary));
        }

        body.dark-mode ::-webkit-scrollbar-track {
            background: #2c3e50;
        }

        body.dark-mode ::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, var(--primary), #2980b9);
        }

        /* Guest Welcome Card Styles */
        .guest-welcome-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            position: relative;
            overflow: hidden;
        }

        .guest-welcome-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,100"></polygon></svg>');
            background-size: cover;
        }

        .guest-icon {
            font-size: 4rem;
            margin-bottom: 20px;
            opacity: 0.9;
        }

        .guest-features {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
            margin-top: 25px;
        }

        .guest-feature-item {
            background: rgba(255, 255, 255, 0.2);
            padding: 15px 20px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        /* Enhanced Search Section Styles */
        .search-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 25px;
            padding: 50px 40px;
            margin: 40px 0;
            color: white;
            position: relative;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }

        .search-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.05"><polygon points="1000,100 1000,0 0,100"></polygon></svg>');
            background-size: cover;
        }

        .search-container {
            max-width: 900px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
        }

        .search-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .search-icon-container {
            margin-bottom: 20px;
        }

        .search-main-icon {
            font-size: 3.5rem;
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
            opacity: 0.9;
        }

        .search-title {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 15px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .search-subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            margin-bottom: 0;
        }

        .search-box {
            display: flex;
            gap: 15px;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 30px;
        }

        .search-input-container {
            flex: 1;
            min-width: 400px;
            position: relative;
        }

        .search-input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-input-icon {
            position: absolute;
            left: 20px;
            color: #6c757d;
            font-size: 1.1rem;
            z-index: 3;
        }

        .search-input {
            border-radius: 50px;
            padding: 18px 60px 18px 50px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            font-size: 16px;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            width: 100%;
        }

        .search-input:focus {
            border-color: rgba(255, 255, 255, 0.6);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
            background: rgba(255, 255, 255, 0.98);
            transform: translateY(-2px);
        }

        .search-input::placeholder {
            color: #6c757d;
        }

        .search-clear-btn {
            position: absolute;
            right: 15px;
            background: none;
            border: none;
            color: #6c757d;
            font-size: 1rem;
            cursor: pointer;
            opacity: 0;
            transition: all 0.3s ease;
            z-index: 3;
        }

        .search-input:not(:placeholder-shown)+.search-clear-btn {
            opacity: 1;
        }

        .search-clear-btn:hover {
            color: #e74c3c;
        }

        .search-suggestions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .suggestion-tag {
            background: rgba(255, 255, 255, 0.2);
            padding: 6px 15px;
            border-radius: 20px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .suggestion-tag:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .search-btn {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            border: none;
            border-radius: 50px;
            padding: 18px 35px;
            color: #667eea;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .search-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
            color: #764ba2;
        }

        .search-btn:active {
            transform: translateY(-1px);
        }

        .search-loading-spinner {
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid transparent;
            border-top: 2px solid #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-left: 8px;
        }

        .search-btn.loading .search-btn-text {
            opacity: 0.7;
        }

        .search-btn.loading .search-loading-spinner {
            display: block;
        }

        /* Quick Filters */
        .quick-filters {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .filters-header {
            text-align: center;
            margin-bottom: 20px;
            font-weight: 600;
            font-size: 1.1rem;
            opacity: 0.9;
        }

        .filter-buttons {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .filter-btn {
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 25px;
            padding: 12px 20px;
            color: white;
            font-weight: 500;
            transition: all 0.3s ease;
            cursor: pointer;
            display: flex;
            align-items: center;
            backdrop-filter: blur(10px);
        }

        .filter-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-2px);
        }

        .filter-btn.active {
            background: rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .search-stats {
            display: flex;
            justify-content: center;
            gap: 40px;
            flex-wrap: wrap;
        }

        .stat-item {
            display: flex;
            align-items: center;
            gap: 15px;
            background: rgba(255, 255, 255, 0.1);
            padding: 15px 25px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .stat-number {
            font-size: 1.4rem;
            font-weight: 700;
            color: white;
            /* Ensure numbers are white */
        }

        .stat-label {
            font-size: 0.85rem;
            opacity: 0.9;
            color: white;
            /* Ensure labels are white */
        }

        /* Add dark mode support to maintain visibility */
        body.dark-mode .stat-number,
        body.dark-mode .stat-label {
            color: white;
        }

        .stat-icon {
            font-size: 1.5rem;
            opacity: 0.9;
        }

        .stat-content {
            display: flex;
            flex-direction: column;
        }

        /* Dark Mode Support */
        body.dark-mode .search-section {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        }

        body.dark-mode .search-input {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border-color: rgba(255, 255, 255, 0.2);
        }

        body.dark-mode .search-input:focus {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.4);
        }

        body.dark-mode .search-input::placeholder {
            color: #bdc3c7;
        }

        /* Responsive Design - Updated Mobile Search Styles */
        @media (max-width: 768px) {
            /* Hide top search icon on mobile */
            .search-icon-container {
                display: none !important;
            }

            /* Reduce Library Collection book card height on mobile */
            .book {
                height: 100px !important; /* Reduced from 120px for mobile */
            }

            .search-section {
                padding: 20px 15px !important;
                margin: 15px 0 !important;
                border-radius: 15px !important;
            }

            .search-container {
                max-width: none !important;
            }


            .search-title {
                font-size: 1.5rem !important;
                margin-bottom: 8px !important;
                text-align: center !important;
            }

            .search-subtitle {
                font-size: 0.9rem !important;
                margin-bottom: 15px !important;
                text-align: center !important;
            }

            .search-box {
                flex-direction: column !important;
                gap: 10px !important;
                align-items: stretch !important;
            }

            .search-input-container {
                min-width: auto !important;
                width: 100% !important;
            }

            .search-input {
                font-size: 16px !important;
                padding: 12px 20px !important; /* Simplified padding since no icons */
                border-radius: 20px !important;
                height: auto !important;
            }

            .search-input::placeholder {
                font-size: 14px !important;
                color: #6c757d !important;
            }

            .search-btn {
                width: 100% !important;
                justify-content: center !important;
                padding: 12px 20px !important;
                border-radius: 20px !important;
                margin-top: 0 !important;
                font-size: 14px !important;
                height: auto !important;
            }

            /* Hide both search icon and clear button on mobile */
            .search-input-icon,
            .search-clear-btn {
                display: none !important;
            }

            .search-clear-btn {
                right: 12px !important;
            }

            .search-main-icon {
                font-size: 2rem !important;
                margin-bottom: 10px !important;
            }

            .filter-buttons {
                gap: 8px;
            }

            .filter-btn {
                padding: 10px 15px;
                font-size: 0.9rem;
            }

            .search-stats {
                gap: 20px;
            }

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

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

        @media (max-width: 480px) {
            .search-stats {
                flex-direction: column;
                align-items: center;
            }

            .stat-item {
                width: 100%;
                justify-content: center;
            }
        }

        /* Fix dark mode text visibility */
        body.dark-mode .book-title {
            color: white !important;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
        }
        
        body.dark-mode .book-author {
            color: white !important;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        }

        body.dark-mode .stats-card h4,
        body.dark-mode .stats-card p,
        body.dark-mode .category-card .card-title {
            color: white !important;
        }

        body.dark-mode .stat-number,
        body.dark-mode .stat-label {
            color: white !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        }

        /* Compact Student Menu Button */
        .student-menu-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 18px;
            padding: 6px 12px;
            color: white;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            font-size: 0.9rem;
        }

        .student-menu-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.5);
            transform: translateY(-1px);
        }

        .student-name {
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Compact Menu Items */
        .menu-item {
            border-radius: 6px;
            margin: 2px 4px;
            transition: all 0.2s ease;
            font-size: 0.9rem;
            padding: 8px 12px;
        }

        .menu-item:hover {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white !important;
            transform: translateX(3px);
        }

        .menu-item:hover i {
            color: white !important;
        }

        /* Compact Dropdown */
        .dropdown-menu {
            display: none;
            border: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            font-size: 0.9rem;
        }

        .dropdown-menu.show {
            display: block;
        }

        /* Beautiful Student Welcome Card */
        .student-welcome-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            position: relative;
            overflow: hidden;
        }

        .student-welcome-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,100"></polygon></svg>');
            background-size: cover;
        }

        .welcome-content {
            display: flex;
            align-items: center;
            gap: 25px;
            position: relative;
            z-index: 2;
        }

        .welcome-icon {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            border: 3px solid rgba(255, 255, 255, 0.3);
            flex-shrink: 0;
        }

        .welcome-text {
            flex: 1;
        }

        .welcome-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 15px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .welcome-details {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .detail-item {
            display: flex;
            align-items: center;
            font-size: 1rem;
            opacity: 0.9;
        }

        .detail-item strong {
            font-weight: 600;
            color: #fff;
        }

        /* Responsive design */
        @media (max-width: 768px) {
            .welcome-content {
                flex-direction: column;
                text-align: center;
                gap: 20px;
            }

            .welcome-icon {
                width: 60px;
                height: 60px;
                font-size: 1.5rem;
            }

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

            .detail-item {
                justify-content: center;
            }
        }

        /* Enhanced Notification Button */
        .notification-btn {
            background: rgba(255, 255, 255, 0.1) !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            border-radius: 20px !important;
            padding: 8px 15px !important;
            color: white !important;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
        }

        .notification-btn:hover {
            background: rgba(255, 255, 255, 0.2) !important;
            border-color: rgba(255, 255, 255, 0.5) !important;
            transform: translateY(-2px);
        }

        /* Enhanced Notification Dropdown */
        .notification-dropdown {
            min-width: 450px;
            max-height: 600px;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .notification-header {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-bottom: 2px solid #e9ecef;
        }

        .notification-body {
            background: white;
        }

        .notification-footer {
            background: #f8f9fa;
        }

        /* Enhanced Notification Items */
        .notification-item {
            transition: all 0.3s ease;
            cursor: pointer;
            border-left: 4px solid transparent;
        }

        .notification-item:hover {
            background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
            border-left-color: #3498db;
            transform: translateX(5px);
        }

        .notification-item.new {
            background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
            border-left-color: #27ae60;
        }

        /* Enhanced File Icons */
        .file-icon {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 16px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }

        .file-pdf {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
        }

        .file-video {
            background: linear-gradient(135deg, #9b59b6, #8e44ad);
        }

        .file-audio {
            background: linear-gradient(135deg, #f39c12, #e67e22);
        }

        .file-document {
            background: linear-gradient(135deg, #3498db, #2980b9);
        }

        .file-image {
            background: linear-gradient(135deg, #27ae60, #219653);
        }

        .file-archive {
            background: linear-gradient(135deg, #34495e, #2c3e50);
        }

        /* Dark Mode Support for Notifications */
        body.dark-mode .notification-header,
        body.dark-mode .notification-footer {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            border-color: #4a5f7a;
        }

        body.dark-mode .notification-body {
            background: #34495e;
        }

        body.dark-mode .notification-item:hover {
            background: linear-gradient(135deg, #3a506b 0%, #2c3e50 100%);
        }

        body.dark-mode .notification-item.new {
            background: linear-gradient(135deg, #1a5276 0%, #154360 100%);
        }

        body.dark-mode .notification-item h6 {
            color: #ecf0f1 !important;
        }

        /* Responsive Design for Notifications */
        @media (max-width: 768px) {
            .notification-dropdown {
                min-width: 320px;
                right: -50px;
            }

            .notification-btn {
                padding: 6px 12px !important;
                font-size: 0.9rem;
            }

            .notification-btn .notification-badge {
                font-size: 10px;
                padding: 2px 6px;
            }
        }

        /* Enhanced Notification Button */
        .notification-btn {
            background: rgba(255, 255, 255, 0.1) !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            border-radius: 20px !important;
            padding: 8px 15px !important;
            color: white !important;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
        }

        .notification-btn:hover {
            background: rgba(255, 255, 255, 0.2) !important;
            border-color: rgba(255, 255, 255, 0.5) !important;
            transform: translateY(-2px);
        }

        /* Enhanced Notification Dropdown */
        .notification-dropdown {
            min-width: 450px;
            max-height: 600px;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .notification-header {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-bottom: 2px solid #e9ecef;
        }

        .notification-body {
            background: white;
        }

        .notification-footer {
            background: #f8f9fa;
        }

        /* Enhanced Notification Items */
        .notification-item {
            transition: all 0.3s ease;
            cursor: pointer;
            border-left: 4px solid transparent;
        }

        .notification-item:hover {
            background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
            border-left-color: #3498db;
            transform: translateX(5px);
        }

        .notification-item.new {
            background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
            border-left-color: #27ae60;
        }

        /* Enhanced File Icons */
        .file-icon {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 16px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }

        .file-pdf {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
        }

        .file-video {
            background: linear-gradient(135deg, #9b59b6, #8e44ad);
        }

        .file-audio {
            background: linear-gradient(135deg, #f39c12, #e67e22);
        }

        .file-document {
            background: linear-gradient(135deg, #3498db, #2980b9);
        }

        .file-image {
            background: linear-gradient(135deg, #27ae60, #219653);
        }

        .file-archive {
            background: linear-gradient(135deg, #34495e, #2c3e50);
        }

        /* Responsive Design for Notifications */
        @media (max-width: 768px) {
            .notification-dropdown {
                min-width: 320px;
                right: -50px;
            }
        }

        /* Ensure dropdowns work */
        .dropdown-menu {
            display: none;
        }

        .dropdown-menu.show {
            display: block;
        }

        /* Simple notification styles */
        .dropdown-header {
            font-weight: bold;
        }

        .dropdown-footer {
            border-top: 1px solid #dee2e6;
        }

        /* Improved Notification Button */
        .notification-btn-improved {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            border-radius: 25px !important;
            padding: 8px 16px !important;
            color: white !important;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            backdrop-filter: blur(10px);
        }

        .notification-btn-improved:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.2) 100%) !important;
            border-color: rgba(255, 255, 255, 0.5) !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        /* Improved Notification Badge */
        .notification-badge-improved {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            animation: pulse 2s infinite;
            box-shadow: 0 2px 10px rgba(231, 76, 60, 0.5);
        }

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

            50% {
                transform: scale(1.1);
            }

            100% {
                transform: scale(1);
            }
        }

        /* Improved Dropdown */
        .notification-dropdown-improved {
            min-width: 380px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(0, 0, 0, 0.1);
            overflow: hidden;
            padding: 0;
        }

        /* Improved Header */
        .notification-header-improved {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-bottom: none;
        }

        /* Improved Notification Items */
        .notification-items-container {
            max-height: 300px;
            overflow-y: auto;
        }

        .notification-item-improved {
            border-left: 3px solid transparent;
            transition: all 0.3s ease;
            border-bottom: 1px solid #f8f9fa;
            text-decoration: none !important;
        }

        .notification-item-improved:hover {
            background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
            border-left-color: #3498db;
            transform: translateX(5px);
            text-decoration: none !important;
        }

        .notification-item-improved:last-child {
            border-bottom: none;
        }

        /* Improved Icon */
        .notification-icon-improved {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            background: rgba(52, 152, 219, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        /* Improved Footer */
        .notification-footer-improved {
            background: #f8f9fa;
        }

        /* Make sure dropdown works on hover */
        .dropdown:hover .dropdown-menu {
            display: block;
            margin-top: 0;
        }

        /* ========== OLD CHAT STYLES - REPLACED BY TELEGRAM STYLE ========== */
        /* 
        .chat-system-container {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 25px;
            padding: 3px;
            box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
            margin-top: 30px;
            overflow: hidden;
        }

        .chat-system-inner {
            background: white;
            border-radius: 23px;
            padding: 0;
            height: 600px; /* Fixed height for consistency */
        }

        .chat-system-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 35px 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .chat-system-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: pulse 4s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 0.8; }
        }

        .chat-system-header h3 {
            position: relative;
            z-index: 1;
            font-weight: 700;
            font-size: 1.8rem;
            margin: 0;
            text-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }

        .chat-interface {
            padding: 25px;
        }

        /* Sidebar Styles */
        .chat-sidebar {
            background: #f8f9fa;
            border-right: 1px solid #e9ecef;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .chat-sidebar-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-bottom: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-sidebar-header h5 {
            margin: 0;
            font-weight: 600;
            font-size: 1.1rem;
        }

        /* User list styling */
        .user-list-container {
            flex: 1;
            overflow-y: auto;
        }

        .user-item {
            transition: all 0.3s ease;
            border: none !important;
            margin: 0 !important;
        }

        .user-item:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
        }

        .user-item.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            color: white !important;
        }

        .user-item.active .text-muted {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        .user-item.active .badge {
            background: rgba(255, 255, 255, 0.3) !important;
            color: white !important;
        }

        /* Conversation item styling */
        .conversation-item {
            transition: all 0.3s ease;
            position: relative;
        }

        .conversation-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            transform: scaleY(0);
            transition: transform 0.3s ease;
        }

        .conversation-item:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
        }

        .conversation-item:hover::before {
            transform: scaleY(1);
        }

        .conversation-item.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            color: white !important;
        }

        .conversation-item.active .text-muted {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        .conversation-item.active .badge {
            background: rgba(255, 255, 255, 0.3) !important;
            color: white !important;
        }

        /* Search result styling */
        .search-result-item {
            transition: all 0.3s ease;
            background: white;
        }

        .search-result-item:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
            transform: translateX(5px);
        }

        /* New chat button */
        #new-chat-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            transition: all 0.3s ease;
        }

        #new-chat-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }

        /* Main Chat Area */
        .chat-main {
            background: white;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .chat-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 25px;
            border-bottom: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .chat-header h5 {
            margin: 0;
            font-weight: 600;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
        }

        .chat-header h5 i {
            margin-right: 10px;
            font-size: 1.1rem;
        }

        /* Messages Container */
        .messages-container {
            flex: 1;
            background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
            padding: 25px;
            overflow-y: auto;
            scroll-behavior: smooth;
        }

        .messages-container::-webkit-scrollbar {
            width: 8px;
        }

        .messages-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .messages-container::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 10px;
        }

        .messages-container::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
        }

        /* Welcome Message Styles */
        .messages-container .welcome-card {
            animation: fadeInUp 0.6s ease;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .messages-container .welcome-card .bg-white {
            border: 2px solid #f0f0f0;
            transition: all 0.3s ease;
        }

        .messages-container .welcome-card .bg-white:hover {
            border-color: #667eea;
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2) !important;
        }

        .messages-container .fa-arrow-left {
            animation: pointLeft 2s ease-in-out infinite;
        }

        @keyframes pointLeft {
            0%, 100% { transform: translateX(0); }
            50% { transform: translateX(-10px); }
        }

        /* Message Input */
        .message-input-container {
            background: white;
            padding: 20px 25px;
            border-top: 2px solid #f0f0f0;
        }

        .message-input-container .input-group {
            border-radius: 25px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        }

        .message-input-container input {
            border: 2px solid #e9ecef;
            padding: 12px 20px;
            font-size: 0.95rem;
            border-radius: 25px 0 0 25px;
        }

        .message-input-container input:focus {
            border-color: #667eea;
            box-shadow: none;
        }

        .message-input-container button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            padding: 12px 30px;
            border-radius: 0 25px 25px 0;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .message-input-container button:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
        }

        /* Conversation Items */
        .conversation-item {
            padding: 18px 20px;
            border-bottom: 1px solid #f0f0f0;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .conversation-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            transform: scaleY(0);
            transition: transform 0.3s ease;
        }

        .conversation-item:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
            transform: translateX(8px);
        }

        .conversation-item:hover::before {
            transform: scaleY(1);
        }

        .conversation-item.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateX(8px);
        }

        .conversation-item.active::before {
            transform: scaleY(1);
            width: 100%;
        }

        .conversation-info {
            flex: 1;
        }

        .conversation-info strong {
            font-size: 1rem;
            display: block;
            margin-bottom: 4px;
        }

        .conversation-info small {
            opacity: 0.8;
            font-size: 0.85rem;
        }

        .conversation-unread {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
            color: white;
            border-radius: 20px;
            min-width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            padding: 0 8px;
            box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }

        /* Message Bubbles */
        .message {
            margin-bottom: 20px;
            padding: 14px 18px;
            border-radius: 20px;
            max-width: 75%;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
            position: relative;
            animation: messageSlideIn 0.3s ease;
            word-wrap: break-word;
        }

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

        .message.sent {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            margin-left: auto;
            border-bottom-right-radius: 5px;
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
        }

        .message.received {
            background: white;
            border: 2px solid #f0f0f0;
            border-bottom-left-radius: 5px;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
        }

        .message-sender {
            font-weight: 700;
            font-size: 0.8rem;
            margin-bottom: 6px;
            opacity: 0.9;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .message.received .message-sender {
            color: #667eea;
        }

        .message.sent .message-sender {
            color: rgba(255, 255, 255, 0.95);
        }

        .message-text {
            line-height: 1.5;
            font-size: 0.95rem;
        }

        .message-time {
            font-size: 0.7rem;
            opacity: 0.7;
            margin-top: 6px;
            text-align: right;
            font-weight: 500;
        }

        /* User Search Results */
        .user-search-result {
            padding: 15px 18px;
            border: 2px solid #f0f0f0;
            border-radius: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: white;
            position: relative;
            overflow: hidden;
        }

        .user-search-result::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
            transition: left 0.5s ease;
        }

        .user-search-result:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
            border-color: #667eea;
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
        }

        .user-search-result:hover::before {
            left: 100%;
        }

        /* Dark Mode Support */
        body.dark-mode .chat-system-inner {
            background: #2c3e50;
        }

        body.dark-mode .chat-sidebar {
            background: #34495e;
        }

        body.dark-mode .chat-main {
            background: #2c3e50;
        }

        body.dark-mode .messages-container {
            background: linear-gradient(to bottom, #2c3e50 0%, #34495e 100%);
        }

        body.dark-mode .message.received {
            background: #34495e;
            border-color: #4a5f7a;
            color: #ecf0f1;
        }

        body.dark-mode .conversation-item {
            border-bottom-color: #4a5f7a;
        }

        body.dark-mode .conversation-item:hover {
            background: rgba(102, 126, 234, 0.1);
        }

        body.dark-mode .message-input-container {
            background: #34495e;
            border-top-color: #4a5f7a;
        }

        body.dark-mode .message-input-container input {
            background: #2c3e50;
            border-color: #4a5f7a;
            color: #ecf0f1;
        }

        /* Responsive design */
        @media (max-width: 768px) {
            .chat-system-inner {
                height: auto;
                min-height: 500px;
            }
            
            .col-md-4, .col-md-8 {
                height: 300px;
            }
            
            .user-list-container {
                height: 250px !important;
            }
            
            .messages-container {
                height: 250px !important;
            }
        }

        body.dark-mode .conversation-item:hover {
            background: linear-gradient(135deg, #3a506b 0%, #2c3e50 100%);
        }
        */
        /* ========== END OLD CHAT STYLES ========== */

        body.dark-mode .message.received {
            background: #2c3e50;
            border-color: #4a5f7a;
            color: #ecf0f1;
        }

        body.dark-mode .user-search-result {
            background: #2c3e50;
            border-color: #4a5f7a;
            color: #ecf0f1;
        }

        body.dark-mode .user-search-result:hover {
            background: linear-gradient(135deg, #3a506b 0%, #2c3e50 100%);
            border-color: #3498db;
        }

        /* Chat navigation item */
        .chat-nav-item {
            position: relative;
        }

        .chat-nav-item .notification-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        /* Group Chat Styles */
        .group-user-item {
            transition: all 0.3s ease;
        }

        .group-user-item:hover {
            background: #f8f9fa;
        }

        .group-users-container {
            background: white;
        }

        .conversation-item[data-conversation-type="group"] {
            border-left: 3px solid #17a2b8;
        }

        .conversation-info .badge {
            font-size: 0.6rem;
        }
        
        /* ========== FLOATING CHAT WINDOW STYLES ========== */
        .chat-window-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .chat-window-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .chat-floating-window {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            width: 90%;
            max-width: 1400px;
            height: 85vh;
            max-height: 800px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .chat-floating-window.active {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%) scale(1);
        }
        
        .chat-floating-window.minimized {
            height: 60px;
            max-height: 60px;
        }
        
        .chat-floating-window.minimized .chat-window-content {
            display: none;
        }
        
        .chat-window-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 20px 20px 0 0;
            flex-shrink: 0;
        }
        
        .chat-window-header h5 {
            margin: 0;
            font-weight: 600;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
        }
        
        .chat-window-controls {
            display: flex;
            gap: 10px;
        }
        
        .chat-control-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .chat-control-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }
        
        .chat-window-content {
            flex: 1;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .chat-window-content #chat-system {
            padding: 0 !important;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        
        .chat-window-content .container {
            max-width: 100% !important;
            padding: 0 !important;
            height: 100%;
            flex: 1;
        }
        
        .chat-window-content .telegram-chat-container {
            height: 100%;
            border-radius: 0;
        }
        
        /* Dark mode support for floating window */
        body.dark-mode .chat-floating-window {
            background: #2c3e50;
        }
        
        body.dark-mode .chat-window-header {
            background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .chat-floating-window {
                width: 95%;
                height: 90vh;
                max-height: none;
            }
            
            .chat-window-header h5 {
                font-size: 1rem;
            }
        }
        /* ========== END FLOATING CHAT WINDOW STYLES ========== */
        
        /* ========== BOOK VIEWER MODAL STYLES ========== */
        .book-viewer-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .book-viewer-modal.active {
            opacity: 1;
            visibility: visible;
        }
        
        .book-viewer-container {
            width: 95%;
            max-width: 1200px;
            height: 90vh;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: scale(0.9);
            transition: all 0.3s ease;
        }
        
        .book-viewer-modal.active .book-viewer-container {
            transform: scale(1);
        }
        
        .book-viewer-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }
        
        .book-viewer-header h5 {
            margin: 0;
            font-size: 1.3rem;
            font-weight: 600;
            display: flex;
            align-items: center;
        }
        
        .book-viewer-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1.2rem;
        }
        
        .book-viewer-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }
        
        .book-viewer-content {
            flex: 1;
            position: relative;
            overflow: hidden;
            background: #f5f5f5;
        }
        
        .book-viewer-frame {
            width: 100%;
            height: 100%;
            border: none;
            background: white;
        }
        
        .book-viewer-loading {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: white;
            color: #667eea;
        }
        
        .book-viewer-loading p {
            margin-top: 20px;
            font-size: 1.1rem;
            color: #666;
        }
        
        .book-viewer-error {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: white;
            color: #e74c3c;
            padding: 40px;
            text-align: center;
        }
        
        .book-viewer-error h4 {
            color: #2c3e50;
            margin-bottom: 15px;
        }
        
        .book-viewer-error p {
            color: #666;
            max-width: 500px;
        }
        
        /* Dark mode support */
        body.dark-mode .book-viewer-container {
            background: #2c3e50;
        }
        
        body.dark-mode .book-viewer-content {
            background: #34495e;
        }
        
        body.dark-mode .book-viewer-loading,
        body.dark-mode .book-viewer-error {
            background: #2c3e50;
        }
        
        body.dark-mode .book-viewer-error h4 {
            color: #ecf0f1;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .book-viewer-container {
                width: 100%;
                height: 100vh;
                border-radius: 0;
            }
            
            .book-viewer-header h5 {
                font-size: 1rem;
            }
        }
        /* ========== END BOOK VIEWER MODAL STYLES ========== */

/* ========================================
   MOBILE DASHBOARD OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
    /* Compact Welcome Card */
    .user-welcome-card {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }

    .welcome-content {
        flex-direction: row !important; /* Keep icon and text side-by-side if possible */
        align-items: center !important;
        text-align: left !important;
        gap: 15px !important;
    }

    .welcome-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        border-width: 2px !important;
    }

    .welcome-title {
        font-size: 1.3rem !important;
        margin-bottom: 5px !important;
    }

    .welcome-subtitle {
        font-size: 0.9rem !important;
    }

    /* Compact Issued Book Alert */
    .alert.alert-info {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }

    .alert.alert-info h4 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .alert.alert-info p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    .alert.alert-info .btn {
        padding: 8px 15px !important;
        font-size: 0.85rem !important;
    }

    /* Stats Cards - Single Row on Mobile (4 columns) */
    .col-md-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        padding-right: 5px !important;
        padding-left: 5px !important;
    }

    .stats-card {
        padding: 8px 4px !important;
        min-height: 90px !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-bottom: 10px !important;
    }

    .stats-card i {
        font-size: 1.2rem !important;
        margin-bottom: 5px !important;
    }

    .stats-card h4 {
        font-size: 1rem !important;
        margin-bottom: 2px !important;
        line-height: 1.1 !important;
    }

    .stats-card p {
        font-size: 0.65rem !important;
        margin-bottom: 0 !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    /* Compact Issued Book Alert - Stack Vertically */
    .alert.alert-info .row {
        flex-direction: column !important;
    }

    .alert.alert-info .col-md-8,
    .alert.alert-info .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }

    .alert.alert-info .text-right {
        text-align: center !important;
        margin-top: 10px !important;
    }

    /* Compact Book Shelf */
    .book {
        height: 140px !important; /* Reduced from ~200px */
        width: 90px !important; /* Slightly narrower */
        margin: 0 8px !important; /* Reduced spacing */
    }

    .book-spine {
        width: 12px !important; /* Thinner spine */
    }

    .book-title {
        font-size: 0.7rem !important; /* Smaller text */
        padding: 8px 6px !important; /* Less padding */
        line-height: 1.1 !important;
    }

    .books-row {
        padding: 15px 10px !important; /* Less padding around shelf */
    }

    /* Compact Search Section - Smaller Overall */
    .search-section {
        padding: 15px 12px !important;
        margin-bottom: 15px !important;
    }

    .search-container {
        padding: 15px !important;
    }

    .search-header {
        margin-bottom: 12px !important;
    }

    .search-icon-container {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 10px !important;
    }

    .search-title {
        font-size: 1.1rem !important;
        margin-bottom: 5px !important;
    }

    .search-subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 10px !important;
    }

    .search-main-icon {
        font-size: 1.5rem !important;
    }

    /* Compact Search Box */
    .search-box {
        margin-bottom: 12px !important;
    }

    .search-box input {
        padding: 10px 15px !important;
        font-size: 0.85rem !important;
    }

    .search-box button {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
    }

    /* Compact Quick Filters */
    .quick-filters {
        margin-bottom: 12px !important;
        padding: 10px !important;
    }

    .filters-header {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }

    .filter-buttons {
        gap: 6px !important;
    }

    .filter-btn {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
    }

    .filter-btn i {
        font-size: 0.7rem !important;
    }

    /* Search Stats - 3 Columns in Single Row on Mobile */
    .search-stats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        justify-content: space-between !important;
        align-items: stretch !important;
    }

    .search-stats .stat-item {
        flex: 1 1 33.333% !important;
        min-width: 0 !important;
        max-width: 33.333% !important;
        padding: 10px 6px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .search-stats .stat-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .search-stats .stat-icon {
        font-size: 1.2rem !important;
        margin-bottom: 5px !important;
    }

    .search-stats .stat-number {
        font-size: 1rem !important;
        display: block !important;
        font-weight: bold !important;
    }

    .search-stats .stat-label {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Compact Book Shelf - Shorter Heights */
    .book {
        height: 120px !important; /* Reduced from 140px */
        width: 85px !important; /* Slightly narrower */
        margin: 0 6px !important; /* Reduced spacing */
    }

    .book-spine {
        width: 10px !important; /* Thinner spine */
    }

    .book-title {
        font-size: 0.65rem !important; /* Smaller text */
        padding: 6px 4px !important; /* Less padding */
        line-height: 1 !important;
    }

    .books-row {
        padding: 12px 8px !important; /* Less padding around shelf */
    }

    /* MOBILE ONLY: Compact Category Cards - 3x3 Grid, Shorter Card Height */
    #categories .category-card {
        padding: 8px !important;
        margin-bottom: 0 !important;
        min-height: auto !important;
        max-height: 160px !important;
        height: 160px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    /* MOBILE ONLY: Force 3 columns and reduce spacing */
    #categories .col-sm-6.col-md-4.col-lg-3.mb-4,
    #categories .col-sm-6.col-md-4.col-lg-3,
    #categories .row > div {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        margin-bottom: 6px !important;
    }
    
    /* Override Bootstrap mb-4 specifically */
    #categories .mb-4 {
        margin-bottom: 6px !important;
    }

    /* MOBILE ONLY: Remove extra spacing from category section row */
    #categories .row {
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    /* Smaller, more compact icon circles */
    .category-card > div[style*="width: 80px"] {
        width: 45px !important;
        height: 45px !important;
        margin: 0 auto 8px !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    }

    .category-card > div[style*="width: 80px"] i {
        font-size: 1.3rem !important;
    }

    /* Smaller, tighter card titles */
    .category-card h5.card-title {
        font-size: 0.8rem !important;
        margin-bottom: 6px !important;
        line-height: 1.1 !important;
        font-weight: 600 !important;
        max-height: 2.2em !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }

    /* Smaller, more compact buttons */
    .category-card .btn {
        padding: 5px 8px !important;
        font-size: 0.7rem !important;
        margin-top: 6px !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
    }

    .category-card .btn i {
        font-size: 0.65rem !important;
        margin-right: 2px !important;
    }

    /* Remove excessive spacing */
    .category-card:hover {
        transform: translateY(-2px) !important;
    }

    /* Adjust Dashboard Hero */
    .dashboard-hero {
        padding: 100px 0 40px !important;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%) !important;
    }

    .dashboard-hero h1 {
        font-size: 1.8rem !important;
    }

    /* Full Screen Chat on Mobile */
    .chat-floating-window {
        width: 100% !important;
        height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh !important;
        z-index: 9999 !important;
    }

    .chat-window-header {
        border-radius: 0 !important;
        padding: 15px !important;
    }

    .chat-messages {
        height: calc(100% - 120px) !important;
    }
}

/* Our Journey: 2x2 grid with equal-height cards on mobile */
@media (max-width: 768px) {
    .timeline {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        grid-auto-rows: auto !important; /* let content define height per row */
        gap: 20px !important;
        max-width: none !important;
        padding: 20px !important;
        align-items: stretch !important;
    }

    .timeline::before {
        display: none !important; /* hide center line */
    }

    .timeline-item {
        position: static !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .timeline-icon {
        position: static !important;
        transform: none !important;
        margin-bottom: 12px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }

    .timeline-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 15px !important;
        border-radius: 10px !important;
        height: 100% !important; /* grow naturally with content */
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important; /* let content flow naturally */
    }

    .timeline-content h4 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }

    .timeline-content p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
}

/* 24/7 Digital Access: 2x1 grid for feature list on mobile */
@media (max-width: 768px) {
    .feature-list {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 6px 0 !important;
    }

    .feature-item,
    .feature-list-item {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        white-space: nowrap !important;
    }

    .feature-secondary {
        font-size: 0.95rem !important;
        text-align: center !important;
        display: flex;
        justify-content: center;
        gap: 8px;
    }
}

/* MOBILE CARD STYLES - Reduce why-card sizes on mobile */
@media (max-width: 768px) {
    .why-card {
        padding: 20px 15px !important;
        border-radius: 15px !important;
        margin-bottom: 20px !important;
        height: 200px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        transition: none !important;
        transform: none !important;
    }

    .why-card:hover {
        transform: none !important;
    }

    .why-icon {
        width: 60px !important; /* Reduced from 80px */
        height: 60px !important; /* Reduced from 80px */
        font-size: 1.5rem !important; /* Reduced from 2rem */
        margin-bottom: 15px !important; /* Reduced from 25px */
        flex-shrink: 0 !important;
    }

    .why-card h4 {
        font-size: 1.2rem !important; /* Reduced from 1.5rem */
        margin-bottom: 10px !important; /* Reduced from 15px */
        flex-shrink: 0 !important;
    }

    .why-card p {
        font-size: 0.9rem !important; /* Smaller text */
        line-height: 1.4 !important;
        flex-grow: 1 !important;
    }

    .why-choose-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .why-choose-row .col-lg-4 {
        display: flex !important;
        flex-direction: column !important;
    }

}

/* MOBILE SEARCH STYLES - Must be at end to override desktop styles */
@media (max-width: 768px) {
    /* Enhanced Search Section Mobile Styles */
    .search-section {
        padding: 20px 15px !important;
        margin: 15px 0 !important;
        border-radius: 15px !important;
    }

    .search-container {
        max-width: none !important;
    }

    .search-icon-container {
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    .search-title {
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    .search-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
        text-align: center !important;
    }

    .search-box {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .search-input-container {
        min-width: auto !important;
        width: 100% !important;
    }

    .search-input {
        font-size: 16px !important;
        padding: 12px 45px 12px 40px !important;
        border-radius: 20px !important;
        height: auto !important;
    }

    .search-input::placeholder {
        font-size: 14px !important;
        color: #6c757d !important;
    }

    .search-btn {
        width: auto !important; /* Short width instead of full width */
        min-width: 120px !important;
        max-width: 200px !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        border-radius: 20px !important;
        margin-top: 0 !important;
        font-size: 14px !important;
        height: auto !important;
        margin: 0 auto !important; /* Center the button */
    }

    .search-input-icon {
        left: 14px !important;
        font-size: 0.9rem !important;
        color: #6c757d !important;
    }

    .search-clear-btn {
        right: 12px !important;
    }

    .search-main-icon {
        font-size: 2rem !important;
        margin-bottom: 10px !important;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 576px) {
    .search-section {
        padding: 15px 12px !important;
        margin: 10px 0 !important;
        border-radius: 12px !important;
    }

    .search-title {
        font-size: 1.3rem !important;
    }

    .search-subtitle {
        font-size: 0.85rem !important;
    }

    .search-input {
        padding: 10px 40px 10px 35px !important;
        font-size: 15px !important;
    }

    .search-input::placeholder {
        font-size: 13px !important;
    }

    .search-btn {
        padding: 10px 18px !important;
        font-size: 13px !important;
    }

    .search-input-icon {
        left: 12px !important;
        font-size: 0.8rem !important;
    }

    .search-clear-btn {
        right: 10px !important;
        font-size: 0.8rem !important;
    }

    .search-main-icon {
        font-size: 1.8rem !important;
    }

}

/* FORCE MOBILE GRID LAYOUT FOR FEATURES - ADDED TO OVERRIDE ALL PREVIOUS STYLES */
@media (max-width: 768px) {
    /* 24/7 Digital Access Grid */
    .feature-box .feature-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .feature-box .feature-grid .feature-item {
        padding: 8px 5px !important;
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
        height: 100% !important;
        gap: 4px !important;
    }
    
    .feature-box .feature-grid .feature-item i {
        margin-right: 0 !important;
        margin-bottom: 4px !important;
        font-size: 1.2rem !important;
    }
    
    .feature-box .feature-grid .feature-item strong {
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
    }

    .feature-box .feature-grid .feature-item p {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
    
    .feature-box .feature-grid .feature-item:nth-child(3) {
        grid-column: span 2 !important;
        max-width: 50% !important;
        margin: 0 auto !important;
    }

    /* What We Offer Grid */
    .feature-box .feature-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .feature-box .feature-list .feature-list-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 10px 5px !important;
        height: 100% !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 5px !important;
    }

    .feature-box .feature-list .feature-list-item i {
        margin-bottom: 4px !important;
        margin-right: 0 !important;
        font-size: 1.2rem !important;
    }

    .feature-box .feature-list .feature-list-item span {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        display: block !important;
    }

    /* Center the 5th item (Free Wi-Fi Access) */
    .feature-box .feature-list .feature-list-item:nth-child(5) {
        grid-column: span 2 !important;
        max-width: 50% !important;
        margin: 0 auto !important;
    }
}

/* FORCE COMPACT LAYOUT FOR OUR JOURNEY SECTION ON MOBILE */
@media (max-width: 768px) {
    /* Compact the section container */
    .journey-section {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    .timeline {
        padding: 0 !important;
        margin-top: 10px !important;
    }

    /* Remove the vertical line */
    .timeline::before {
        display: none !important;
    }

    .timeline-item {
        margin-bottom: 20px !important;
        padding-left: 0 !important;
        flex-direction: column !important; /* Stack icon and content */
        align-items: center !important;
    }

    .timeline-icon {
        position: static !important; /* Remove absolute positioning */
        transform: none !important;
        margin-bottom: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
        border-width: 2px !important;
        left: auto !important;
    }

    .timeline-content {
        width: 100% !important; 
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 15px !important;
        border-radius: 10px !important;
        text-align: center !important; /* Center text */
    }

    .timeline-content h4 {
        font-size: 1.1rem !important;
        margin-bottom: 5px !important;
        justify-content: center !important;
    }

    .timeline-content p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Reduce heading size and margin */
    .journey-section .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
    }

    /* Grid Layout for About Features (2 over 1) */
    .about-features-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important; /* Reduced gap */
        padding-bottom: 0 !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
        overflow-x: visible !important;
        margin-top: 10px !important; /* Reduced top margin */
        align-items: start !important; /* Prevent stretching */
    }

    .about-features-row .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        height: auto !important; /* Force auto height */
    }

    /* Center the 3rd item (Safe Digital Space) */
    .about-features-row .col-md-4:nth-child(3) {
        grid-column: span 2 !important;
        max-width: 60% !important; /* Slightly wider for better text fit */
        margin: 0 auto !important;
    }

    .about-features-row .d-flex {
        background: rgba(255, 255, 255, 0.5) !important;
        padding: 10px 5px !important; /* Vertical padding 10px, horizontal 5px */
        border-radius: 8px !important;
        height: auto !important; /* Force auto height */
        min-height: 0 !important; /* Remove any min-height */
        border: 1px solid rgba(0,0,0,0.05) !important;
        align-items: center !important;
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .about-features-row .d-flex i {
        font-size: 1.1rem !important;
        margin-right: 0 !important;
        margin-bottom: 8px !important; /* Increased from 4px */
        margin-top: 0 !important;
    }

    .about-features-row .d-flex h5 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important; /* Increased */
        line-height: 1.3 !important; /* Increased */
    }

    .about-features-row .d-flex p {
        font-size: 0.7rem !important; /* Slightly larger */
        line-height: 1.3 !important; /* Increased */
        margin-bottom: 0 !important;
    }

    /* Compact About Card Container */
    .about-card {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    .about-card h2 {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    .about-card p.lead {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
    }

    .about-card p {
        font-size: 0.85rem !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
    }

    /* Why Choose Section Grid (2 over 1) */
    .why-choose-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
        align-items: stretch !important;
    }

    .why-choose-row .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        height: 100% !important;
    }

    /* Center the 3rd item (Mobile Friendly) */
    .why-choose-row .col-lg-4:nth-child(3) {
        grid-column: span 2 !important;
        max-width: 60% !important;
        margin: 0 auto !important;
    }

    .why-card {
        padding: 10px 5px !important; /* Compact padding */
        border-radius: 8px !important;
        height: 100% !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .why-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
        margin-bottom: 8px !important;
        line-height: 35px !important; /* Center icon vertically */
    }

    .why-card h4 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important; /* Increased */
        line-height: 1.3 !important; /* Increased */
    }

    .why-card p {
        font-size: 0.7rem !important; /* Slightly larger */
        line-height: 1.3 !important; /* Increased */
        margin-bottom: 0 !important;
    }

    /* Our Values Section Grid (2 over 1) */
    .values-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
        align-items: stretch !important;
    }

    .values-row .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        height: 100% !important;
        display: flex !important;
    }

    /* Center the 3rd item (Innovation) */
    .values-row .col-md-4:nth-child(3) {
        grid-column: span 2 !important;
        max-width: 60% !important;
        margin: 0 auto !important;
    }

    .value-card {
        padding: 10px 5px !important; /* Compact padding */
        border-radius: 8px !important;
        height: 100% !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .value-card i {
        font-size: 1.2rem !important;
        margin-bottom: 8px !important;
    }

    .value-card h5 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important; /* Increased */
        line-height: 1.3 !important; /* Increased */
    }

    .value-card p {
        font-size: 0.7rem !important; /* Slightly larger */
        line-height: 1.3 !important; /* Increased */
        margin-bottom: 0 !important;
    }

    /* Platform Features Grid (2x2) */
    .access-features .platform-features-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
        width: 100% !important;
        grid-auto-flow: row !important; /* Ensure items flow in rows */
    }

    .access-features .platform-features-grid .feature-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 10px 5px !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border-radius: 8px !important;
        height: auto !important;
        min-height: 80px !important;
        border: 1px solid rgba(0,0,0,0.05) !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        grid-column: auto !important; /* Force no spanning */
        grid-row: auto !important;
    }

    /* Explicitly target the 3rd item to ensure it doesn't span */
    .access-features .platform-features-grid .feature-item:nth-child(3) {
        grid-column: auto !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .access-features .platform-features-grid .feature-item i {
        font-size: 1.2rem !important;
        margin-right: 0 !important;
        margin-bottom: 5px !important;
        float: none !important;
    }

    .access-features .platform-features-grid .feature-item span {
        font-size: 0.8rem !important; /* Slightly larger */
        line-height: 1.3 !important; /* Increased */
        display: block !important;
    }

    /* Our Services Grid (2 columns) */
    .services-grid-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
        align-items: start !important;
    }

    .services-grid-row .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        height: auto !important;
    }

    .service-card {
        padding: 10px 5px !important;
        border-radius: 8px !important;
        height: 100% !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .service-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
        margin-bottom: 8px !important;
        line-height: 35px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .service-card h4 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important; /* Increased */
        line-height: 1.3 !important; /* Increased */
    }

    .service-card p {
        font-size: 0.7rem !important; /* Slightly larger */
        line-height: 1.3 !important; /* Increased */
        margin-bottom: 0 !important;
    }

    /* Get In Touch Grid (2 over 1) */
    .contact-grid-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
        align-items: stretch !important; /* Stretch items to match height */
    }

    .contact-grid-row .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        height: auto !important;
        display: flex !important; /* Ensure children can stretch */
        flex-direction: column !important;
    }

    /* Ensure the link wrapper in the first column stretches */
    .contact-grid-row .col-lg-4 a.contact-card-link {
        display: flex !important;
        flex: 1 !important;
        height: 100% !important;
        width: 100% !important;
    }

    /* Center the 3rd item (Email Us) */
    .contact-grid-row .col-lg-4:nth-child(3) {
        grid-column: span 2 !important;
        max-width: 60% !important;
        margin: 0 auto !important;
    }

    .contact-card {
        padding: 10px 5px !important;
        border-radius: 8px !important;
        height: 100% !important; /* Fill the available height */
        min-height: 0 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .contact-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
        margin-bottom: 8px !important;
        line-height: 35px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .contact-card h5 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important; /* Increased */
        line-height: 1.3 !important; /* Increased */
    }

    .contact-card p {
        font-size: 0.7rem !important; /* Slightly larger */
        line-height: 1.3 !important; /* Increased */
        margin-bottom: 0 !important;
    }

    /* Compact Get In Touch Header */
    .contact-section .text-center.mb-5 {
        margin-bottom: 15px !important; /* Reduce bottom margin of header container */
    }

    .contact-section h2 {
        font-size: 1.5rem !important;
        margin-bottom: 5px !important; /* Reduce bottom margin of title */
    }

    .contact-section p.lead {
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
    }

    /* Remove top spacing from Contact Section */
    .contact-section {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Mission & Vision Grid (2 columns) */
    .mission-vision-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
        align-items: stretch !important;
    }

    .mission-vision-row .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .mission-vision {
        padding: 10px 5px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; /* Restore original gradient */
        color: white !important; /* Ensure text is white */
        border-radius: 8px !important;
        height: 100% !important;
        border: none !important; /* Remove border as we have a gradient */
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3) !important; /* Restore some shadow */
    }

    .mission-vision h4 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
    }

    .mission-vision h4 i {
        font-size: 1.2rem !important;
        margin-bottom: 5px !important;
        margin-right: 0 !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .mission-vision p {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0 !important;
        color: rgba(255, 255, 255, 0.95) !important;
    }

    /* Reduce spacing between Mission/Vision and Services */
    .mission-vision-row {
        margin-bottom: 0 !important; /* Remove bottom margin completely */
    }

    .services-section {
        padding-top: 10px !important; /* Reduce top padding */
        padding-bottom: 15px !important; /* Add small bottom padding */
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .services-grid-row {
        margin-bottom: 10px !important; /* Reduce row bottom margin */
    }

    .services-section .text-center.mb-5 {
        margin-bottom: 15px !important; /* Reduce header bottom margin */
    }

    /* Remove top spacing from About Section */
    .about-section {
        padding-top: 0 !important;
        padding-bottom: 0 !important; /* Remove bottom padding */
        margin-top: 0 !important;
    }

    /* Remove margin from columns inside About Section to reduce space above Mission/Vision */
    .about-section .col-lg-6.mb-5 {
        margin-bottom: 10px !important; /* Default small margin */
    }

    /* Add specific spacing between "About Our Library" (1st col) and "24/7 Digital Access" (2nd col) */
    .about-section .row .col-lg-6:first-child {
        margin-bottom: 30px !important; /* Increase spacing between the two main columns */
    }

    /* Reduce spacing between "What We Offer" and "Why Choose Our Library" */
    /* Target the column containing "What We Offer" (2nd column in the row) */
    .about-section .row .col-lg-6:nth-child(2) {
        margin-bottom: 10px !important; /* Reduce bottom margin */
    }

    .why-choose-section {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .why-choose-section .text-center.mb-5 {
        margin-bottom: 15px !important; /* Reduce header bottom margin */
    }

    /* Hero Buttons Grid (2 over 1) */
    .hero-buttons-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        margin-top: 15px !important;
    }

    .hero-buttons-container .btn {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.9rem !important;
        padding: 12px 5px !important;
    }

    /* The 3rd button (Continue as Guest) spans 2 columns */
    .hero-buttons-container .btn:nth-child(3) {
        grid-column: span 2 !important;
        max-width: 80% !important; /* Make it slightly narrower than full width for better look */
        margin: 0 auto !important;
    }

    /* Reposition Time Card to Top-Left on Mobile */
    .floating-time-container {
        display: block !important; /* Override display: none from responsive.css */
        text-align: left !important;
        position: absolute !important; /* Absolute positioning */
        top: 80px !important; /* Adjusted to 80px (moved down 10px from 70px) */
        left: 20px !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important; /* Remove margins as we use top/left */
        max-width: 100% !important;
        transform: none !important;
        z-index: 20 !important; /* Ensure it's above other elements */
    }

    .floating-time {
        margin: 0 !important; /* Remove auto centering margin */
        display: inline-block !important; /* Allow it to size to content */
    }

    .floating-time-header,
    .floating-time-display {
        justify-content: flex-start !important; /* Align content to start */
    }

    /* Move Hero Content Down on Mobile */
    .hero-content {
        padding-top: 50px !important; /* Push content down */
    }

    /* Refine Stats Section on Mobile */
    .stats-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .stats-section .row {
        margin-bottom: 0 !important;
    }

    .stats-section .col-6 {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-bottom: 15px !important;
    }

    .stat-item {
        padding: 5px !important; /* Compact padding */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important; /* Bring number and text close together */
    }

    .stat-number {
        /* font-size: 2rem !important;  Reverted to original size as requested */
        margin-bottom: 0 !important;
        margin-right: 0 !important;
        line-height: 1 !important;
    }

    .stat-label {
        font-size: 0.9rem !important; /* Smaller text */
        margin-top: 0 !important;
        line-height: 1.2 !important;
        text-align: left !important;
    }

    /* Reduce spacing below Follow Us card on mobile */
    #contact {
        padding-bottom: 20px !important;
    }

    .contact-card {
        margin-bottom: 0 !important;
        padding-bottom: 10px !important;
    }

    .contact-card .social-links {
        margin-bottom: 0 !important;
    }
}
