Critical fluctuations of a type-II superconductor in a magnetic field