body {
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  margin: 0;
  padding: 0;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #333;
  color: white;
}

#search {
  padding: 7px 10px;
  border-radius: 5px;
  border: none;
  outline: none;
  width: 200px;
}

.upload-section {
  text-align: center;
  margin: 20px 0;
}

.upload-label {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0078ff;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

#fileInput {
  display: none;
}

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

#gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

#gallery img:hover {
  transform: scale(1.05);
}

#viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  z-index: 999;
}

.hidden {
  display: none;
}

#viewerImage {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

.nav-btn, .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  margin: 0 20px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
}
