* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: Arial, sans-serif;
}

.calculator {
  background-color: #16213e;
  border-radius: 16px;
  padding: 20px;
  width: 320px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Display area */
.display {
  background-color: #0f3460;
  border-radius: 10px;
  padding: 16px 20px;
  text-align: right;
  margin-bottom: 16px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.display p {
  color: #a0aec0;
  font-size: 14px;
  min-height: 18px;
  word-break: break-all;
}

.display h1 {
  color: #ffffff;
  font-size: 42px;
  font-weight: bold;
  word-break: break-all;
}

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

.btn {
  background-color: #0f3460;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 18px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn:hover {
  background-color: #1a4a7a;
}

.btn:active {
  background-color: #133b5c;
  transform: scale(0.96);
}

/* Operator buttons */
.btn.orange {
  background-color: #e94560;
  color: white;
}

.btn.orange:hover {
  background-color: #ff6b81;
}

/* AC / DEL buttons */
.btn.gray {
  background-color: #2d3748;
  color: #e2e8f0;
}

.btn.gray:hover {
  background-color: #4a5568;
}

/* Equals button */
.btn.green {
  background-color: #38a169;
  color: white;
}

.btn.green:hover {
  background-color: #48bb78;
}

/* 0 button takes 2 columns */
.btn.wide {
  grid-column: span 2;
}
