maximum rotation problem

Im trying to make a camera following the player and rotating alongside with him. But then my camera reaches the 90deg(top) it changes to upside down. I twant to make it like a freely sandbox flying in the space.
Video shows the problem

	void Start () {	
		public Camera camera;
		void Update(){
			transform.Rotate(Vector3.up, CrossPlatformInputManager.GetAxis("Horizontal") *1 * 1.5F);
			transform.Rotate(Vector3.left, CrossPlatformInputManager.GetAxis("Vertical")*1 * 1.5F);


Not sure, but I think if you pass a second argument to camera.transform.LookAt() it will fix the issue. Try pass the camera itself up direction. Something like this:

camera.transform.LookAt(transform, camera.transform.up);