Every story has a plot. Boy meets girl, boy loses girl, boy gets girl. Hero saves the world from multi-flippered aliens. Murder committed, murder solved. One thing every plot has in common is it has to make sense. Logic is key.
Of course, you can have colourful characters gamboling about. Of course you can have unusual situations (Why is Auntie Marge up in the tree? Again?) You can have talking animals. Every writer creates their own world, but that world has rules. It can't be anything goes.
One of the issues any mystery writer must tussle with is "How hard am I going to make this?" Is this mystery long on humour but short on plot? Many mysteries are so populated with quirky characters that it's easy for the actual mystery to be fairly light. Yes, Cyril got killed, but he was a nasty old thing. No one liked him. He was mean to Little Johnny and he kicked his cat. Sure, let's solve the mystery, but in the meantime, would you like some pie?
Then there are the mysteries with multiple sub-plots and myriads of suspects. Larger issues are examined. World events can come into play. Both characters and plots are far more complex. Was the victim killed because of his personal life (he'd just left his wife, who is far from pleased), professional life (he was a major player in industry and had political ambitions), or is it something else entirely? Not much pie in these books.
The answer to "How hard am I going to make this?" depends on the writer. But it must make sense. There must be clues, be they physical or not. When the solution is revealed, it has to make sense and any reader could go back through the story picking up each of the threads that lead to the conclusion.
Personally, I can't stand reading mysteries and having all vital information revealed by the oh-so-clever sleuth in the final moments. Give me a chance to figure it out. Don't make it so easy that I figured it out before I hit the halfway mark, but let me see the logic of the solution. I don't mind feeling stupid, but I do mind not being allowed to play.
Remember your rules of play. There are absolutes, no matter what type of fantastic world you're living in. Have fun? Absolutely. But remember that reader. You don't want them scratching their heads at the ending. That's just not fair.