/* Popup background (hidden at start) */
.popup {
  display: none; /* hidden initially */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 9999;

  /* Flexbox to center content */
  display: flex;
  justify-content: center;
  
}

/* Hide until JS activates */
.popup.hidden {
  display: none !important;
}

.popup-inner {
  display: flex;
  align-items: center;   /* vertical centering */
  justify-content: space-between; /* space between poster & buttons */
  gap: 20px;             /* space between items */
}

/* Popup content box */
.popup-content {
  transform: scale(0.5);
  position: relative;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  max-width: 60%;
  max-height: 60%;
  text-align: center;
}


.popup-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Close button */
.close {
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* Action buttons */
.popup-actions {
  margin-top: 50px;
}

.popup-actions .btn {
  display: inline-block;
  margin: 5px;
  padding: 10px 20px;
  background: #0073e6;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}

.popup-actions .btn:hover {
  background: #005bb5;
}


@media (max-width: 768px) {
      .popup-content {
        transform: scale(1.0);
      }
      .popup {
        align-items: center;
      }
    }