Thickness-dependent phase transition and optical behavior of MoS2 films under high pressure