*, *:before, *:after
{
    box-sizing: border-box;
}

input{
  border:none;
  height: 30px;
  margin-bottom: 15px;
  width: 100%;
}

input[type="submit"] {
  background: #8181ca;
}

body{
  background: pink;

}

.form-div
{
  position:relative;
  top: 200px;
  left: -250px;
  width: 250px;
  height: 250px;
  transition: transform ease-in-out 2s;
    perspective: 500px;
}


.form-div.show
{
  transform: translateX(calc(50vw + 125px));
}

.pelota {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  
  width: 100%;
  height: 100%;
  
  border-radius: 50%;
  cursor: pointer;
  backface-visibility: hidden;
  padding:25px;
  
  
}

.front
{
  background-color: red;
  animation-fill-mode: forwards !important; 
}
.front.show
{
  animation: peque-front 4s;
}
.back
{
  
  background-color: yellow;
  transform: rotateY(180deg);
  animation-fill-mode: forwards !important;
}

.back.show {
  animation: peque-back 4s;
}

.logged-in{
  transform: translateX(calc(50vw + 125px)) translateY(calc(100vh + 250px)) !important;
}

@keyframes peque-front { 
  50%{
    transform: rotate(360deg);
    border-radius: 50%;
  }
  75%{
    transform: rotate(360deg);
    border-radius: 0;
  }
  100% {
    transform: rotateY(180deg);
     border-radius: 0;
  }
}

@keyframes peque-back { 
  50%{
    transform: rotateY(180deg);
    border-radius: 50%; 
  }
  75% {
    transform: rotateY(180deg);
    border-radius: 0;
  }
  100% {
    transform: rotateY(0deg);
    border-radius: 0;
  }
}