* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  animation: bgMove 8s infinite alternate;
}

@keyframes bgMove {
  0% { background-position: left; }
  50% {background-position: bottom;}
  100% { background-position: right; }
}


.container {
  width: 320px;
  padding: 25px;
  border: 2px solid #000;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  box-shadow: 1px 30px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  animation: fadeIn 1.5s ease-in-out forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  25%{
    opacity: 0.2;
  }
  50%{
    opacity: 0.5;
  }
  80%{
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}
.container #display::placeholder{
  text-align: center;
}


#display {
  width: 100%;
  height: 75px;
  margin-bottom: 20px;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 40px;
  text-align: right;
  padding: 10px;
}


.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  font-size: 20px;
}


button {
  height: 62px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 25px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  box-shadow:
    0 8px 15px rgba(0, 0, 0, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
}


button:hover {
  transform: translateY(-2px);
  background-color: #203a43;
  color: white;
  transition: 0.3s;
}


button:active {
  transform: scale(0.92);
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.3);
}


.wide {
  grid-column: span 3;
  border-radius: 35px;
  text-align: left;
  padding-left: 26px;
}


.clear {
  background: rgba(255, 255, 255, 0.7);
  color: #000;
}


.operator {
  background: linear-gradient(135deg, #203a43, #2c5364);
  color: #fff;
  box-shadow: 0  2px 5px #000;
}

.operator:hover {
  filter: brightness(1.1);
  background: #000;
  color: white;
  transition: 0.3s;
}


.equal {
  background:#111;
  color: #fff;
  box-shadow: 0 2px 5px #000;
}

@media (max-width: 460px) {
  .container {
    width: 95%;  
    height: 95%;
    padding: 15px;        
    border-radius: 20px;  /* Slightly smaller corners */
    box-shadow: 1px 20px 40px rgba(0, 0, 0, 0.25); 
  }

  button{
    height: 58px;
    font-size: 20px;
    padding: 10px 3px;
  }
}
