.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(3px);
}
.popup.active {
  display: flex;
  opacity: 1;
}
.popup .popup_container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 70vh;
  max-width: 800px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup .popup_container .popup_img {
  overflow-y: auto;
  height: auto;
  max-height: 70vh;
}
.popup .popup_container img {
  width: 100%;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  display: block;
  margin: 0 auto;
}
.popup .popup_container .close_btn {
  position: absolute;
  top: -40px;
  right: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.popup .popup_container .close_btn::before, .popup .popup_container .close_btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 2px;
  background: #fff;
  transform-origin: center;
}
.popup .popup_container .close_btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.popup .popup_container .close_btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.popup .popup_container .close_btn:hover::before, .popup .popup_container .close_btn:hover::after {
  background: #ccc;
}

@media (max-width: 768px) {
  .popup .popup_container {
    width: 95%;
    margin: 20px auto;
  }
  .popup .popup_container .close_btn {
    top: -45px;
    right: 5px;
    width: 30px;
    height: 30px;
  }
  .popup .popup_container .close_btn::before, .popup .popup_container .close_btn::after {
    width: 20px;
  }
}
