On the largest scales, our Universe features filamentary structures known as the cosmic web. They formed under the highly nonlinear gravitational collapse, from simple initial conditions. Physics encoded in the initial conditions and the growth history can be inferred from data observed by ground- and space-based telescopes. Structure formation models are needed for such analyses, for which expensive numerical simulations are usually performed. We developed neural network surrogate models that are both fast and accurate. We introduced global dependence in the network on cosmological parameters, as continuous styles. Furthermore, we built GAN-based networks that can enhance the mass resolutions of simulations by a factor of 512. Our models generalize surprisingly well in many cases. With further development, they have the potential to maximize the scientific return from the current and future cosmological observations.