:root {
  --primary-color: #ff9500;
  --secondary--color: #ffc16b;
  --tertiary--color: #6e6e6e1a;
  --bg-body: #efe8de;
  --border-color: #9794941c;
  --bg-calculator: rgb(255 255 255 / 40%);
  --display-text-color: #424242;
  --keyboard-text-color: #757575;
  --keyboard-bg-color: #fafafa69;
  --boxshadow-color: #e76f5147;
  --icon-color: #292929;
}

[data-theme='dark'] {
  --primary-color: #fb8500;
  --secondary--color: #faab52;
  --tertiary--color: #bbbbbb73;
  --bg-body: #292a2c;
  --border-color: #fafafa0f;
  --bg-calculator: #1c1c1cb0;
  --keyboard-text-color: #fafafa;
  --keyboard-bg-color: #fafafa14;
  --display-text-color: #e9e9e9;
  --boxshadow-color: #ffffff47;
  --icon-color: #fff;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  font-family: cursive;
  background-color: var(--bg-body);
  transition: 0.3s;
}

.container {
  height: 100%;
  width: fit-content;
  display: grid;
  place-items: center;
}

.wrapper {
  position: relative;
}

.calculator {
  border-radius: 16px;
  padding: 30px;
  background-color: var(--bg-calculator);
  border: 2px solid var(--border-color);
  backdrop-filter: blur(15px);
}

.shape {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  box-shadow:
    #ff6f006e 0px 4px 16px,
    rgba(255, 193, 7, 0.198) 0px 8px 32px;
}

.shape-one,
.shape-two {
  width: 180px;
  height: 180px;
}

.shape-one {
  top: -45px;
  left: -112px;
  background: linear-gradient(320deg, var(--secondary--color), var(--primary-color));
}

.shape-two {
  bottom: -45px;
  right: -112px;
  background: linear-gradient(225deg, var(--secondary--color), var(--primary-color));
}

.shape-three {
  width: 380px;
  height: 380px;
  top: -34px;
  left: 108px;
  background: radial-gradient(var(--secondary--color), var(--primary-color));
}

.expression-display,
.display {
  text-align: right;
  color: var(--display-text-color);
}

.expression-display {
  opacity: 0.6;
  font-size: 20px;
  padding: 10px 0 0 0;
  height: 50px;
}

.display {
  font-size: 48px;
  padding: 0 0 40px 0;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  gap: 1rem;
}

button {
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.buttons button {
  background-color: var(--keyboard-bg-color);
  backdrop-filter: blur(15px);
  box-shadow: #63636333 0px 2px 8px 0px;
  color: var(--keyboard-text-color);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  font-size: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* font-weight: 500; */
}

button[data-value='0'] {
  grid-column: 1 / 3;
  width: 100%;
  border-radius: 40px;
}

button[data-type='operator'],
button[data-type='equal'] {
  background-color: var(--primary-color);
  color: #fafafa;
  font-size: 32px;
}

button[data-type='clear'],
button[data-type='backspace'],
button[data-type='percent'] {
  background-color: var(--tertiary--color);
}

.backspace-icon {
  font-size: 24px;
}

.theme-switcher {
  border-radius: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  backdrop-filter: blur(15px);
  box-shadow: #63636333 0px 2px 8px 0px;
}

.theme-btn {
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  transition: 0.3s;
  color: var(--icon-color);
}

.fa-moon {
  transform: rotate(340deg);
}

.theme-btn.active {
  background-color: var(--primary-color);
}

@media screen and (max-width: 768px) {
  .shape-one,
  .shape-two {
    width: 150px;
    height: 150px;
  }

  .shape-one {
    top: -40px;
    left: -86px;
  }

  .shape-two {
    bottom: -40px;
    right: -86px;
  }

  .shape-three {
    width: 330px;
    height: 330px;
    top: -48px;
    left: 126px;
  }
}

@media screen and (max-width: 575px) {
  .shape {
    display: none;
  }
}

@media screen and (max-width: 448px) {
  .calculator {
    padding: 24px;
  }

  .theme-btn {
    padding: 6px;
    font-size: 14px;
  }

  .backspace-icon {
    font-size: 20px;
  }

  .buttons button {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  button[data-value='0'] {
    width: 100%;
  }

  button[data-type='operator'],
  button[data-type='equal'] {
    font-size: 26px;
  }

  .expression-display {
    font-size: 18px;
    padding: 8px 0 0 0;
    height: 42px;
  }

  .display {
    font-size: 40px;
    padding: 0 0 32px 0;
  }
}
