html {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ad5389; /* fallback for old browsers */
  background: -webkit-linear-gradient(
    to right,
    #3c1053,
    #ad5389
  ); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(
    to right,
    #3c1053,
    #ad5389
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

.calculator {
  background: white;
  width: 400px;
  border-radius: 12px;
  box-shadow: 0 5px 30px -5px rgba(0, 0, 0, 0.6);
}

.calculator-display {
  background: black;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 10px 10px 0 0;
}

.calculator-display h1 {
  margin: 0;
  padding: 25px;
  font-size: 45px;
  font-family: 'Lucida Console', sans-serif;
  font-weight: 100;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Custom Scrollbar */
/* width */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px #1f1f1f;
  border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

button {
  min-height: 50px;
  font-size: 20px;
  font-weight: 100;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: rgb(199, 199, 199);
}

button:hover {
  filter: brightness(110%);
}

button:active {
  transform: translateY(1px);
}

button:focus {
  outline: none;
}

/* Buttons */
.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
}

.operator {
  background-color: gray;
  color: white;
  font-size: 30px;
}

.clear {
  background: rgb(255, 40, 40);
  color: white;
}

.clear:hover {
  filter: brightness(90%);
}

.equal-sign {
  grid-column: -2;
  grid-row: 2 / span 4;
  background: rgb(13, 206, 87);
}

/* Media Query: Large Smartphone (Vertical) */

@media screen and (max-width: 600px) {
  .calculator {
    width: 95%;
  }
}
