* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.calculator {
  background: rgba(28, 28, 28, 0.95);
  padding: 25px;
  border-radius: 25px;
  width: 340px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.screen {
  background: #dfe6d5;
  border-radius: 15px;
  padding: 10px 15px;
  margin-bottom: 20px;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.15);
}

.history {
  font-size: 0.9rem;
  color: #666;
  text-align: right;
  height: 20px;
}

.display {
  font-size: 2rem;
  text-align: right;
  color: #222;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

button {
  height: 65px;
  border: none;
  border-radius: 14px;
  font-size: 1.4rem;
  cursor: pointer;
  background: #2a2a2a;
  color: white;
  transition: all 0.15s ease;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
}

button:hover {
  background: #3a3a3a;
  transform: translateY(-2px);
}

button:active {
  transform: scale(0.95);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
}

button.pop {
  animation: pop 0.15s ease;
}

.operator {
  background: #ff9500;
  color: white;
}

.operator:hover {
  background: #ff7a00;
}

.equals {
  background: #ff9500;
  font-weight: bold;
}

.equals:hover {
  background: #ff7a00;
}

.clear {
  background: #ff3b30;
}

.clear:hover {
  background: #e02a20;
}

.delete {
  background: #555;
}

.delete:hover {
  background: #777;
}

.zero {
  grid-column: span 2;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
