“You genius” sounds like a compliment to me. A “funny” compliment. Would it be taken as sarcasm in the US? It really depends the tone I guess but in Australian english I wouldnt interpret it as sarcasm.
I think you could use fucking in either of those contexts, and one would still be positive and one negative. The tone fo the first would be joyful, the tone of the second would be sarcastic.
I think that changing it to something gramatically correct would make it into a compliment. "You are a genius" would make it positively charged. However, I would expect "you genius" to be something that, for instance, someone would exclaim when someone cuts their hand when trying to open an avocado. Meanwhile I think it would be strange to exclaim "you genius" when someone solves a partial differential equation. But it probably does rely on the tone.
“you genius” is what a lad would say when you’ve found a solution to a stupid problem you got yourselves into while drunk or something. A geniune compliment, but with some humour added in.