@import url("https://fonts.googleapis.com/css2?family=Play:wght@300;400;500;600;700&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  outline: 0;
  transition: all 0.5s ease;
  font-family: "Play", sans-serif;
}

body {
  font-family: sans-serif;
  background: rgb(255, 0, 84);
  background: radial-gradient(circle,
      rgba(255, 0, 84) 0%,
      rgb(57, 0, 153) 100%);
}

a {
  text-decoration: none;
  color: #fff;
}

.container {
  height: 100vh;
  width: 100vw;
  display: grid;
  place-items: center;
}

.calculator {
  position: relative;
  height: auto;
  width: auto;
  padding: 20px;
  border-radius: 10px;
  background-color: #ffeedd;
  box-shadow: 0 0 30px #FEA802;
}

.theme-toggler {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #fff;
  cursor: pointer;
  z-index: 1;
}

.theme-toggler.active {
  color: #333;
}

.theme-toggler.active::before {
  background-color: #fff;
}

.theme-toggler::before {
  content: "";
  height: 30px;
  width: 30px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: #333;
  z-index: -1;
}

#display {
  margin: 0 10px;
  height: 150px;
  width: auto;
  max-width: 270px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: 30px;
  margin-bottom: 20px;
  overflow-x: scroll;
}

#display::-webkit-scrollbar {
  display: block;
  height: 3px;
}

button {
  height: 60px;
  width: 60px;
  border: 0;
  border-radius: 30px;
  margin: 5px;
  font-size: 20px;
  cursor: pointer;
  transition: all 200ms ease;
}

button:hover {
  transform: scale(1.1);
}

/* light theme */
.calculator #display {
  color: #0a1e23;
}

.calculator button#clear {
  background-color: #db7f8e;
  color: #ffdbda;
}

.calculator button.btn-number {
  background-color: #339989;
  color: #7de2d1;
}

.calculator button.btn-operator {
  background-color: #b6a6ca;
  color: #f1e4f3;
}

.calculator button.btn-equal {
  background-color: #19647e;
  color: #eee5e5;
}

/* dark theme */
.calculator.dark {
  background-color: #071115;
}

.calculator.dark #display {
  color: #f8fafd;
}

.calculator.dark button#clear {
  background-color: #785964;
  color: #d5c7bc;
}

.calculator.dark button.btn-number {
  background-color: #3a606e;
  color: #f8fafb;
}

.calculator.dark button.btn-operator {
  background-color: #afbfc0;
  color: #4e8098;
}

.calculator.dark button.btn-equal {
  background-color: #566246;
}