Sensex closes 365 points down on weak rupee, global cues