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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  background: linear-gradient(to right, #6a5acd, #4a90e2);
}

.container {
  background-color: aliceblue;
  box-shadow: 0 8px 15px rgba(0, 0, 255, 0.4);
  height: auto; /* Changed to auto for responsiveness */
  width: 25vw; /* Adjust based on the screen size */
  max-width: 400px; /* Max width to avoid overly large on big screens */
  border-radius: 20px;
  padding: 0.3rem 0.3rem;
}

.calculator {
  background-color: rgb(36, 36, 36);
  border-radius: 20px;
  height: 100%;
  padding: 1rem 1rem;
}

form input {
  width: 60px;
  height: 60px;
  margin: 0.5rem;
  border-radius: 10px;
  background-color: rgb(64, 62, 62);
  border: none;
  outline: none;
  color: white;
  font-weight: bold;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.4);
}

.display-field {
  width: 100%;
  height: 4rem;
  border-radius: 10px;
  border: none;
  outline: none;
  margin-bottom: 1rem;
  font-size: 2.4rem;
  font-weight: bolder;
  padding: 0 0.5rem 0 0.5rem;
  background-color: aliceblue;
  text-align: right;
  cursor: default;
  color: black;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .container {
    width: 80vw; /* Use more of the screen on smaller devices */
    height: auto; /* Allow height to adjust automatically */
  }

  form input {
    width: 15%; /* Adjust button width for smaller screens */
    height: 50px; /* Reduced height for smaller screens */
    font-size: 1.2rem; /* Smaller font size */
  }

  .display-field {
    font-size: 2rem; /* Adjust display font size */
  }
}

@media (max-width: 480px) {
  form input {
    width: 20%; /* Further adjustment for mobile */
  }

  .display-field {
    font-size: 1.8rem; /* Further reduction for mobile display */
    height: 3.5rem; /* Smaller display field */
  }
}
