*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  background-color: #1a1a2e;
  color: #ffffff;
}

.calculator {
  border: 5px solid black;
  width: 350px;
  padding: 1.5rem;
  background-color: #16213e;
  border-radius: 12px;
}

.calculator_display {
  display: flex;
  justify-content: end;
  padding: 1rem;
  background-color: #000000;
  border-radius: 8px;
  border: none;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.calculator_display p {
  font-size: 2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

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

.buttons button {
  padding: 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  min-height: 60px;
  border-radius: 8px;
  border: none;
}

.error-message-text {
  color: red;
  font-size: 1.2rem;
}

.hide {
  display: none;
}

.clear,
.backspace {
  background-color: #e94560;
  color: white;
  grid-column: span 2;
}

.number {
  background-color: #0f3460;
  color: #fff;
}
.operator {
  background-color: #e94560;
  color: #fff;
}
.equals {
  background-color: #e94560;
  color: #fff;
}

button:hover {
  opacity: 0.8;
  cursor: pointer;
}
