Tilting Platform Question

Hey
I actually want to achieve something pretty easy. I want to tilt a platform based on the players input. like this:

so i tried to use the code you see in the next post and this kinda works like this:

the problem i have now is, that it is can be rotated too much (so it goes threw the shadow) and it somehow also rotates around the y axis, so that the platform doesn’t stay isometric to the camera.

can anybody help me out with that?
thanks!

2253148--150575--tiltquestion3.gif

here is the code by the way:

using UnityEngine;
using System.Collections;

public class TiltPlatform : MonoBehaviour {

    //Variables to store both axis
    float hAxis;
    float vAxis;

    void Update () {

       
        //Vertical and Horizontal axis from Input
        float h = Input.GetAxis("Horizontal");
        float v = Input.GetAxis("Vertical");
       
        //Add to each axis from key presses, using Clamp to keep the max/min set to 10/-10, so you don't over-rotate
        vAxis = Mathf.Clamp(vAxis+v,-10f,10f);
        hAxis = Mathf.Clamp(hAxis+h,-10f,10f);
       
        //Rotate to match the new axis using EulerAngles.
        transform.Rotate(new Vector3(hAxis,0f,vAxis), Space.Self);

   
    }
}