#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(157, 78, 221, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

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

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

/* Mobile menu animation */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

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