"Long time no see! How are you doing?"
I think there's a disparity for those using a Chinese keyboard, wherein you can type whatever characters you want. Without a Chinese keyboard enabled, you have to choose from a given set of characters on the screen. In this instance, 'ni hao ma' is not an option, but 'ni zemme yang' is an option. So, maybe the system is looking for that answer exclusively. I don't know why the answer would or wouldn't be an accepted translation, I just mean that's a possible identification of the problem.
Next time copy your sentence and paste it here, so we can take a look.
(If you put any spaces at all in [or between] your Chinese sentences your answer will be marked wrong, and if you use Western-encoded punctuation instead of Chinese punctuation it will also be marked wrong.)
Well, Duolingo won't accept any spaces at all.
Your issue is twofold.
One problem is that you used Western-encoded punctuation instead of Chinese-encoded punctuation, which Duolingo also doesn't accept. You'll probably have to change your keyboard settings (i.e. your IME settings).
The other problem is that you put a space after the exclamation mark.
If you change to Chinese-style punctuation, the correct spacing will already be part of the space taken by the punctuation marks.
The Chinese phrase presumably arose independently, and it doesn't break the normal rules of the language.
The origins of the English expression are a bit obscure. It may be a pidgin anglicization of the Mandarin expression or a similar expression in Cantonese, but it also may have been imitative of Native American pidgin English.
The English is so commonplace that seems normal nowadays, until you stop and notice how weird it is.
I don't think it's strictly necessary, but you can add whoever you're inquiring about (as well as other clarifying elements) in front, e.g. "你妈妈最近怎么样？", and on the other hand you can also use "怎么样" on its own to prompt a response to a suggestion you've made or to an option being presented.