.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 125px 2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
}

.menu-overlay.active {
    transform: translateX(0);
}

.menu-links {
    margin-bottom: 2rem;
}

.menu-links h2 {
    color: #94a3b8;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.menu-links nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-links a {
    color: white;
    font-size: 1.1rem;
    padding: 1.25rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-links a i {
    font-size: 1.3rem;
    width: 30px;
    text-align: center;
    color: #16a34a;
}

.menu-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.menu-footer a {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.menu-footer a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.header-spacing {
    padding-top: 80px;
}

@media (max-width: 768px) {
    .header-spacing {
        padding-top: 70px;
    }
}

/* Enhanced Apple Intelligence-inspired glow animation for AI Search */
.menu-links a.ai-search-link {
    position: relative;
    overflow: hidden;
    background: rgba(100, 70, 255, 0.15);
    border: 1px solid rgba(120, 100, 255, 0.3);
    box-shadow: 0 0 15px rgba(123, 97, 255, 0.2);
}

.menu-links a.ai-search-link::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(90deg, 
        rgba(255, 64, 129, 0.7) 0%, 
        rgba(123, 97, 255, 0.7) 20%, 
        rgba(33, 150, 243, 0.7) 40%, 
        rgba(0, 188, 212, 0.7) 60%,
        rgba(76, 175, 80, 0.7) 80%, 
        rgba(255, 193, 7, 0.7) 100%);
    z-index: -1;
    border-radius: 18px;
    filter: blur(12px);
    opacity: 0.6;
    background-size: 300% 300%;
    animation: ai-gradient-move 8s linear infinite;
}

.menu-links a.ai-search-link:hover::before {
    opacity: 0.8;
    filter: blur(8px);
}

.menu-links a.ai-search-link i {
    background: linear-gradient(-45deg, #ff40a1, #7b61ff, #21c7f3);
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: ai-pulse 2s ease-in-out infinite, ai-color-shift 4s linear infinite;
}

@keyframes ai-gradient-move {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes ai-color-shift {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes ai-pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

/* Apply a subtle glow to the text as well */
.menu-links a.ai-search-link span {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 5px rgba(123, 97, 255, 0.5);
    font-weight: 500;
}