
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Cairo", sans-serif;
  outline: none;
}
body {
  background-color: #ebcdfe;
  background-color: #ded4e4;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.calculator {
  background-color: #ffffff;
  width: 100%;
  max-width: 380px;
  padding: 25px;
  border-radius: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}
.screen {
  background-color: #f0f0f3;
  width: 100%;
  min-height: 80px; 
  height: auto;
  border-radius: 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px; 
  flex-wrap: wrap;
  word-break: break-all;
  font-size: 2.5rem;
  color: #555;
  font-weight: 600;
  box-shadow: inset 5px 5px 10px #d1d1d1, inset -5px -5px 10px #ffffff;
  transition: font-size 0.2s;
}
.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
button {
  border: none;
  background-color: #f0f0f3;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  border-radius: 50%;
  aspect-ratio: 1 / 1; 
  box-shadow: 6px 6px 12px #d1d1d1, -6px -6px 12px #ffffff;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}
button:active {
  box-shadow: inset 4px 4px 8px #d1d1d1, inset -4px -4px 8px #ffffff;
  transform: scale(0.98);
}
.equal-btn {
  grid-column: span 2;
  width: 100%;
  aspect-ratio: auto;
  border-radius: 20px;
  background-color: #e2adcb;
  color: #333;
  box-shadow: 6px 6px 12px #bf92ac, -6px -6px 12px #ffffff;
}
.equal-btn:active {
  background-color: #d69dbb;
  box-shadow: inset 4px 4px 8px #bf92ac, inset -4px -4px 8px #ffc8e8;
}

@media (max-width: 400px) {
  .calculator {
    padding: 20px;
  }
  .keys {
    gap: 10px;
  }
  .screen {
    font-size: 2rem;
    height: 70px;
  }
}
