This actually really confused me at first, but seeing as how in other english speaking countries, "how are you going" is a way to ask how are you, it makes sense. I live in America, and the closest to that which we say is "How's it going?". More often though, "How are you doing?".
Could you please check if "tu" versions below are correct for "você" equivalents for "How are you doing" / "How are you" :
Como você vai? - Como tu vais? (or Como vais?)
Como você está? - Como estás?
Como vai você? - Como vais tu? (Or como vais?)
Como você tem passado? - Como tu tens passado? (or Como tens passado?)
Como você anda? - Como tu andas? (or Como andas?)
Most of Brazil is close to the equator. So the sun sets about the same time every day. When we lived in Porto Velho, 8 degrees off the equator, the sun always set around 6:30 year-round. We could tell time by the sun, especially tarde/noite. In North American and Great Britain, days are longer in the summer and shorter in the winter, so we go by the clock rather than the sun to decide when to say Good afternoon/evening.
In Portugal it is a bit different. Several agree that it is, "Boa Tarde" until you have had dinner which is often served at 8pm (20h00) or even later, no matter how light or dark it is (in the winter as early as 5pm and as late as 10pm in summer).
Of course in the US there is actually a separation in, "Good Evening" and "Good Night" with evening being between 6pm-ish and 10-ish but the first is more of a greeting while the latter is a valediction when leaving.
Meanwhile, "Bom Dia" (Good Day) in Portugal is for mornings and not after lunch, which those in the US might say all day (though again when leaving – Paul Harvey made this really popular) with, "Good Morning" being the early greeting.
The main thing is that the world does not end if we use the greetings outside their prescribe times. Most listeners get it, and understand about learning curves (often being flattered you are trying).