:root {
  --bg-color: #000;
  --btn-light: #a5a5a5;
  --btn-dark: #333;
  --btn-orange: #ff9500;
  --text-light: #fff;
}

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

body {
  background: var(--bg-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.calculator {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.display {
  background: var(--bg-color);
  color: var(--text-light);
  text-align: right;
  font-size: 3rem;
  padding: 1.5rem 1rem;
  border-radius: 1rem;
  overflow-x: auto;
  min-height: 4rem;
}

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

button {
  font-size: 1.5rem;
  border: none;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-light {
  background-color: var(--btn-light);
  color: black;
}

.btn-dark {
  background-color: var(--btn-dark);
  color: var(--text-light);
}

.btn-orange {
  background-color: var(--btn-orange);
  color: var(--text-light);
}

.btn-zero {
  grid-column: span 2;
  border-radius: 999px;
  text-align: left;
  padding-left: 2rem;
  aspect-ratio: auto;
}

@media (max-width: 500px) {
  .display {
    font-size: 2.2rem;
  }
  button {
    font-size: 1.2rem;
  }
}
