.gallery-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}

.gallery-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  background: #231b38;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-card:hover {
  transform: scale(1.02);
  border: 3px solid #9743f8;
  box-shadow: 0 0 0 4px #9743f855;
}

.gallery-img-wrap {
  width: 100%;
  height: 100%;
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 1;
}

.gallery-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: static;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 10px 28px #280459cc) drop-shadow(0 2px 8px #9743f8bb);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}



#gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#modal-content {
  max-width: 90vw;
  max-height: 90vh;
}

#modal-content img {
  cursor: zoom-in;
}
#modal-content img.zoomed {
  cursor: zoom-out;
  max-width: none !important;
  max-height: none !important;
  border-radius: 8px;
  box-shadow: 0 0 40px #000a;
}
#modal-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#modal-content img.zoomed {
  max-width: none !important;
  max-height: none !important;
  border-radius: 8px;
  box-shadow: 0 0 40px #000a;
}

#modal-content video {
  background: #000;
}

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

.gallery-error {
  grid-column: 1 / -1;
  text-align: center;
  color: white;
  padding: 20px;
}

.gallery-error button {
  margin-top: 10px;
  padding: 8px 16px;
  background: #f5be6e;
  color: #000;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
