body
{
  margin: 0;
  padding: 0;
  background-color: #F0F8FF;
}
.box
{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 400px;
  background: #fff;
  padding: 40px;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,.0);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
}
.box h2
{
  margin: 0 0 30px;
  padding: 0;
  color: #283C8F;
  text-transform: uppercase;
  text-align: center;
}
.box img
{
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}
.box input
{
  padding: 10px 0;
  margin-bottom: 30px;
}
.box textarea
{
  height: 80px;
  padding: 10px 0;
  margin-bottom: 40px;
}
.box input,
.box textarea
{
  width: 100%;
  box-sizing: border-box;
  box-shadow: none;
  outline: none;
  border: none;
  border-bottom: 2px solid #A6A8AB;
}
.box textarea
{
  margin-bottom: 20px;
}
.box input[type="text"],
.box input[type="password"]
{
  color: #283C8F;
}
.box input[type="submit"]
{
  border-bottom: none;
  cursor: pointer;
  background: #283C8F;
  color: #fff;
  margin-bottom: 0;
  text-transform: uppercase;
  height: 50px;
  font-size: 18px;
}
.box div
{
  position: relative;
}
.box form div label
{
  position: absolute;
  top: 10px;
  left: 0;
  color: #A6A8AB;
  transition: .5s;
  pointer-events: none;
}
.box input:focus ~ label,
.box textarea:focus  ~ label,
.box input:valid ~ label,
.box textarea:valid  ~ label
{
  top: -12px;
  left: 0;
  color: #A6A8AB;
  font-size: 12px;
  font-weight: bold;
}
.box input:focus,
.box textarea:focus,
.box input:valid,
.box textarea:valid
{
  border-bottom: 2px solid #283C8F;
}

@media screen and (max-width:800px) {
  .box {
    width:100%; /* The width is 100%, when the viewport is 800px or smaller */
  }
}