body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: white;
}

/* HEADER */
#header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.92);
  color: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

#menuToggle,
#shareToggle,
#colToggle {
  background: rgba(255,255,255,0.75);
  border: 0;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 22px;
}

#brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#logo {
  height: 38px;
  border-radius: 6px;
}

#title {
  font-size: clamp(16px, 3vw, 26px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#headerActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#colToggle img {
  height: 24px;
  width: auto;
  display: block;
}

/* GRID */
#galleryGrid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  padding: 10px;
}
#galleryGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 18px;
  align-items: center;      /* vertical centering within row */
  justify-content: center;  /* center row */
}

#galleryGrid.cols4 .card {
  width: calc(25% - 18px);
}

#galleryGrid.cols3 .card {
  width: calc(30% - 18px);
}

#galleryGrid.cols1 .card {
  width: 80%;
}

.card {
  flex: 0 0 auto;
}


/* CARD */
.card {
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

.card img {
  width: 100%;
  height: auto;
  
}

.caption {
  position: static;
  width: auto;
  background: white;
  color: #111;
  padding: 8px 6px;
  text-align: center;
  font-size: clamp(12px, 2.2vw, 20px);
  line-height: 1.15;
  font-weight: 600;
  word-break: normal;
  overflow-wrap: break-word;
}
#colToggle {
  background: rgba(255,255,255,0.75);
  border: 0;
  border-radius: 16px;
  padding: 8px 12px;
  cursor: pointer;
}

#colToggle img {
  height: 24px;
  width: auto;
  display: block;
}
/* MODAL */
#modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important; 
}

.modal-content {
  background: black;
  padding: 20px;
  max-width: 400px;
  text-align: center;
}

.modal-content img {
  width: 100%;
}

#closeBtn {
  cursor: pointer;
}
