*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: floralwhite;
  font-size: 16px;
}

h1{
  color: red;
}

.welcome{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  margin-top: 50%;
  visibility: visible;
  position: fixed;
}

p{
  margin: 5px auto 20px;
}

.welcome button{
  height: 40px;
  width: 80%;
  margin: 10px;
  color: floralwhite;
  font-size: 1.5rem;
  background: green;
}

.welcome button + p{
  margin-top: 50%;
}

.welcome input{
  height: 40px;
  width: 80%;
  text-align: center;
  font-size: 1.3rem;
}


.space{
  height: 250px;
}


.game{
  width: 100%;
  height: 100%;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  
}

.parea{
  display: flex;
  flex-direction: column;
}

.game > *{
  text-align: center;
}

.play{
  display: flex;
  justify-content: space-evenly;
}

.game button{
  height: 40px;
  width: 130px;
  color: white;
  font-size: 1.3rem;
}

.newgame, .back{
  color: black !important;
  margin: 0 10px;
}

.scoreboard{
  font-size: 1.5rem;
  font-weight: 500;
}


/*Dice*/
.dice{
  width: 100px;
  height: 100px;
  background: red;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: floralwhite;
  font-size: 3rem;
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%,-50%);
  transition: 0.2s;
}

.shake{
  animation: shake 0.5s ease-in 4;
}

@keyframes shake{
  0{
    transform: rotateZ(0);
  }
  20%{
    transform: rotateZ(45deg);
  }
  40%{
    transform: rotateZ(-90deg);
  }
  60%{
    transform: rotateZ(90deg);
  }
  80%{
    transform: rotateZ(-90deg);
  }
  100%{
    transform: rotateZ(45deg);
  }

}

img{
  width: 100px;
  text-align: center;
}

.message{
  margin: 20px 0;
  
}

.tScore{
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  position: absolute;
  top: 40%;
  left: 10%;
  width: 80%;
  
}

.tsm{
  width: 80%;
  border: 1px solid red;
  border-radius: 5px;

}

.tScore1,.tScore2{
  border: 1px solid red;
  padding: 5px;
  border-radius: 5px;
}