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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.calculator {
  width: 320px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: #16213e;
}

.display {
  padding: 24px 20px 16px;
  text-align: right;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.expression {
  color: #8892b0;
  font-size: 16px;
  min-height: 24px;
  word-break: break-all;
}

.result {
  color: #e6f1ff;
  font-size: 40px;
  font-weight: 300;
  margin-top: 4px;
  word-break: break-all;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 1px;
  background: #0f3460;
}

.btn {
  background: #16213e;
  border: none;
  color: #e6f1ff;
  font-size: 20px;
  padding: 20px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.btn:hover {
  background: #1a2744;
}

.btn:active {
  background: #233554;
}

.btn.op {
  color: #64ffda;
}

.btn.accent {
  background: #e94560;
  color: #fff;
}

.btn.accent:hover {
  background: #f05a73;
}

.btn.accent:active {
  background: #d63a54;
}

.btn.wide {
  grid-column: span 2;
}
