* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  font-family: Arial, Helvetica, sans-serif;
}

.calculator {
  background: #2f8fe0;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 300px;
}

.display {
  background: #eaf3fc;
  border-radius: 10px;
  padding: 20px 15px;
  margin-bottom: 15px;
  text-align: right;
  font-size: 2rem;
  color: #111;
  min-height: 50px;
  overflow-x: auto;
  word-wrap: break-word;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

button {
  padding: 18px 0;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  color: #2f8fe0;
  cursor: pointer;
  transition: transform 0.1s ease;
}

button:active {
  transform: scale(0.95);
}

.operator {
  background: #1c6fc2;
  color: #ffffff;
}

.equal {
  background: #16a34a;
  color: #ffffff;
}

.clear {
  background: #e11d48;
  color: #ffffff;
}

.span-2 {
  grid-column: span 2;
}