body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background-color: rgb(28, 28, 28);
  font-family: 'Poppins', sans-serif;
  touch-action: manipulation;
}

.container {
  height: 100vh;
  max-width: 400px; /* 👈 controls overall size */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
 
  padding: 15px;
  box-sizing: border-box;
  overflow: hidden;
}

.display-values {
  font-size: 2rem;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;          /* 👈 prevents overflow */
  word-break: break-all;     /* 👈 breaks long numbers properly */
  flex: 0 0 25%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  padding: 10px;
}

.buttons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  
}

button {
  width: 100%;
  height: 100%;
  border-radius: 50%; /* 👈 makes it circle */
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

button:active {
  transform: scale(0.95);
}

.clear-button {
  background-color: rgb(212, 212, 210);
  color: rgb(28, 28, 28);
  transition: transform 0.2s;
  
}

.clear-button:hover, .delete-button:hover, .percent-button:hover, .operator-button:hover, .equal-button:hover, .number-button:hover, .decimal-button:hover, .zero-button:hover  {
  transform: scale(1.1)
}

.delete-button {
  background-color: rgb(212, 212, 210);
  color: #1c1c1c;
  transition: transform 0.2s;
}

.clear-image {
  height: 20px;
  

}

.percent-button {
 background-color: rgb(212, 212, 210);
 color: rgb(28, 28, 28);
}



.operator-button, .equal-button {
 background-color: rgb(255, 149, 0);
 color: rgb(212, 212, 210);
}

.divide-image {
  color: rgb(212, 212, 210);
}

.number-button, .decimal-button {
  background-color: rgb(80, 80, 80);
  color: rgb(212, 212, 210);
}


.zero-button {
  background-color: rgb(80, 80, 80);
  color: rgb(212, 212, 210);
  grid-column: span 2;
  border-radius: 30px;
}

/* ===== MOBILE RESPONSIVE (≤ 450px) ===== */
@media (max-width: 450px) {
  body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* no scroll */
    background-color: rgb(28, 28, 28);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .container {
    width: 360px;       /* fixed width for mobile */
    height: 100vh;      /* full screen */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* push everything to bottom */
    padding: 10px;
    box-sizing: border-box;
  }

  .display-values {
    font-size: 1.6rem;
    color: white;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    overflow: hidden;
    word-break: break-word;
    padding: 10px;
    margin-bottom: 10px; /* space above buttons */
  }

  .buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 70px;  /* button height */
    gap: 8px;
  }

  button {
    width: 70px;       /* fixed width */
    height: 70px;      /* fixed height */
    border-radius: 50%;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
  }

  .zero-button {
    grid-column: span 2;
    width: 148px;      /* double width rectangle */
    height: 70px;
    border-radius: 25px;
  }

  /* Button colors */
  .clear-button,
  .delete-button,
  .percent-button {
    background: rgb(212, 212, 210);
    color: #1c1c1c;
  }

  .operator-button,
  .equal-button {
    background: rgb(255, 149, 0);
    color: white;
  }

  .number-button,
  .decimal-button {
    background: rgb(80, 80, 80);
    color: rgb(212, 212, 210);
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .container {
    max-width: 500px;
  }

  .display-values {
    font-size: 1.8rem;
  }

  button {
    font-size: 1.3rem;
  }
}


