You can accomplish this using userContent.css stylings.
Dark mode for the pdf itself can be accomplished by following this blog guide.
Once set up, you can then paste additional stylings to get the background and sidebar whatever color you prefer. Here is my userContent.css.
The commented out lines towards the bottom are for the sidebar (I personally didn't change the sidebar).
Hope this helps.