Lei means "you" only when used as a formal address or pronoun. This is because "eccellenza" as in, "her excellency," is feminine. It's polite to use Lei whenever you speak with someone you don't know, especially if they are older than you. It doesn't matter if they are a male or a female (or whatever!).