body {
  background: #f5f5dc; /* beige/off-white */
  font-family: 'Tiro Devanagari Marathi', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  margin: 0;
  color: #333; /* darker text for contrast */
}

h1 {
  font-size: 42px;
  margin-bottom: 20px;
  color: #333;
}

.calculator {
  background: #ffffff; /* white for calculator background */
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 30px;
  width: 420px;
  color: #333;
}

.display {
  background: #fafafa; /* very light grey */
  border-radius: 15px;
  padding: 20px;
  font-size: 36px;
  text-align: right;
  margin-bottom: 25px;
  color: #111;
  min-height: 60px;
  overflow-x: auto;
}

.buttons {
  display: flex;
  gap: 15px;
}

.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  flex: 3;
}

.operators {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

button {
  font-size: 28px;
  padding: 20px;
  border-radius: 12px;
  background: #e0d4c4;
  color: #333;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;

  /* Neumorphic soft shadow */
  box-shadow: 3px 3px 6px #aaa, -3px -3px 6px #fff;
  transition: all 0.2s ease;

  /* Ripple effect support */
  position: relative;
  overflow: hidden;
}

button:active {
  box-shadow: inset 2px 2px 4px #aaa, inset -2px -2px 4px #fff;
}

/* Ripple animation */
button::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.5);
  left: 50%;
  top: 50%;
  transform: scale(0) translate(-50%, -50%);
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

button:active::after {
  transform: scale(2.5) translate(-50%, -50%);
  opacity: 0;
}

.equals {
  background-color: #a1887f; /* darker beige for = */
  font-size: 36px;
  grid-column: span 1;
}

.equals:hover {
  background-color: #7c6a57;
}

.clear {
  background-color: #e57373; /* soft red */
  color: white;
  font-weight: bold;
}

.clear:hover {
  background-color: #d32f2f;
}

/* ✅ Mobile view scaling (phones < 600px width) */
@media (max-width: 600px) {
  .calculator {
    width: 80%;        /* shrink calculator width */
    padding: 20px;     /* reduce padding */
    transform: scale(0.9); /* optional extra scaling */
  }

  .display {
    font-size: 28px;
    padding: 15px;
  }

  button {
    font-size: 28px;
    padding: 16px;
  }

  .equals {
    font-size: 28px;
  }
}
