Then I guess 'noc' is feminine, right?
So why is 'good night' translated as 'dobrou noc' instead of 'dobrá noc'?
Yes, noc is feminine.
I usually explain it like this: dobrou noc uses accusative dobrou because it's a shortening of Přeji ti/vám dobrou noc. 'I wish you (sg/sg formal+plural) a good night.' You use accusative for the object of a verb.
Great, now it does make sense to me!
what does sg stand for please? Im new here and trying to understand it all
What does accusative mean? And what is object of an accusative?
The grammatical case used for direct objects. I suggest waiting for a few lessons, it will come soon. Or you can look into https://en.wikipedia.org/wiki/Grammatical_case
Zlá noc? Why not?
"zlá" as "bad" is Slovak, not Czech