We study the extrapolation of nuclear shell structure to the region of superheavy nuclei in self-consistent mean-field models—the Skyrme-Hartree-Fock approach and the relativistic mean-field model—using a large number of parametrizations which give similar results for stable nuclei but differ in detail. Results obtained with the folded-Yukawa potential which is widely used in macroscopic-macroscopic models are shown for comparison. We focus on differences in the isospin dependence of the spin-orbit interaction and the effective mass between the models and their influence on single-particle spectra. The predictive power of the mean-field models concerning single-particle spectra is discussed for the examples of 208Pb and the spin-orbit splittings of selected neutron and proton levels in 16O, 132Sn, and 208Pb. While all relativistic models give a reasonable description of spin-orbit splittings, all Skyrme interactions show a wrong trend with mass number. The spin-orbit splitting of heavy nuclei might be overestimated by 40%–80%, which exposes a fundamental deficiency of the current nonrelativistic models. In most cases the occurrence of spherical shell closures is found to be nucleon-number dependent. Spherical doubly magic superheavy nuclei are found at 184298114, 172292120, or 184310126 depending on the parametrization. The Z=114 proton shell closure, which is related to a large spin-orbit splitting of proton 2f states, is predicted only by forces which by far overestimate the proton spin-orbit splitting in 208Pb. The Z=120 and N=172 shell closures predicted by the relativistic models and some Skyrme interactions are found to be related to a central depression of the nuclear density distribution. This effect cannot appear in macroscopic-microscopic models or semiclassical approaches like the extended Thomas-Fermi-Strutinski integral approach which have a limited freedom for the density distribution only. In summary, our findings give a strong argument for 172292120 to be the next spherical doubly magic superheavy nucleus.