@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap');

body {
  font-family: 'Quicksand', sans-serif;
  background-color: whitesmoke;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}


.calculator {
  background-color: #58b5c2;
  padding: 30px;
  border-radius: 40px;
  box-shadow: 20px 20px 60px #a0d6db,
             -20px -20px 60px #d4cfcf;
  width: 100%;
  max-width: 380px;
}


.display input {
  width: 100%;
  height: 90px;
  font-family: 'Quicksand', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: right;
  padding: 20px;
  border: none;
  border-radius: 20px;
  margin-bottom: 30px;
  background-color: #dbdbdb;
  color: #5d5a52;
  box-shadow: inset 8px 8px 16px #bab7af,
              inset -8px -8px 16px #ede8e8;
  box-sizing: border-box;
  outline: none;
}


.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.button {
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  background: #e7e4ddee;
  color: #57544d;
  transition: all 0.2s ease-in-out;
  box-shadow: 6px 6px 12px #adaaa1,
             -6px -6px 12px #d5d1d1;
  display: flex;
  justify-content: center;
  align-items: center;
}


.button:active {
  box-shadow: inset 4px 4px 8px #d1cdc2,
              inset -4px -4px 8px #ffffff;
  transform: scale(0.96);
}


.button.memory {
  background-color: #e6aaffe6;
  color: #9816cf;
  font-size: 1.5rem;
}


.button.operator {
  background-color: #e9c1b2e6;
  color: #be3b08;
  font-size: 2rem;
}

.button.clear {
  background-color: #f49489e0;
  color: #ff1900;
  font-size: 1.5rem;
}


.button.equals {
  font-size: 1.5rem;
  background-color: #09a691e5;
  color: #ffffff;
  box-shadow: 4px 4px 12px rgba(0, 191, 166, 0.77),
              -4px -4px 12px #bcbaba;
}

.button.equals:active {
  background-color: #009e8f;
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.2);
}


@media (min-width: 600px) {
  .calculator {
    max-width: 420px;
    padding: 40px;
  }
  .keys {
    gap: 22px;
  }
}

@media (max-width: 400px) {
  .calculator {
    padding: 20px;
    border-radius: 30px;
  }
  .keys {
    gap: 12px;
  }
  .display input {
    height: 70px;
    font-size: 2rem;
    margin-bottom: 20px;
  }
  .button {
    border-radius: 15px;
  }
}