/* Reset & base */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
}

.thumbnail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 20px;
}

.thumbnail {
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.05);
}

/* Modal Styles */
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-in-out;
}

.modal.hidden {
  display: none;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 2px 2px 10px black;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.modal-close:hover {
  color: #ccc;
}

@media (max-width: 600px) {
  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }
}
