* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow: hidden;
}

.background-animation span {
  position: absolute;
  display: block;
  width: 25px;
  height: 25px;
  background: rgba(255,255,255,0.08);
  animation: animate 20s linear infinite;
  bottom: -150px;
  border-radius: 50%;
}

.background-animation span:nth-child(1) {
  left: 10%;
  width: 40px;
  height: 40px;
  animation-duration: 15s;
}

.background-animation span:nth-child(2) {
  left: 25%;
  width: 60px;
  height: 60px;
  animation-duration: 22s;
}

.background-animation span:nth-child(3) {
  left: 50%;
  width: 20px;
  height: 20px;
  animation-duration: 12s;
}

.background-animation span:nth-child(4) {
  left: 70%;
  width: 50px;
  height: 50px;
  animation-duration: 18s;
}

.background-animation span:nth-child(5) {
  left: 90%;
  width: 35px;
  height: 35px;
  animation-duration: 25s;
}

@keyframes animate {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-1200px) rotate(720deg);
    opacity: 0;
  }
}
.calculator {
  width: 360px;
  padding: 20px;
  border-radius: 25px;
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: popup 1s ease;
}

@keyframes popup {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.top-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.top-bar h2 {
  color: white;
  flex: 1;
  font-size: 24px;
}

.circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 6px;
}

.red {
  background: #ff5f57;
}

.yellow {
  background: #febc2e;
}

.green {
  background: #28c840;
}

/* Display */
#display {
  width: 100%;
  height: 80px;
  border: none;
  outline: none;
  border-radius: 15px;
  margin-bottom: 20px;
  padding: 20px;
  font-size: 32px;
  text-align: right;
  color: white;
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}

/* Buttons */
.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

button {
  height: 65px;
  border: none;
  border-radius: 18px;
  font-size: 22px;
  cursor: pointer;
  color: white;
  background: rgba(255,255,255,0.08);
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

button:hover {
  transform: translateY(-5px) scale(1.05);
  background: rgba(255,255,255,0.15);
}

button:active {
  transform: scale(0.95);
}

.operator {
  background: linear-gradient(135deg, #ff512f, #dd2476);
}

.equal {
  background: linear-gradient(135deg, #00ffc3, #00ff08);
}

.clear {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.zero {
  grid-column: span 2;
}

/* Mobile Responsive */
@media(max-width: 400px) {
  .calculator {
    width: 95%;
  }

  button {
    height: 60px;
  }
}