*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body{
  width: 100%;
  height: 100vh;
  font-family: sans-serif;
  background-color: #F4F2F2;
  overflow: hidden;
}

/* custom css variables */
:root{
  --light-black : #818286;
  --black : #2C2E3B;
  --white : #FFFFFF;
  --white-smoke : #F9F9F9;
  --gray : #F6F6F6F7;
  --sky-blue : #67E6D5;
  --tomato : #D46D74;
}

body.dark{
  --light-black : #E0E3EA;
  --black : #FBFBFC;
  --white : #22252D;
  --white-smoke : #2A2D37;
  --gray : #22252C;
}

#calculator{
  width: 300px;
  height: 500px;
  margin: 60px auto;
  background: var(--white);
  border-radius: 15px;
  position: relative;
}

#calculator .theme-icons{
  position: absolute;
  top: 25px;
  left: calc(50% - 30px);
  background: var(--white-smoke);
  padding: 7px 10px;
  text-align: center;
  border-radius: 50px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
}

#calculator .theme-icons i{
  cursor: pointer;
  color: var(--black);
}

#calculator .result{
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: right;
  padding: 0px 15px;
}

#calculator .result .history #history-value{
  font-size: 18px;
  font-weight: bold;
  color: var(--light-black);
  padding-bottom: 5px;
}

#calculator .result .output #output-value{
  font-size: 28px;
  font-weight: bold;
  color: var(--black);
  padding-bottom: 20px;
}

/* keyboard styles */
#calculator .keyboard{
  height: 350px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 25px;
  padding: 14px 15px;
  background: var(--white-smoke);
  border-radius: 15px;
}

#calculator .keyboard button{
  border: none;
  outline: none;
  width: 42px;
  height: 42px;
  line-height: 42px;
  border-radius: 50%;
  background: var(--gray);
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.keyboard button:active{
  transform: scale(0.8);
}

.keyboard .empty{
  pointer-events: none;
  visibility: hidden;
}

.keyboard .operator{
  color: var(--sky-blue);
}

.keyboard .operator:nth-child(4),
.keyboard .operator:nth-child(8),
.keyboard .operator:nth-child(12),
.keyboard .operator:nth-child(16),
.keyboard .operator:last-child{
  color: var(--tomato);
}

.keyboard .number{
  color: var(--black);
}