#rotateScreen{
    position: absolute;
    left:50%; 
    top:50%; 
    transform: translate(-50%, -50%);
    visibility:hidden;
}

.phone {
    height: 70px;
    width: 120px;
    border: 5px solid rgb(255, 255, 255);
    border-radius: 10px;
    animation: rotate 1.5s ease-in-out infinite alternate;
  }
  
  .message {
    color: rgb(255, 255, 255);
    font-size: 20px;
    font-weight: bold;
    margin-top: 40px;
  }
  
  @keyframes rotate {
    0% {
          transform: rotate(0deg)
      }
      50% {
          transform: rotate(-90deg)
      }
      100% {
          transform: rotate(-90deg)
      }
  }

  @media only screen and (orientation: portrait) {
    body *:not(div.phone):not(div.message){
        visibility: hidden;
    }
    body div#rotateScreen {
        visibility:visible;
    }
    
  }