.profile-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
    position: relative;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 142px;
    height: 42px;
    padding: 0 12px;
    background: rgba(59, 130, 246, 0.15); 
    border: 1px solid rgba(59, 130, 246, 0.3); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    animation: profileFadeIn 0.5s ease forwards;
}


#userProfile:hover, 
#userProfile.active,
.profile-card:hover, 
.profile-card.active {
    background: rgba(59, 130, 246, 0.2); 
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


.avatar-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transform: none !important;
    transition: none !important;
}

.nav-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.user-name {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.profile-card:hover .user-name,
.profile-card.active .user-name {
    color: #ffffff;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 210px;
    
    background: rgba(15, 23, 42, 0.45); 
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    
    z-index: 9999;
    padding: 8px;
    
    display: none; 
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-dropdown::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 25px;
    display: block;
    background: transparent;
}

.user-dropdown.dropdown-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dropdown-item.dashboard-link {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.07);
    margin-bottom: 4px;
}

.dropdown-item.dashboard-link:hover {
    background: rgba(59, 130, 246, 0.15);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 8px;
}

.dropdown-item.logout-link:hover {
    background: rgba(255, 70, 85, 0.1);
    color: #ff4655;
}

.login-button {
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0 20px;
    height: 42px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.login-button:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.hidden {
    display: none !important;
}

@keyframes profileFadeIn {
    from { 
        opacity: 0; 
        filter: blur(8px); 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        filter: blur(0); 
        transform: scale(1); 
    }
}

@media (max-width: 1350px) {
    .profile-card {
        width: auto;
        min-width: 42px;
        padding: 0 10px;
        gap: 8px;
    }

    .user-name {
        max-width: 80px;
        font-size: 0.8rem;
    }

    .login-button {
        padding: 0 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .profile-card {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .user-name {
        display: none;
    }

    .login-button span {
        display: none;
    }
    
    .login-button {
        width: 42px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .profile-card {
        width: 42px;
        padding: 0;
        justify-content: center;
    }
    .user-name {
        display: none;
    }
    .user-dropdown {
        width: 180px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .user-dropdown {
        width: 200px;
        right: -5px;
        position: fixed;
        top: 70px;
    }
    
    .profile-container {
        margin-left: 8px;
    }
}