* { 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', sans-serif;
}

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

.display {
  background: #0f3460;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: hidden;
}

.expression {
  color: #8899aa;
  font-size: 14px;
  min-height: 20px;
  word-break: break-all;
}

.result {
  color: #e9e9e9;
  font-size: 36px;
  font-weight: 300;
  word-break: break-all;
}

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

.btn {
  height: 56px;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  background: #1a1a40;
  color: #e9e9e9;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: #2a2a50; }
.btn:active { transform: scale(0.95); }

.btn.op { background: #1e3a5f; color: #7ec8e3; }
.btn.op:hover { background: #264d73; }

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

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