If you back up your Mozilla folder located in %appdata% you need not worry about losing anything. Everything, including your themes is stored in that folder. If you can manage to retain that, then just put it in %appdata% on your new install and it will be like nothing happened to your settings.
This works for a lot of other programs too, but not all.