*{
  font-size: 24px;
  font-family: "Rubik";
  font-weight: 350;
}
body{
  display:flex;
  justify-content: center;
  align-items: center;
}

.calculator{
  display:flex;
  flex-direction: column;
  width: 160px;
  border-radius: 12px;
  border: 1px solid grey;
  padding: 20px;
  background-color: whitesmoke;
  margin: 5vh auto;
  box-shadow: -4px 4px 5px lightgray;
}


#display{
  display: flex;
  justify-content: end;
  align-items: center;
  min-height:40px;
  border: none;
  padding: 0 6px 0 6px;
  background-color: lightgray;
  border-radius: 8px;
  overflow: hidden;

}

.left{  /*the left hand side of the button display, comprising clear, backspace and numbers*/
  display: flex;
  flex-wrap: wrap;
}

button{
  min-width: 35px;
  margin: 2px;
  border: none;
  border-radius: 30px;
  aspect-ratio: 1;
  background-color: rgb(224, 223, 223);

}

.buttons{    
  display:flex;
  justify-content: center;
  padding: 10px 0;
}

.numbers{
  display:flex;
  flex-wrap: wrap;
  flex: none;
  width: 117px;
  margin:0;
}

.numbers button:hover{
  background-color:lightgrey;
}

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

.operators button{
  background-color: rgb(255, 223, 40);
}

.operators button:hover{
  background-color:rgb(227, 198, 36);
}

#clear{
  width: 74px;
  aspect-ratio:unset;
  margin-left: 2px;
  background-color: rgb(255, 84, 84);
}

#erase {
  font-size: 18px;
  padding: 0 6px 1px 5px;  /*custom padding due to unicode character being strangely aligned as default*/
  background-color: rgb(255, 84, 84);
}

#erase:hover, #clear:hover{
  background-color:rgb(203, 67, 67);
}