body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

/* Modal container */
.modalmx {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeInBackground 1s forwards;
}

/* Confetti canvas */
#confetti-canvasmx {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999; /* Above modal background */
  pointer-events: none;
}

/* Modal content */
.modal-contentmx {
  background: linear-gradient(135deg, #ffffff, #f9f9f9);
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideDown 0.7s ease-in-out;
  position: relative;
  opacity: 0;
  animation: fadeIn 1s 0.3s forwards;
  padding: 20px;
  padding-right: 0;
  padding-top: 0;
  padding-left: 0;
  transform: perspective(1000px) rotateX(5deg);
  overflow: hidden;
}

/* Close button */
.close-btnmx {
  border: none;
  background: none;
  font-size: 34px;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10; /* Ensure it's above other elements */
}

.modal-link-btnmx i {
    margin-right: 8px; /* Adjust as needed for spacing between icon and text */
    vertical-align: middle;
  }

.close-btnmx:hover {
  color: #e74c3c;
}

/* Modal header with image */
.modal-headermx {
  position: relative;
  border: none;
}

/* Modal image */
.modal-imagemx {
  width: 100%;
  border-radius: 15px 15px 0 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  z-index: 1; /* Image sits below the close button */
}

/* Modal header text */
.modal-contentmx .h2mx {
  margin-top: 15px;
  font-size: 28px;
  color: #333;
}

/* Modal text */
.modal-contentmx .pmx {
  font-size: 18px;
  color: #555;
  margin: 15px 0 20px;
}

/* Button container */
.button-containermx {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* Modal link buttons */
.modal-link-btnmx {
  display: inline-block;
  padding: 12px 20px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #6b73ff, #000dff);
  border-radius: 30px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transform: perspective(1000px) translateZ(0);
}

.modal-link-btnmx:hover {
  background: linear-gradient(135deg, #4a53cf, #000ba9);
  transform: perspective(1000px) translateZ(10px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
  color: gainsboro;
}

.modal-link-btnmx + .modal-link-btnmx {
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
}

.modal-link-btnmx + .modal-link-btnmx:hover {
  background: linear-gradient(135deg, #e44e50, #ffa055);
  transform: perspective(1000px) translateZ(10px);
}

/* Animations */
@keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-contentmx {
    width: 95%;
    padding: 15px;
    padding-right: 0;
    padding-top: 0;
    padding-left: 0;
  }

  .modal-contentmx .h2mx {
    font-size: 24px;
  }

  .modal-contentmx .pmx {
    font-size: 16px;
  }

  .modal-link-btnmx {
    padding: 10px 15px;
    font-size: 14px;
  }

  .close-btnmx {
    font-size: 28px;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .modal-contentmx .h2mx {
    font-size: 22px;
  }

  .modal-contentmx .pmx {
    font-size: 14px;
  }

  .button-containermx {
    gap: 10px;
  }

  .modal-link-btnmx {
    padding: 8px 12px;
    font-size: 13px;
  }
}
