problem rotating an object c sharp

hello everyone, i am having truble getting an object to rotate in the x axis, it starts to rotate but as soon as it reaches a 90 or -90 (if it goes the other way) it stops, i have checked the inputs, the colliders, ect, and nothing seems to be the cause(well obviouly since im asking you guys). and the y and z axes work perfectly fine

here is the script so pls tell me if you have any idea of what could cause it.

using UnityEngine;
using System.Collections;

public class Spaceship_Control : MonoBehaviour {

	public float speed = 0f; 
	public float acceleration = 0.1f;
	
	public Vector3 rotationRatio;
		
	void Update () {
	
		rotationRatio = new Vector3 (Input.GetAxis("Pitch"), Input.GetAxis("Yaw"), Input.GetAxis("Roll"));
		
		transform.eulerAngles += rotationRatio;
		
		speed = Input.GetAxis("Thrust") * acceleration;
		//rigidbody.velocity = new Vector3(0, 0, speed);
		
		speed = Mathf.Clamp(speed, 1, 100);
	}
}

As the doc for Transform.eulerAngles states:

Only use this variable to read and set the angles to absolute values. Don’t increment them, as it will fail when the angle exceeds 360 degrees. Use Transform.Rotate instead.

So instead of incrementing the eulerAngles directly, try using Transform.Rotate:

transform.Rotate(rotationRatio);

The problem you end up suffering from by working directly with euler angles (avoided by working with Quaternions) is known as Gimbal Lock