*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Orbitron', sans-serif;
  font-weight: normal;
}

body {
  padding: 0;
  margin: 0;
}

.calc-container {
  display: grid;
  justify-content: center;
  align-content: center;
  grid-template-columns: repeat(4, 70px);
  grid-template-rows: minmax(100px, auto) repeat(5, 60px);
  background-color: rgba(0, 0, 0, 0.69);
  gap: 10px;
  max-width: 360px;
  padding: 30px 0;
  margin: 36px auto;
  border-radius: 8px;
}

.output {
  grid-column-start: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-around;
  grid-column-end: -1;
  box-shadow: inset 0.17em 0.17em;
  background-color: rgba(0, 0, 0, 0.24);
  opacity: 0.5;
  padding: 10px;
  word-break: break-all;
  word-wrap: break-word;
}

.output .prev-output {
  font-size: 1.5rem;
  color: white;
  font-weight: bold;
}

.output .cur-output {
  font-size: 1.95rem;
  color: whitesmoke;
  font-weight: bold;
}

.calc-container > button {
  box-shadow: inset 0 0.17em 0.17em 0;
  cursor: pointer;
  opacity: 0.65;
  font-size: 1.5rem;
  outline: none;
  border: 1px solid whitesmoke;
  border-radius: 8px;
  background: white;
}

.calc-container > button:hover {
  opacity: 0.4;
}

.span-two {
  grid-column: span 2;
}

.span-t-b {
  grid-column-start: 4;
  grid-row-start: 5;
  grid-row-end: 7;
}

@media screen and (max-width: 768px) {
  .calc-container {
    grid-template-columns: repeat(4, 50px);
    grid-template-rows: minmax(100px, auto) repeat(5, 40px);
    background-color: rgba(0, 0, 0, 0.69);
    gap: 8px;
    width: 15.75rem;
  }

  .output {
    width: 100%;
    margin: 0 auto;
  }

  .output .prev-output {
    font-size: 1.125rem;
  }

  .output .cur-output {
    font-size: 1.375rem;
  }

  .calc-container > button {
    font-size: 1rem;
  }
}
