/* Mobile Header Styles */
:root {
    --header-bg: rgba(10, 10, 10, 0.5);
    --header-text: #ffffff;
    --header-icon-size: 24px;
    --header-height: 56px;
    --header-padding: 16px;
    --theme-color: #624de3;
    --notification-bg: #141416;
    --notification-hover: rgba(255, 255, 255, 0.05);
    --notification-border: rgba(255, 255, 255, 0.05);
    --notification-text: rgba(255, 255, 255, 0.7);
}

/* Mobile header container */
.mobile-header {
    background-color: var(--header-bg);
    height: var(--header-height);
    padding: 0 var(--header-padding);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: transform 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

/* Header animation */
.header-hidden {
    transform: translateY(-100%);
}

/* Blurred header on scroll */
.mobile-header.scrolled {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Add padding to body to account for fixed header */
@media (max-width: 991.98px) {
    body {
        padding-top: var(--header-height);
    }
}

/* Logo styling */
.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-icon {
    color: #624de3;
    font-size: 1.8rem;
    font-weight: 800;
    margin-right: 2px;
    text-shadow: 2px 2px 4px rgba(98, 77, 227, 0.3);
    line-height: 1;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-size: 1.6rem;
    color: #fff;
    margin-right: 1px;
    line-height: 1;
}

.logo-accent {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #624de3, #8957FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

/* Mobile buttons container */
.mobile-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Button styling */
.btn-icon {
    background: transparent;
    border: none;
    padding: 8px;
    color: var(--header-text);
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    width: 40px;
    height: 40px;
}

.btn-icon:hover,
.btn-icon:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-icon svg {
    width: var(--header-icon-size);
    height: var(--header-icon-size);
}

/* Notification badge */
.notify-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc3545;
    border: 1px solid var(--header-bg);
}

/* Mobile Notification Dropdown */
@media (max-width: 991.98px) {
    /* Fix for notification dropdown */
    .dropdown-menu.notification-dropdown {
        position: fixed !important;
        top: calc(var(--header-height) + 8px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 32px) !important;
        max-width: 400px;
        max-height: calc(100vh - var(--header-height) - 16px);
        margin: 0;
        padding: 0;
        border-radius: 12px;
        border: 1px solid var(--notification-border);
        background-color: var(--notification-bg);
        overflow-y: auto;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
        contain: content;
    }

    /* Notification Header */
    .notification-dropdown .fw-semibold.fs-sm.pb-2 {
        padding: 14px !important;
        margin: 0;
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 5;
        border-bottom: 1px solid var(--notification-border);
        text-align: center;
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .notification-dropdown .fw-semibold.fs-sm.pb-2:before {
        content: '';
        width: 18px;
        height: 18px;
        margin-right: 10px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 1;
        flex-shrink: 0;
    }

    /* Rest of notification styles */
    .notification-dropdown .navbar-notifications {
        padding: 0;
        background: var(--notification-bg);
        border-radius: 12px;
        overflow: hidden;
    }

    /* Notification Items */
    .notification-dropdown .notification-item {
        padding: 12px 16px;
        position: relative;
        background-color: var(--notification-bg);
        transition: background-color 0.15s ease;
        border-bottom: 1px solid var(--notification-border);
        cursor: pointer;
        z-index: 1;
    }

    .notification-dropdown .notification-item:active {
        background-color: var(--notification-hover);
    }

    .notification-dropdown .notification-item.unread {
        background-color: rgba(98, 77, 227, 0.05);
    }

    .notification-dropdown .notification-item.unread:before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: var(--theme-color);
    }

    /* Avatar Styling */
    .notification-dropdown .notification-item .avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        margin-right: 12px;
        background: var(--notification-hover);
        border: none;
        font-size: 14px !important;
    }

    /* Notification Content */
    .notification-dropdown .notification-link {
        color: var(--notification-text);
        text-decoration: none;
        display: flex;
        align-items: center;
        padding-right: 24px;
        position: relative;
        isolation: isolate;
        contain: content;
    }

    .notification-dropdown .notification-link:after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
        background-size: contain;
        opacity: 0.5;
        transition: transform 0.2s ease;
    }

    .notification-dropdown .notification-item:active .notification-link:after {
        transform: translate(4px, -50%);
        opacity: 0.7;
    }

    .notification-dropdown .notification-content {
        flex: 1;
        min-width: 0;
        isolation: isolate;
        contain: content;
        overflow: hidden;
    }

    .notification-dropdown .notification-text {
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 4px;
        color: var(--notification-text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notification-dropdown .notification-text .fw-bold {
        color: #fff;
        font-weight: 500 !important;
    }

    .notification-dropdown .notification-meta {
        color: rgba(255, 255, 255, 0.4) !important;
        font-size: 0.75rem !important;
        font-weight: 400;
    }

    /* View All Link */
    .notification-dropdown .pt-2 {
        padding: 12px !important;
        background: var(--notification-bg);
        position: sticky;
        bottom: 0;
        z-index: 5;
        border-top: 1px solid var(--notification-border);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .notification-dropdown .view-all-link {
        color: var(--theme-color) !important;
        font-weight: 500 !important;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        border-radius: 8px;
        background: rgba(98, 77, 227, 0.1);
        transition: all 0.2s ease;
    }

    .notification-dropdown .view-all-link:active {
        background: rgba(98, 77, 227, 0.15);
        transform: scale(0.98);
    }

    /* Empty State */
    .notification-dropdown .navbar-notifications:empty {
        padding: 48px 24px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 240px;
    }

    .notification-dropdown .navbar-notifications:empty:before {
        content: '';
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.2)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
    }

    .notification-dropdown .navbar-notifications:empty:after {
        content: 'No notifications yet';
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.875rem;
        margin-top: 8px;
    }

    /* Notification Badge Animation */
    @keyframes notifyPulse {
        0% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.2); opacity: 0.8; }
        100% { transform: scale(1); opacity: 1; }
    }

    .notify-badge:not(.d-none) {
        animation: notifyPulse 2s infinite;
        background-color: var(--theme-color);
        width: 8px;
        height: 8px;
        top: 2px;
        right: 2px;
        border: 2px solid var(--notification-bg);
    }
}

/* Profile button */
.btn-profile {
    padding: 0 !important;
    overflow: visible;
    position: relative;
}

.btn-profile .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* XP badge styling */
.btn-profile::after {
    content: attr(data-xp-level);
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--theme-color, #624de3);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-weight: bold;
    box-sizing: border-box;
    z-index: 999;
}

/* Mobile search modal */
#searchModal .modal-content,
#notificationModal .modal-content {
    background-color: var(--header-bg);
    border: none;
    border-radius: 0;
    min-height: 100vh;
}

#searchModal .modal-header,
#notificationModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#searchModal .form-control {
    background-color: transparent;
    border: none;
    color: var(--header-text);
    font-size: 18px;
    height: 48px;
}

#searchModal .form-control:focus,
#notificationModal .form-control:focus {
    box-shadow: none;
}

/* Mobile Search Box Styling */
.mobile-search-box {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1029;
    padding: 1rem var(--header-padding);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease-in-out;
}

.mobile-search-box.collapsing {
    transition: height 0.3s ease-in-out;
}

/* Adjust body padding when search is active to prevent overlap */
body.search-active {
    padding-top: calc(var(--header-height) + 6.5rem);
    overflow: hidden;
}

.mobile-search-box .form-control {
    background-color: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    color: var(--header-text);
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    height: 44px;
}

.mobile-search-box .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.mobile-search-box .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #5a5efa;
    box-shadow: 0 0 0 0.25rem rgba(90, 94, 250, 0.25);
}

.mobile-search-box .btn-primary {
    background-color: #5a5efa;
    border-color: #5a5efa;
    color: white;
    padding: 0.5rem 1rem;
    height: 44px;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.mobile-search-box .btn-primary:hover {
    background-color: #4a4edf;
    border-color: #4a4edf;
}

/* Search Suggestions Styling */
.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #1a1a1e00;
    border-radius: 20px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    padding: 12px 0;
}

.search-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
    color: #fff;
}

.search-suggestions .suggestion-item:hover {
    background: rgba(90, 93, 250, 0);
    color: #fff;
}

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

.search-suggestion-thumb {
    width: 60px;
    height: 90px;
    border-radius: 0px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    border: none;
}

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

.search-suggestion-info {
    flex-grow: 1;
}

.search-suggestion-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
    font-size: 1rem;
}

.search-suggestion-meta {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.search-suggestion-rating {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-weight: 600;
    color: #ffc107;
    font-size: 0.85rem;
}

.search-suggestion-rating svg {
    width: 9px;
    height: 9px;
    margin-right: 4px;
    fill: #ffc107;
}

.view-all-results {
    display: block;
    text-align: center;
    padding: 12px 25px;
    color: #5a5efa;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
    text-decoration: none;
}

.view-all-results:hover {
    background: rgba(90, 94, 250, 0.1);
}

.no-results {
    padding: 18px 25px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Dropdown menus */
.dropdown-menu-dark {
    background-color: #1a1a1c;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Section headings for mobile */
.section-heading {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #5a5efa;
    display: inline-block;
}

/* Menu toggle button */
.navbar-toggler {
    padding: 0;
    border: none;
}

/* Mobile content container */
.mobile-content {
    padding-top: 16px;
}

/* Movie cards for mobile */
.movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.movie-card .card-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.movie-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.movie-card .card-title {
    color: white;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;
}

.movie-card .card-meta {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

.badge-new {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #5a5efa;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-featured {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff9800;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Play button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: rgba(90, 94, 250, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0;
    }
    
    .navbar-brand {
        margin-right: 0;
    }
    
    /* Main content padding for fixed header */
    .layout-content {
        padding-top: var(--header-height);
    }
}

/* Profile avatar placeholder for guests */
.profile-avatar-placeholder {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.profile-avatar-placeholder svg {
    color: rgba(255, 255, 255, 0.7);
}

/* Profile Dropdown Specific Styles */
@media (max-width: 991.98px) {
    .dropdown-menu.profile-dropdown {
        position: fixed !important;
        top: calc(var(--header-height) + 8px) !important;
        right: 16px !important;
        left: auto !important;
        transform: none !important;
        width: 250px !important;
        max-height: calc(100vh - var(--header-height) - 16px);
        margin: 0;
        padding: 0;
        border-radius: 12px;
        border: 1px solid var(--notification-border);
        background-color: var(--notification-bg);
        overflow-y: auto;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }

    .profile-dropdown .dropdown-item {
        padding: 12px 16px;
        color: rgba(255, 255, 255, 0.7);
        border-bottom: 1px solid var(--notification-border);
        transition: background-color 0.15s ease;
    }

    .profile-dropdown .dropdown-item:active,
    .profile-dropdown .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.05);
        color: #fff;
    }

    .profile-dropdown .dropdown-item:last-child {
        border-bottom: none;
    }

    /* Profile Header in Dropdown */
    .profile-dropdown .profile-header {
        padding: 16px;
        border-bottom: 1px solid var(--notification-border);
        background: rgba(255, 255, 255, 0.03);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .profile-dropdown .profile-header .avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        margin-right: 12px;
    }

    .profile-dropdown .profile-info {
        overflow: hidden;
    }

    .profile-dropdown .profile-info .username {
        color: #fff;
        font-weight: 600;
        font-size: 0.9375rem;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile-dropdown .profile-info .level {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.8125rem;
    }
}

/* Mobile Menu Offcanvas Styles */
#mobileMenu {
    background: linear-gradient(to right, rgba(17, 17, 19, 0.97), rgba(17, 17, 19, 0.85)); /* Gradient background */
    max-width: 45%; /* Take up only half the screen width */
    z-index: 1050;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
}

#mobileMenu .offcanvas-header {
    padding: 1.25rem var(--header-padding);
    height: var(--header-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(to right, rgba(17, 17, 19, 1), rgba(17, 17, 19, 0.9));
}

#mobileMenu .navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Enhanced logo styling */
#mobileMenu .logo-icon {
    color: #624de3;
    font-size: 2rem;
    font-weight: 900;
    margin-right: 4px;
    text-shadow: 2px 2px 8px rgba(98, 77, 227, 0.5);
    background: linear-gradient(135deg, #624de3, #8957FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

#mobileMenu .logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    letter-spacing: -1px;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-right: 1px;
}

#mobileMenu .logo-accent {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(135deg, #8957FF, #624de3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    filter: drop-shadow(0 2px 4px rgba(98, 77, 227, 0.3));
}

#mobileMenu .btn-close {
    position: absolute;
    right: 1.25rem;
    filter: invert(1);
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

#mobileMenu .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

#mobileMenu .offcanvas-body {
    padding: 16px;
    background: linear-gradient(135deg, rgba(17, 17, 19, 0.95) 0%, rgba(25, 25, 30, 0.9) 100%);
}

#mobileMenu .navbar-nav {
    margin-top: 8px;
}

#mobileMenu .nav-item {
    margin-bottom: 16px;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 0.5s forwards;
    animation-delay: calc(0.1s * var(--item-index, 0));
}

#mobileMenu .nav-item:nth-child(1) { --item-index: 1; }
#mobileMenu .nav-item:nth-child(2) { --item-index: 2; }
#mobileMenu .nav-item:nth-child(3) { --item-index: 3; }
#mobileMenu .nav-item:nth-child(4) { --item-index: 4; }
#mobileMenu .nav-item:nth-child(5) { --item-index: 5; }
#mobileMenu .nav-item:nth-child(6) { --item-index: 6; }

#mobileMenu .nav-link {
    color: var(--header-text);
    font-size: 18px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

#mobileMenu .nav-link:hover,
#mobileMenu .nav-link:focus {
    background-color: rgba(90, 94, 250, 0.15);
    color: #5a5efa;
    transform: translateX(5px);
}

/* Add icons to menu items */
#mobileMenu .nav-link::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

#mobileMenu .nav-link:hover::before {
    opacity: 1;
}

/* Menu item icons */
#mobileMenu .nav-link.menu-explore::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolygon points='16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76'%3E%3C/polygon%3E%3C/svg%3E");
}

#mobileMenu .nav-link.menu-movies::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.82 2H4.18C2.97 2 2 2.97 2 4.18v15.64c0 1.21.97 2.18 2.18 2.18h15.64c1.21 0 2.18-.97 2.18-2.18V4.18C22 2.97 21.03 2 19.82 2z'%3E%3C/path%3E%3Cpath d='M7 2v20'%3E%3C/path%3E%3Cpath d='M17 2v20'%3E%3C/path%3E%3Cpath d='M2 12h20'%3E%3C/path%3E%3Cpath d='M2 7h5'%3E%3C/path%3E%3Cpath d='M2 17h5'%3E%3C/path%3E%3Cpath d='M17 17h5'%3E%3C/path%3E%3Cpath d='M17 7h5'%3E%3C/path%3E%3C/svg%3E");
}

#mobileMenu .nav-link.menu-series::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='15' rx='2' ry='2'%3E%3C/rect%3E%3Cpolyline points='17 2 12 7 7 2'%3E%3C/polyline%3E%3C/svg%3E");
}

#mobileMenu .nav-link.menu-imdb::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8h1a4 4 0 0 1 0 8h-1'%3E%3C/path%3E%3Cpath d='M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z'%3E%3C/path%3E%3Cline x1='6' y1='1' x2='6' y2='4'%3E%3C/line%3E%3Cline x1='10' y1='1' x2='10' y2='4'%3E%3C/line%3E%3Cline x1='14' y1='1' x2='14' y2='4'%3E%3C/line%3E%3C/svg%3E");
}

#mobileMenu .nav-link.menu-community::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='9' cy='7' r='4'%3E%3C/circle%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'%3E%3C/path%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'%3E%3C/path%3E%3C/svg%3E");
}

#mobileMenu .nav-link.menu-request::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'%3E%3C/path%3E%3C/svg%3E");
}

/* Hover effect for the menu items */
#mobileMenu .nav-link:hover::before,
#mobileMenu .nav-link:focus::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235a5efa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    transform: translateX(3px);
}

/* Add a subtle animation to the offcanvas when it opens */
.offcanvas-backdrop.show {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, 0.5);
}

.offcanvas.showing,
.offcanvas.show {
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ensure the mobile menu doesn't show on desktop */
@media (min-width: 992px) {
    #mobileMenu {
        display: none;
    }
}

/* Ensure the navbar-collapse doesn't show on mobile */
@media (max-width: 991.98px) {
    #navbar {
        display: none !important;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 576px) {
    #mobileMenu {
        max-width: 75%; /* Wider on very small screens */
    }
    
    #mobileMenu .nav-link {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    #mobileMenu .nav-link::before {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
}

/* Desktop Notification Dropdown */
@media (min-width: 992px) {
    /* Notification badge */
    .notify-badge:not(.d-none) {
        animation: notifyPulse 2s infinite;
        background-color: var(--theme-color);
        width: 8px;
        height: 8px;
        top: 0;
        right: 0;
        border: 2px solid var(--notification-bg);
    }

    /* Notification dropdown */
    #notifyDropdown + .dropdown-menu {
        background-color: var(--notification-bg);
        border: 1px solid var(--notification-border) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        padding: 0 !important;
        overflow: hidden;
        max-height: 480px;
        overflow-y: auto;
        contain: content;
    }

    /* Notification Header */
    #notifyDropdown + .dropdown-menu .fw-semibold.fs-sm.pb-2 {
        padding: 16px !important;
        margin: 0;
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 5;
        border-bottom: 1px solid var(--notification-border);
        text-align: center;
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    #notifyDropdown + .dropdown-menu .fw-semibold.fs-sm.pb-2:before {
        content: '';
        width: 18px;
        height: 18px;
        margin-right: 10px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 1;
        flex-shrink: 0;
    }

    /* Notification Items */
    #notifyDropdown + .dropdown-menu .notification-item {
        padding: 12px 16px;
        position: relative;
        background-color: var(--notification-bg);
        transition: background-color 0.15s ease;
        border-bottom: 1px solid var(--notification-border);
        cursor: pointer;
        z-index: 1;
    }

    #notifyDropdown + .dropdown-menu .notification-item:hover {
        background-color: var(--notification-hover);
    }

    #notifyDropdown + .dropdown-menu .notification-item.unread {
        background-color: rgba(98, 77, 227, 0.05);
    }

    #notifyDropdown + .dropdown-menu .notification-item.unread:before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: var(--theme-color);
    }

    /* Avatar Styling */
    #notifyDropdown + .dropdown-menu .notification-item .avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        margin-right: 12px;
        background: var(--notification-hover);
        border: none;
        font-size: 14px !important;
    }

    /* Notification Content */
    #notifyDropdown + .dropdown-menu .notification-link {
        color: var(--notification-text);
        text-decoration: none;
        display: flex;
        align-items: center;
        padding-right: 24px;
        position: relative;
        isolation: isolate;
        contain: content;
    }

    #notifyDropdown + .dropdown-menu .notification-link:after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
        background-size: contain;
        opacity: 0.5;
        transition: transform 0.2s ease;
    }

    #notifyDropdown + .dropdown-menu .notification-item:hover .notification-link:after {
        transform: translate(4px, -50%);
        opacity: 0.7;
    }

    #notifyDropdown + .dropdown-menu .notification-content {
        flex: 1;
        min-width: 0;
        isolation: isolate;
        contain: content;
        overflow: hidden;
    }

    #notifyDropdown + .dropdown-menu .notification-meta {
        color: rgba(255, 255, 255, 0.4) !important;
        font-size: 0.75rem !important;
        font-weight: 400;
    }

    /* View All Link */
    #notifyDropdown + .dropdown-menu .pt-2 {
        padding: 12px !important;
        background: var(--notification-bg);
        position: sticky;
        bottom: 0;
        z-index: 5;
        border-top: 1px solid var(--notification-border);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    #notifyDropdown + .dropdown-menu .view-all-link {
        color: var(--theme-color) !important;
        font-weight: 500 !important;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        border-radius: 8px;
        background: rgba(98, 77, 227, 0.1);
        transition: all 0.2s ease;
    }

    #notifyDropdown + .dropdown-menu .view-all-link:hover {
        background: rgba(98, 77, 227, 0.15);
        transform: scale(0.98);
    }

    /* Empty State */
    #notifyDropdown + .dropdown-menu .navbar-notifications:empty {
        padding: 48px 24px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 240px;
    }

    #notifyDropdown + .dropdown-menu .navbar-notifications:empty:before {
        content: '';
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.2)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
    }

    #notifyDropdown + .dropdown-menu .navbar-notifications:empty:after {
        content: 'No notifications yet';
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.875rem;
        margin-top: 8px;
    }
}

/* Fix for notification items overlapping when scrolling */
.notification-dropdown .navbar-notifications,
#notifyDropdown + .dropdown-menu .navbar-notifications {
    position: relative;
    z-index: 0;
    isolation: isolate;
    contain: content;
}

.notification-item {
    position: relative;
    z-index: 0;
    isolation: isolate;
    contain: content;
    overflow: hidden;
}

.notification-link {
    isolation: isolate;
    contain: content;
}

.notification-content {
    isolation: isolate;
    contain: content;
    overflow: hidden;
}

/* Mobile Login and Sign up buttons */
@media (max-width: 991.98px) {
    .dropdown-menu.profile-dropdown .dropdown-item {
        padding: 0 !important;
        background-color: transparent !important;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 50px; /* Ensure enough height for vertical centering */
    }

    .dropdown-menu.profile-dropdown .anime-login-link-mobile {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.1);
        padding: 10px 24px !important;
        border-radius: 50px;
        text-decoration: none;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        margin: 0 10px 10px 10px; /* Center with auto margins, add bottom margin */
        font-weight: 500 !important;
        font-size: 0.95rem !important;
        display: flex; /* Use flex to center text horizontally */
        justify-content: center;
        align-items: center;
        width: calc(100% - 20px); /* Adjust width for margins */
    }

    .dropdown-menu.profile-dropdown .anime-login-link-mobile:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .dropdown-menu.profile-dropdown .anime-signup-btn-mobile {
        background: linear-gradient(45deg, #7c3aed, #c026d3) !important;
        color: white !important;
        padding: 10px 24px !important;
        border-radius: 50px;
        text-decoration: none;
        transition: all 0.3s ease;
        border: none !important;
        box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
        font-weight: 500 !important;
        font-size: 0.95rem !important;
        display: flex; /* Use flex to center text horizontally */
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        margin: 0 10px 10px 10px; /* Center with auto margins, add bottom margin */
        width: calc(100% - 20px); /* Adjust width for margins */
    }

    .dropdown-menu.profile-dropdown .anime-signup-btn-mobile::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, #4508d1, #7c3aed);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .dropdown-menu.profile-dropdown .anime-signup-btn-mobile:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    }

    .dropdown-menu.profile-dropdown .anime-signup-btn-mobile:hover::before {
        opacity: 1;
    }

    .dropdown-menu.profile-dropdown .anime-signup-btn-mobile span {
        position: relative;
        z-index: 1;
    }
} 