.modal-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(99, 102, 241, 0.25),
    rgba(0, 0, 0, 0.75)
  );
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  width: 92%;
  max-width: 600px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.88)
  );
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(40px) scale(0.94);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.45s ease;
}

.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  border: none;
  background: none;
  cursor: pointer;
  color: #64748b;
  transition: transform 0.25s ease, color 0.25s ease;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  color: #111827;
}

.modal-image {
  width: 150px;
  height: 150px;
  margin: 0 auto 16px;
  /* border-radius: 50%; */
  /* background: linear-gradient(135deg, #000000, #4b5563); */

  display: flex;
  align-items: center;
  justify-content: center;
  /* box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45); */
  overflow: hidden;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* border-radius: 50%; */
  /* background: white; */
  padding: 2px;
}

.modal-card h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #111827;
}

.modal-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 26px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button, .modal-actions a {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #111111, #c9a227);
  color: white;
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.55);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
}

.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}
@media (max-width: 393px) {
  .modal-card {
    width: 95%;
    padding: 20px 16px;
    border-radius: 14px;
  }

  .modal-image {
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
  }

  .modal-card h2 {
    font-size: 17px;
    line-height: 1.3;
  }

  .modal-card p {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .modal-actions button,
  .modal-actions a {
    padding: 11px 12px;
    font-size: 13.5px;
    border-radius: 10px;
  }

  .modal-close {
    font-size: 21px;
    top: 10px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  .modal-card {
    width: 94%;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .modal-image {
    width: 110px;
    height: 110px;
    margin-bottom: 12px;
  }

  .modal-card h2 {
    font-size: 18px;
  }

  .modal-card p {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .modal-actions button,
  .modal-actions a {
    font-size: 14px;
    padding: 12px;
  }

  .modal-close {
    font-size: 22px;
    top: 10px;
    right: 12px;
  }
}

/* =========================
   TABLET (Portrait & small tablets)
   ========================= */
@media (min-width: 481px) and (max-width: 768px) {
  .modal-card {
    max-width: 520px;
    padding: 28px 22px;
  }

  .modal-image {
    width: 130px;
    height: 130px;
  }

  .modal-card h2 {
    font-size: 20px;
  }

  .modal-card p {
    font-size: 15px;
  }
}

/* =========================
   SMALL LAPTOPS
   ========================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .modal-card {
    max-width: 560px;
  }
}

/* =========================
   VERY SHORT SCREENS
   (Phones in landscape)
   ========================= */
@media (max-height: 600px) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 24px 0;
    overflow-y: auto;
  }

  .modal-card {
    margin-top: 20px;
  }
}

/* =========================
   ACCESSIBILITY & MOTION
   ========================= */
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-card,
  .modal-close,
  .modal-actions button,
  .modal-actions a {
    transition: none !important;
    animation: none !important;
  }
}
