body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #fe89c1, #a9058b); /* خلفية ألوان هادية */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.calculator {
  background: rgba(28, 31, 63, 0.85);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.4);
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#display {
  width: 100%;
  height: 60px;
  font-size: 26px;
  border: none;
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 10px;
  text-align: right;
  background: rgba(0, 0, 0, 0.3);
  color: #fdfdfd;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  display: block;
  box-sizing: border-box;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 60px);
  gap: 10px;
  grid-template-areas:
    "clear delete divide multiply"
    "seven eight nine minus"
    "four five six plus"
    "one two three equal"
    "zero zero dot equal";
}

.btn {
  font-size: 20px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, #43467f, #2c2f58);
  color: #fff;
  transition: all 0.25s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.btn:hover {
  background: linear-gradient(145deg, #5c60a0, #373b66);
  transform: translateY(-2px);
}

.equal {
  grid-column: span 2;
  background: linear-gradient(145deg, #66fff7, #a7deda);
  color: #fff;
  font-weight: bold;
}

.equal:hover {
  background: linear-gradient(145deg, #5af1ff, #b2f2fb);
}

.clear {
  grid-column: span 2;
  background: linear-gradient(145deg, #1ff9f9, #c6f4f4);
  color: white;
}
.clear:hover {
  background: linear-gradient(145deg, #58f4f7, #bdf1f8);
}

.delete {
  background: linear-gradient(145deg, #36d1dc, #b6ebf7);
  color: white;
}
.delete:hover {
  background: linear-gradient(145deg, #2cb2bb, #b5fffe);
}

.zero {
  grid-area: zero;
  grid-column: span 2;
  background: linear-gradient(145deg, #43467f, #2c2f58);
}

.equal {
  grid-area: equal;
}
.clear {
  grid-area: clear;
}
.delete {
  grid-area: delete;
}

.buttons button:nth-child(3) {
  grid-area: divide;
  background: linear-gradient(145deg, #a18cd1, #fbc2eb);
  color: #2d1f42;
}
.buttons button:nth-child(4) {
  grid-area: multiply;
  background: linear-gradient(145deg, #a18cd1, #fbc2eb);
  color: #2d1f42;
}
.buttons button:nth-child(5) {
  grid-area: seven;
}
.buttons button:nth-child(6) {
  grid-area: eight;
}
.buttons button:nth-child(7) {
  grid-area: nine;
}
.buttons button:nth-child(8) {
  grid-area: minus;
  background: linear-gradient(145deg, #a18cd1, #fbc2eb);
  color: #2d1f42;
}
.buttons button:nth-child(9) {
  grid-area: four;
}
.buttons button:nth-child(10) {
  grid-area: five;
}
.buttons button:nth-child(11) {
  grid-area: six;
}
.buttons button:nth-child(12) {
  grid-area: plus;
  background: linear-gradient(145deg, #a18cd1, #fbc2eb);
  color: #2d1f42;
}
.buttons button:nth-child(13) {
  grid-area: one;
}
.buttons button:nth-child(14) {
  grid-area: two;
}
.buttons button:nth-child(15) {
  grid-area: three;
}
.buttons button.equal {
  grid-area: equal;
}
.buttons button:nth-last-child(2) {
  grid-area: zero;
}
.buttons button:last-child {
  grid-area: dot;
}

/* ألوان الأرقام */
.buttons button:nth-child(5),
.buttons button:nth-child(6),
.buttons button:nth-child(7),
.buttons button:nth-child(9),
.buttons button:nth-child(10),
.buttons button:nth-child(11),
.buttons button:nth-child(13),
.buttons button:nth-child(14),
.buttons button:nth-child(15),
.buttons button:nth-last-child(2) {
  background: linear-gradient(145deg, #ed93f7, #764ba2);
  color: #fff;
}

.buttons button:nth-child(5):hover,
.buttons button:nth-child(6):hover,
.buttons button:nth-child(7):hover,
.buttons button:nth-child(9):hover,
.buttons button:nth-child(10):hover,
.buttons button:nth-child(11):hover,
.buttons button:nth-child(13):hover,
.buttons button:nth-child(14):hover,
.buttons button:nth-child(15):hover,
.buttons button:nth-last-child(2):hover {
  background: linear-gradient(145deg, #aeb2c8, #7864ee);
}
