.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  backdrop-filter: blur(3px);
  --web-backdrop-filter: blur(10);
  /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeInOut 0.3s ease-in-out forwards;
}

.modal-image {
  max-width: 80%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 0 100px white;
  border: white 1px solid;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); /* Smooth zoom */
}

/*
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  color: black;
}
*/

@keyframes fadeInOut {
      from { opacity: 0; }
      to   { opacity: 1; }
    }
    /* Zoom-in animation when modal opens */
    .modal.active {
      animation: zoomIn 0.3s ease-out forwards;
    }
    @keyframes zoomIn {
      0% {
        transform: scale(0.9);
        opacity: 0;
      }
      100% {
        transform: scale(1);
        opacity: 1;
      }
    }
    /* Close animation (zoom out) */
    .modal.close {
      animation: zoomOut 0.3s ease-out forwards;
    }
    @keyframes zoomOut {
      0% {
        transform: scale(1);
        opacity: 1;
      }
      100% {
        transform: scale(0.7);
        opacity: 0;
      }
    }

@media (max-width: 600px) {
  .modal-image {
    max-width: 100%;
    max-height: 80vh;
  }
}
