body {
  background: linear-gradient(to left, #1a1a1a, #444);
  height: 100vh;
  width: 100vw;
  margin: 0;
  font-family: monospace;
/*  display: flex;   */
  justify-content: center;
  align-items: center;
}

/* Calculator Wrapper */
.calculator {
  margin : auto;
  border:5px;
  /* width: 280px; */
  /* max-width: 90vmin; */
  max-height: max-content;
  aspect-ratio: 1/1.3;
  padding: 1rem;
  background: #111;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: repeat(8, 1fr);
  /* flex-direction: column; */
  gap: 1rem;
}

/* Display */
.display {
  width: 100%;
  background: #111;
  /* color: #0f0; */
  border-radius: 20px;
  box-shadow: inset 0 0 6px rgba(0, 255, 0, 0.4);
  /* padding: 0.75rem; */
  display: flex;   
  flex-direction: column;
  justify-content: center;
  text-align: right ;
}
/* test */
.display p {
  margin: auto;
  padding: auto;
  width: 100% ;
}

.first_input,
.second_input {
  color: white;
  width: 100%;
  word-break: break-word;
  font-size: 1.5rem;
  min-height: 40px;
}

/* Button Grid */
.buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0.5rem;
  width: 100%;
  height: 90% ;
  aspect-ratio: 1/1 ;
 /* max-width: 332px */
}

/* Button Style */
button {
  background: #2c2c2c;
  color: #fff;
  font-size: 1.2rem;
  border: none;
  border-radius: 12px;
  cursor: crosshair;
  transition: all 0.2s ease;
  filter: drop-shadow(2px 2px 2px #000);
  
}

button:hover {
  background: #3a3a3a;
}

button:active {
  background: #000;
}

/* Button Spans (Based on Button Order) */
.buttons > button:nth-child(1) {
  grid-column: span 2;
  aspect-ratio: AUTO; /* AC */
}

.buttons > button:nth-child(13) {
  grid-row: span 2; /* + */
    aspect-ratio: AUTO;
}

button[data-e] {
  grid-column: span 2; /* = */
    aspect-ratio: AUTO;
}

/* Responsive */
@media (max-width: 1000px) {
  .calculator {
    width: 90vw;
  }

  .buttons {
    grid-template-columns: repeat(5, 1fr);
  }

  button {
    font-size: 1rem;
  }

  .display {
    font-size: 1.5rem;
    padding: 0.5rem;
  }
}
