The molecular basis of spectral tuning in blue- and red-shifted flavin-binding fluorescent proteins