:root {
  --bg: #fff0f6;
  --primary: #ff85c0;
  --accent: #ffd6e7;
  --text: #333;
  --shadow: rgba(0, 0, 0, 0.2);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Comic Sans MS', 'Poppins', sans-serif;
  margin: 0;
  padding: 1rem;
}

.calculator {
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 10px 20px var(--shadow);
  padding: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  width: 90%;
  max-width: 400px;
  transition: all 0.3s ease-in-out;
}

.display input {
  width: 92%;
  padding: 1rem;
  font-size: 2rem;
  text-align: right;
  border: none;
  border-radius: 1rem;
  background: var(--accent);
  box-shadow: inset 2px 2px 6px #fff, inset -2px -2px 6px var(--shadow);
  margin-bottom: 1rem;
  color: var(--text);
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

button {
  padding: 1.2rem;
  font-size: 1.5rem;
  border: none;
  border-radius: 1rem;
  background: var(--primary);
  color: white;
  box-shadow: 4px 4px 10px var(--shadow), -4px -4px 10px #fff;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button:active {
  transform: translateY(2px);
  box-shadow: inset 2px 2px 5px var(--shadow);
}

footer {
  margin-top: 2rem;
  font-size: 1.2rem;
  color: var(--text);
  text-align: center;
}

@media (max-width: 500px) {
  .calculator {
    padding: 1.2rem;
    border-radius: 1.5rem;
  }

  button {
    padding: 1rem;
    font-size: 1.2rem;
  }

  .display input {
    font-size: 1.5rem;
  }
}