I'm trying to make a first person camera for my game but..

I’ve made a first person view for it and the camera rotates and everything there’s just one problem, if i move it enough the camera rotates A little bit of of sink and its really annoying

Note:It starts out straight. Here’s my code

using UnityEngine;
using System.Collections;

public class CameraAngleF : MonoBehaviour {

	public float mx = 0;
	
	// Update is called once per frame
	void Update () {
		float cx = mx * Input.GetAxis ("Mouse X");
		float cy = mx * Input.GetAxis ("Mouse Y");

		if (Input.GetKey (KeyCode.Mouse1)) {
			transform.Rotate (0.0f, cx, 0.0f);
			transform.Rotate (cy, 0.0f, 0.0f);
		}
      
	}
}

i want it so the it go’s straight like this :
not diagonal.
90795-ex.png

Simply set the z coordinate of your transform.eulerAngles to 0.