* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.calculator {
  width: 100%;
  max-width: 400px;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.display {
  position: relative;
  width: 100%;
  height: 80px;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.1);
}

.display input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 20px;
  font-size: 2.5rem;
  color: white;
  text-align: right;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
}

.btn {
  padding: 20px 0;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s, background-color 0.2s;
  border: none;
  color: white;
}

.btn:active {
  transform: scale(0.95);
}

.number {
  background-color: rgba(255, 255, 255, 0.1);
}

.number:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.operator {
  background-color: rgba(255, 193, 7, 0.7);
  font-weight: bold;
}

.operator:hover {
  background-color: rgba(255, 193, 7, 0.9);
}

.action {
  background-color: rgba(233, 30, 99, 0.7);
  font-weight: bold;
}

.action:hover {
  background-color: rgba(233, 30, 99, 0.9);
}

.equals {
  background-color: rgba(33, 150, 243, 0.7);
  grid-row: span 2;
  font-weight: bold;
}

.equals:hover {
  background-color: rgba(33, 150, 243, 0.9);
}

.zero {
  grid-column: span 2;
}

@media (max-width: 500px) {
  .calculator {
    width: 90%;
    padding: 15px;
  }

  .display {
    height: 70px;
    margin-bottom: 15px;
  }

  .display input {
    font-size: 2rem;
  }

  .btn {
    padding: 15px 0;
    font-size: 1rem;
  }
}

@media (max-width: 350px) {
  .calculator {
    padding: 10px;
  }

  .display {
    height: 60px;
    margin-bottom: 10px;
  }

  .display input {
    font-size: 1.8rem;
  }

  .buttons {
    grid-gap: 8px;
  }

  .btn {
    padding: 12px 0;
    font-size: 0.9rem;
  }
}
