html {
  /* For mobile browsers search bar*/
  height: 100%;
}

body {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  font-family: sans-serif;

  background-color: hsl(335, 50%, 38%);
}

#calculator {
  width: 335px;
  height: 480px;

  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  padding: 16px;
  padding-bottom: 0px;

  background-color: hsl(335, 50%, 50%);

  border-bottom: 10px solid white;
  border-radius: 0 0 10px 10px;
}

.screen {
  overflow: hidden;
  background-color: white;
  min-width: 100%;
  line-height: 26px;
  min-height: 26px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 7px;
  box-sizing: border-box;
}

#helper {
  border-radius: 10px 10px 0 0;
  margin-bottom: 7px;
  color: black;
}

#display {
  border-radius: 0 0 10px 10px;
  margin-bottom: 16px;
  text-align: end;
}

#keys {
  flex: 1;

  display: grid;
  grid-template-columns: repeat(4, auto);
  grid-template-rows: repeat(4, auto) 26px;
  grid-gap: 7px;
  place-items: center;

  padding: 7px;

  background-color: hsl(335, 50%, 63%);

  border-radius: 10px 10px 0 0;
}

.key:nth-of-type(1) {
  border-radius: 10px 0 0 0;
}

button:nth-of-type(4) {
  border-radius: 0 10px 0 0;
}

#del {
  border-radius: 0 0 10px 10px;
}

button {
  border: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}

#del {
  grid-column-start: 1;
  grid-column-end: 5;
  line-height: 26px;
}

#keys button {
  border: 0;
  width: 100%;
  height: 100%;
  background-color: hsl(335, 74%, 94%);
}

#keys:hover,
#keys button:hover,
#clear:hover {
  cursor: pointer;
}

#keys button:hover {
  color: hsl(335, 50%, 38%);
  background-color: white;
}

#clear {
  align-self: center;
  margin: 7px 0px;
}
