* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
}

/* Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 12px;
}

.gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 92%;
  max-height: 75vh;
  border-radius: 12px;
}

/* Controls */
.lightbox span {
  position: absolute;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  user-select: none;
}

.close {
  top: 15px;
  right: 20px;
  font-size: 40px;
}

.nav {
  top: 50%;
  transform: translateY(-50%);
  padding: 12px;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* Tablet */
@media (min-width: 600px) {
  .gallery img {
    height: 200px;
  }
}

/* Desktop */
@media (min-width: 992px) {
  .gallery {
    padding: 24px;
    gap: 20px;
  }
  .gallery img {
    height: 240px;
  }
}
