Is there a way to cleanly cut styrofoam?
Is there a trick or special tool to make clean cuts without making a mess of little styrofoam bits everywhere?

Yes, it's called &quot;hot-wire (foam) cutter&quot; which can be bought starting at prices of about $20, or you can also make one yourself.

The hot wire melts the styrofoam, releasing toxic fumes (styrene), so it's best to use it in a well-aerated room or outside. (See e.g. this link for more safety advice.)
It will work on styrofoam, but probably not very well on soft foams.