.headers,
#reshuffle {
  margin: -2px 0 0 0.5%;
  font-weight: bold;
  font-style: italic;
  font-size: 21px;
  text-align: center;
}
#reshuffle { cursor: pointer; }

/* Gallery loader (switched to a class) */
.galleryLoader {
  align-content: center;
}
.galleryLoader img {
  width: 100px;
}

/* Main gallery container (switched to a class) */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
}

/* Individual image container */
.imageContainer {
  width: 150px;
  text-align: center;
  margin: 10px;
  border: 3px solid black;
  padding: 10px;
  box-sizing: border-box;
  align-self: flex-start;
}
.imageContainer img {
  width: 100%;
  height: auto;
  cursor: pointer;
}
.imageContainer p {
  margin: 0;
  font-size: 1em;
  word-wrap: break-word;
  cursor: pointer;
  color: orange;
}

/* Modal background overlay */
.modal {
  display: none; 
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%;
  overflow: auto; 
  background-color: rgba(0, 0, 0, 0.9);
  box-sizing: border-box;
}

/* Loading spinner or image */
.loading {
  margin: auto;
  display: block;
  max-width: 100%;
  width: 100px;
}

/* Modal content (image, etc.) */
.modal-content {
  margin: auto;
  display: block;
  max-width: 100%;
  max-height: 90%;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* Modal titles & captions (kept as IDs) */
#title {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: orange;
  min-height: 0px;
  font-weight: bold;
  font-style: italic;
  font-size: 120%;
}
#caption {
  margin: 0 auto;
  margin-top: 0px;
  display: block;
  width: 80%;
  max-width: 700px;
  color: white;
  height: 150px;
  text-align: center;
}

/* Close button inside the modal */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}
.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}