Media Queries Aren't Working With Custom Code Element

Hi, I have multiple custom code elements on my site, and now I'm working on the responsiveness. The only problem is that when I try to use media queries in the custom code CSS, nothing's happening. Any idea how I can make it work?

Also, I've noticed when using custom code, things like font-size, color, and font-family work for a bit, and then revert back to the default text style.