It's funny because literal translation would mean something similar in English. However in Hebrew we only use Mazal Tov to congratulate someone (for example for wedding or birthday) and בהצלחה to wish good luck with something.
It is a literal translation, but you really can't use it to wish someone good luck.
One of the hovered options for "good luck" is "מזל טובה" yet it's considered wrong according to this site. it should either be accepted as a valid answer or removed all together as an option.