
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #8d8d8d;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.calculator {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  width: 350px;
}

#display {
  width: 93%;
  height: 50px;
  font-size: 1.8em;
  text-align: right;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background-color: #efeded;
  color: #000000;
  margin-bottom: 15px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
}

.buttons button {
  width: 23%;
  margin: 1%;
  padding: 20px 0;
  font-size: 1.2em;
  border: none;
  border-radius: 8px;
  background-color: #3a3a3a;
  color: #f0f0f0;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.buttons button:hover {
  background-color: #505050;
  transform: scale(1.05);
  cursor: pointer;

}

.buttons button:active {
  background-color: #942c2c;
}

button:nth-child(1) {
  background-color: #d32f2f; /* Clear button - red */
  color: #fff;
}

button:nth-child(1):hover {
  background-color: #b71c1c;
}

button:nth-child(1) {
  background-color: #d32f2f; /* Clear button - red */
  color: #fff;
}

button:nth-child(1):hover {
  background-color: #b71c1c;
}

button:nth-child(17) {
  background-color: #388e3c; /* Equals button - green */
  color: #fff;
}

button:nth-child(17):hover {
  background-color: #2e7d32;
}
h2{
    color: #fff;
    text-align: center;
    margin-left: 20px;
    font-size: 25px;
}
h2:hover{
cursor: pointer;
   
}

button:nth-child(5),
button:nth-child(9),
button:nth-child(13),
button:nth-child(18) {
  background-color: #1976d2; /* Operator buttons - blue */
  color: #fff;
}
h1{
    color: #fff;
    }

button:nth-child(5):hover,
button:nth-child(9):hover,
button:nth-child(13):hover,
button:nth-child(18):hover {
  background-color: #1565c0;
}