/* Lightbox styles for character and group images */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  max-height: 90%;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #ff6b6b;
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.lightbox-caption {
  color: #fff;
  font-size: 16px;
  margin-top: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 5px;
  display: inline-block;
  max-width: 80%;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { 
    transform: scale(0.3);
    opacity: 0;
  }
  to { 
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .lightbox-content {
    width: 95%;
    padding: 10px;
  }
  
  .lightbox-close {
    font-size: 28px;
    width: 35px;
    height: 35px;
    top: -35px;
  }
  
  .lightbox-caption {
    font-size: 14px;
    margin-top: 10px;
    max-width: 90%;
  }
  
  .lightbox-image {
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .lightbox-content {
    width: 98%;
    padding: 5px;
  }
  
  .lightbox-close {
    font-size: 24px;
    width: 30px;
    height: 30px;
    top: -30px;
  }
  
  .lightbox-caption {
    font-size: 12px;
    margin-top: 8px;
    padding: 8px;
  }
  
  .lightbox-image {
    max-height: 65vh;
  }
}

/* Cursor pointer for clickable images */
.character-photo img,
.location-photo img {
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.character-photo img:hover,
.location-photo img:hover {
  opacity: 0.9;
}