Leftist Rousseff narrowly wins second term in Brazil