@import url('https://dsans.dmx3377.uk/font.css');

body {
  background: #121212;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: 'DSans', 'Segoe UI', Tahoma, sans-serif;
}

.calculator {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 18px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.display {
  background: #000;
  color: #00e676;
  font-size: 2.8em;
  padding: 15px;
  border-radius: 10px;
  text-align: right;
  margin-bottom: 20px;
  height: 70px;
  overflow-x: auto;
  user-select: none;
  font-family: 'DSans Code', Consolas, 'Roboto Mono', Cascadia Code, Lucida Console, monospace;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

button {
  padding: 18px;
  font-size: 1.4em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: #2c2c2c;
  color: white;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:active {
  transform: scale(0.94);
}

button:hover {
  background: #3a3a3a;
}

.operator {
  background: #03a9f4;
}

.operator:hover {
  background: #0288d1;
}

.equal {
  background: #00c853;
  grid-column: span 1;
}

.equal:hover {
  background: #00a844;
}

.clear {
  background: #ff5252;
}

.clear:hover {
  background: #e04848;
}

.zero {
  grid-column: span 2;
}

/* Responsive tweaks */
@media (max-width: 400px) {
  .calculator {
    max-width: 95%;
  }
  button {
    font-size: 1.2em;
    padding: 16px;
  }
  .display {
    font-size: 2.2em;
  }
}
