Optical diffraction in twisted liquid-crystalline media-phase grating mode