/* ====== GLOBAL RESET ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, sans-serif;
}

/* ====== BACKGROUND ====== */
body,
html {
  height: 100%;
  background: linear-gradient(135deg, #3d9e6f, #1e3c72, #2a5298);
  background-size: 200% 200%;
  animation: gradientFlow 10s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ====== CONTAINER ====== */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* ====== CALCULATOR ====== */
.calculator {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 25px 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  width: 360px;
  max-width: 90%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

/* ====== TITLE ====== */
.title {
  text-align: center;
  color: #00ffff;
  font-size: 1.4rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* ====== DISPLAY ====== */
.display {
  margin-bottom: 20px;
}

.display input {
  width: 100%;
  padding: 15px;
  font-size: 2rem;
  border-radius: 10px;
  border: none;
  text-align: right;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3),
              inset -2px -2px 5px rgba(255, 255, 255, 0.1);
}

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

button {
  border: none;
  outline: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease-in-out;
}

button:hover {
  background: rgba(0, 255, 255, 0.3);
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 255, 255, 0.4);
}

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

/* ====== OPERATOR BUTTONS ====== */
button.operators {
  color: #00ffff;
}

/* ====== EQUAL BUTTON ====== */
button.equal-symbol {
  grid-column: span 2;
  background: #00ffff;
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

button.equal-symbol:hover {
  background: #18f0ff;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
}

/* ====== FOOTER ====== */
footer {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

footer strong {
  color: #00ffff;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 450px) {
  .calculator {
    width: 100%;
    padding: 20px;
  }

  .display input {
    font-size: 1.6rem;
  }

  button {
    font-size: 1.1rem;
    padding: 12px;
  }
}
