*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.heading {
    font-size: 50px;
    color: #111010;
    margin-bottom: 30px;
    font-weight: bold;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;      
    height: 100vh;   
    background-color: white;
}

.calculator {
    border: 1px solid white;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: white;
    width: 430px;
    height: 430px;
    padding: 43px 25px 20px 25px;
    gap: 10px;
    border-radius: 10px;
}

.calculator .output{
    background-color: snow;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    grid-column: 1/5;
    color: black;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 20px;
    height: 60px;
    border-radius: 50px;
    padding: 12px;
    margin-bottom: 20px;
    white-space: nowrap;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow: hidden;
    
}
.calculator .output:hover{
    cursor: default;
}
.calculator button{
    cursor: pointer;
    background-color: white;
    font-size: 15px;
    font-weight: bold;
    color: black;
    border: none;
    border-radius: 20px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
.calculator button:hover{
    background-color: rgb(226, 221, 221);
    transition-duration: 0.2s;
}

.calculator button:nth-child(2),
.calculator button:nth-child(3),
.calculator button:nth-child(4),
.calculator button:nth-child(6),
.calculator button:nth-child(5),
.calculator button:nth-child(10),
.calculator button:nth-child(14),
.calculator button:nth-child(18),
.calculator button:nth-child(22){
    background-color: black;
    color: white;
}
/* or i can use also class  */

button.operator:hover {
    background-color: black;
    color: rgb(196, 191, 191);
}
@media (max-width: 500px) {
    *{
        margin: 0;
        padding: 0;
    }
    .calculator {
      width: 85vw;
    }
    .calculator .output {
      font-size: 20px;
    }
  }
  
  body.dark .heading {
    
    color: white;
  }

  body.dark {
    background-color: #121212;
    color: white;
  }
  
  body.dark .calculator {
    background-color: #1e1e1e;
    box-shadow: rgba(255, 255, 255, 0.1) 0px 4px 12px;
  }
  
  body.dark .calculator .output {
    background-color: #2a2a2a;
    color: #fff;
  }
  
  body.dark .calculator button {
    background-color: #333;
    color: #fff;
    box-shadow: rgba(255, 255, 255, 0.05) 0px 4px 12px;
  }
  
  body.dark .calculator button:hover {
    background-color: #444;
    color: #fff;
  }
  
  body.dark button.operator {
    background-color: #f90;
    color: black;
  }

 
  
  body.dark #theme {
    background-color: #444;
    color: #d3cccc;
  }
  
 
  #theme {
    position: absolute;
    top: 20px;
    right: 20px;
    grid-column: 4/5;
    justify-self: end;
    padding: 8px 10px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 100%;
    background-color: #eee;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    
}


.calculator button:hover{
    background-color: rgb(226, 221, 221);
    transition-duration: 0.2s;
}
  