nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    padding: var(--padding);
    justify-content: space-between;
    align-items: center;
    background:  linear-gradient(
        to bottom, 
        black 0%, 
        transparent 100%
    );
}
nav::before {
    content: "";
    position: absolute;
    inset: 0;
    bottom: -20px;
    z-index: -1;
    backdrop-filter: blur(12px);
    
    mask-image: linear-gradient(
        to bottom, 
        black 50%, 
        transparent 100%
    );
}

.nav-item {
    padding: 20px;
    color:  var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s;
}

.nav-item:hover {
    color: var(--accent);
    transform: translateY(-2px);
}


.user-menu-container {
    position: relative;
    display: inline-block;
    flex-direction: column;
    align-items: flex-end;
    transition: all 0.3s ease;
}

.user-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.user-menu-btn img {
    pointer-events: none;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: rgba(20, 15, 30, 0.5);
    backdrop-filter: blur(20px);
    min-width: 200px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.7); 
    z-index: 1000;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease, border 0.3s ease;
}

.dropdown-content.show {
    display: block !important;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.show {
    max-height: 300px; 
    opacity: 1;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    pointer-events: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.logout-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    color: var(--accent) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.logout-link:hover {
    background: rgba(255, 77, 109, 0.1) !important;
    text-shadow: 0 0 8px rgba(255, 77, 109, 0.5);
}

.logout-link:hover svg {
    transform: translateX(3px);
}

.admin-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    color: var(--primary) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.5s ease; 
}

.admin-link:hover {
    background: rgba(176, 155, 219, 0.1) !important; 
    color: white !important;
    text-shadow: 0 0 8px rgba(176, 155, 219, 0.6);
}
/*
.admin-link:hover svg {
    transform: rotate(90deg);
    color: #ffd700; 
}
*/

.menu-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    margin: 5px 0;
}
#barraRicerca {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 15px 20px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    /*width: 350px;*/
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    outline: none;
    flex-grow: 0.25;
}
#barraRicerca:focus {
    /*width: 450px;*/
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 100px rgba(232, 2, 125, 0.762);
    /*transform: translate(-10px, 0)*/
}