* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}
html {
  background-color: #3e4250;
}
.app {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  width: auto;
}
.calculator {
  background-color: #236d80;
  width: 100%;
  max-width: 22.4375em;
  min-height: 40em;
  display: flex;
  flex-direction: column;
  border-radius: 1.5rem;
  overflow: hidden;
}
.display {
  min-height: 12.5em;
  padding: 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  color: #f1e9c3;
  text-align: right;
  flex: 1 1 0%;
}

.display .input {
  width: 100%;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.display .output {
  font-size: 3rem;
  font-weight: 600;
  width: 100%;
  white-space: nowrap;
}
.display .operator {
  color: #e17164;
}

.display .brackets,
.display .percent {
  color: #31c0cc;
}
.keys {
  background-color: #edbd79;
  padding: 1.5rem;
  border-radius: 1.5rem 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  grid-gap: 1rem;
  box-shadow: 0px -2px 16px rgba(0, 0, 0, 0.2);
}

.keys .key {
  position: relative;
  cursor: pointer;
  display: block;
  padding-top: 100%;
  height: 0;
  border-radius: 1rem;
  background-color: #eea357;
  transition: 0.2s;
  user-select: none;
}

.keys .key span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  font-size: 2rem;
  font-weight: 600;
  color: #f1e9c3;
}
.keys .key:hover {
  box-shadow: inset 0px 0px 8px rgb(255, 255, 255);
}

.keys .key.operator span {
  color: #e17164;
}
.keys .key.action span {
  color: #32abb6;
}
