* {
  margin: 0;
  padding: 0;
}
body {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background-color: rgb(255, 255, 255);
}
.calculator {
  box-sizing: border-box;
  border: rgb(0, 0, 0) 5px solid;
  box-shadow: 0px 0px 0px rgb(255, 255, 255);
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background-color: #9e9e9e;
  gap: 5px;
  min-width: max-content;
  margin-top: 15vh;
}
.first,
.second,
.third,
.fourth,
.fifth {
  display: flex;
  gap: 5px;
}
.first button,
.second button,
.third button,
.fourth button,
.fifth button,
.sixth button {
  flex: 1;
}
.sixth {
  display: flex;
  box-sizing: border-box;
  flex-direction: column;
  border: black 2px solid;
  border-radius: 8px;
  background-color: #f1f1f1;
  margin-bottom: 25px;
}
#equals {
  flex: 2.5;
  background-color: rgb(185, 224, 178);
}
#equals:hover {
  background-color: rgb(79, 168, 63);
}
.operator {
  background-color: #9aaff3;
}
.operator:hover {
  background-color: rgb(33, 128, 251);
}
#clear,
#delete {
  background-color: rgb(233, 160, 160);
}
#clear:hover,
#delete:hover {
  background-color: red;
}
#dot {
  background-color: rgb(221, 221, 143);
}
#dot:hover {
  background-color: rgb(187, 187, 44);
}
.history,
.output {
  box-sizing: border-box;
  align-self: flex-end;
  width: max-content;
  padding: 3px 5px;
  font-family: sans-serif;
}
.history {
  box-sizing: border-box;
  padding: 5px 5px;
  font-size: 30px;
  color: rgb(121, 121, 121);
  height: 40px;
  flex: 1;
  max-width: 100%;
  min-height: 50px;
}
.output {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  font-size: 42px;
  height: 60px;
  width: max-content;
  max-width: 98%;
  overflow: hidden;
}
button {
  width: 80px;
  box-sizing: border-box;
  padding: 12px;
  font-size: 35px;
  border: 2px black solid;
  border-radius: 8px;
  cursor: pointer;
  background-color: #f1f1f1;
}
button:hover {
  background-color: rgb(223, 223, 223);
}
.number:active,
.operator:active,
#dot:active,
#equals:active,
#clear:active,
#delete:active {
  font-size: 28px;
}
.credits {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
  font-family: sans-serif;
  padding: 5px 0px;
  color: rgba(0, 0, 0, 0.5);
}
a {
  text-decoration: underline;
  color: rgb(0, 0, 0, 0.5);
}
a:hover {
  color: black;
}
