* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

input,
textarea,
button {
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  outline: none;
  appearance: none;
  text-align: left;
}

input:hover,
input:active,
input:focus,
textarea:hover,
textarea:active,
textarea:focus,
button:hover,
button:active,
button:focus {
  outline: none;
}

:root {
  font-family: Helvetica, Arial, sans-serif;
}

html {
  font-size: 175%;
  font-weight: 300;
  line-height: 1.3;
}

body {
  align-items: center;
  background-color: #a9def9;
  display: flex;
  height: 100vh;
  justify-content: center;
}

h1 {
  font-family: "Bungee", cursive;
  font-size: 150%;
  color: white;
  text-shadow: 2px 2px 8px #ff99c8;
}

.container {
  max-width: 20em;
}

.calculator {
  border-radius: 12px;
  box-shadow: 0 0 40px 0px rgba(0, 0, 0, 0.15);
  margin-left: auto;
  margin-right: auto;
  margin-top: 2em;
  max-width: 15em;
  overflow: hidden;
  padding: 32px;
  background-color: #e4c1f9;
  display: flex;
  flex-direction: column;
}

.calculator__display {
  background-color: #222222;
  color: #fff;
  font-size: 1.714285714em;
  padding: 0.5em 0.75em;
  text-align: right;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: "VT323", monospace;
}

.calculator__keys {
  background-color: #fec8c3;
  display: grid;
  grid-gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 8px;
  padding: 8px;
  flex: 1;
}

.calculator__keys > * {
  background-color: #fcf6bd;
  padding: 0.5em 1.25em;
  position: relative;
  text-align: center;
  padding: 8px;
}

.calculator__keys > *:active::before,
.calculator__keys > .is-depressed::before {
  background-color: rgba(0, 0, 0, 0.2);
  bottom: 0;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.5) inset;
  content: "";
  left: 0;
  opacity: 0.3;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
  border-radius: 8px;
}

.key--operator {
  background-color: #d0f4de;
}

.key--equal {
  background-color: #ff99c8;
  grid-column: -2;
  grid-row: 2 / span 4;
}
