Drain flies and midges also look very similar to gnats. No real point there I guess, just giving some examples of other insects that would probably be called "gnats" by most. An airtight seal should really help, or at least something close to it. They don't need nearly as much oxygen as a vertebrate. Just opening the lid every once in a while to feed or observe is all the air exchange they'll need.