div#calculator {
  max-width: 600px;
  width: 600px;
  margin: auto;
  border: 0.25rem solid #082f44;
  padding: 1rem;
  background: #554640;
  box-sizing: border-box; /* Account for padding and border in width */
}

div#BUTTONS {
  display: grid;
  grid: repeat(5, 1fr) / repeat(4, 1fr);
  font-size: 3rem;
  gap: 1rem;
  max-width: 600px;
  border: 2px solid #1481BA;
  background: #082f44;
  padding: 1rem;
}

.button {
  min-width: 100%;
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  padding: 0;
  border: 0.5rem solid #a9d1e5;
  max-width: 6rem;
  max-height: 6rem;
  border-radius: 10px;
  box-shadow: 3px 3px #1481ba;
  background: #a9d1e5;
  line-height: 0;
  padding-top: 30%;
  padding-bottom: 30%;
  font-family: "FantasqueSansMonoRegular";
  transition-delay: 0.01s;
}
.button:active {
  border: 0.5rem solid #1481ba;
  background: #1481ba;
  box-shadow: 1px 1px #082f44;
  transform: translateY(2px) translateX(2px) scale(0.99);
  transition: box-shadow 0.5s, transform 0.5s;
  transition-timing-function: cubic-bezier(0.25, 1.41, 0.03, 0.84);
}

#PREV {
  font-size: 1.5rem;
  float: right;
  font-family: "FantasqueSansMonoRegular";
  text-align: right;
  color: #a9d1e5;
}

.CLIP {
  overflow: hidden;
  font-family: "FantasqueSansMonoRegular";
  text-align: right;
  font-color: Black;
  border: 0.25rem solid #1481ba;
  background: #a9d1e5;
  margin: 0.5rem 0rem;
  height: 4rem;
  font-size: 1rem;
}

.ANS {
  border: none;
  background: #554640;
}

#INPUT {
  font-size: 4rem;
  float: right;
}

/* For Phone CSS */
@media screen and (max-width: 600px) {
    body {
        margin: 0;
        padding: 0;
    }
    div#calculator {
        width: 100vw;
        margin: 0;
    }
    .button {
        font-size: 10vw;
        max-width: 25%;
        max-height: 25%;
    }
}
