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

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #10131a;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.calc {
  width: 320px;
  padding: 20px;
  border-radius: 20px;
  background: #1b212b;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.display {
  min-height: 84px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 8px 12px;
  font-size: 2.6rem;
  font-weight: 300;
  color: #f2f5f9;
  word-break: break-all;
  text-align: right;
}

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

.key {
  height: 60px;
  border: none;
  border-radius: 14px;
  font-size: 1.35rem;
  cursor: pointer;
  background: #2a313d;
  color: #f2f5f9;
  transition: filter 0.12s ease;
}

.key:hover {
  filter: brightness(1.2);
}

.key:active {
  filter: brightness(0.85);
}

.key.operator,
.key.equals {
  background: #f59e0b;
  color: #14181f;
  font-weight: 600;
}

.key.zero {
  grid-column: span 2;
}

@media (prefers-reduced-motion: reduce) {
  .key {
    transition: none;
  }
}

.key:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}