* { box-sizing: border-box; font-family: sans-serif; }
body { margin: 0; padding: 20px; background-color: #f4f4f9; }
header { text-align: center; margin-bottom: 20px; }
input, select, button { padding: 8px; margin: 5px; }
.filters { margin: 15px 0; }
.upload-section { display: flex; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
}
.gallery-item h3 { margin: 10px 0 5px; font-size: 16px; }
.gallery-item p { margin: 0; color: #666; font-size: 14px; }
.delete-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: red;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 3px;
}

/* Lightbox */
.lightbox {
  display: none; position: fixed; z-index: 100;
  padding-top: 60px; left: 0; top: 0; width: 100%; height: 100%;
  overflow: auto; background-color: rgba(0,0,0,0.9);
}
.lightbox-content {
  margin: auto; display: block; width: 80%; max-width: 700px;
}
#caption { margin: auto; display: block; width: 80%; max-width: 700px; text-align: center; color: #ccc; padding: 10px 0; }
.close {
  position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer;
}
@media(max-width:768px){
  .gallery { grid-template-columns: 1fr; }
}