:root {
  --uq-primary-bg: #0173f0;
  --uq-primary-hover-bg: #005bb5;
}

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

.btn-uq-primary {
  background-color: var(--uq-primary-bg);
  color: #fff;
  border: none;
}

.btn-uq-primary:hover {
  background-color: var(--uq-primary-hover-bg);
  color: #fff;
}

/* ========================= */
/* ✅ DESKTOP MASONRY */
/* ========================= */
.gallery {
  column-count: 3;
  column-gap: 0px;
  padding: 12px;
  max-width: 800px;
  margin: 0 auto;
  /* centers horizontally */
}

canvas {
  max-width: 250px;
}

.gallery-filters {
  gap: 10px;
  padding: 4px 16px;
  background: black;
  /* border-bottom: 1px solid #e0e0e0; */
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 12px 12px;
  padding-bottom: 4px;
  padding-top: 0;
}

/* ✅ Allow wrap ONLY on mobile */
@media (max-width: 768px) {
  .gallery-filters {
    flex-wrap: wrap;
  }
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 50px;
  /* border: 1px solid #ccc; */
  background: black;
  color: #333;
  font-weight: 500;
  /* border-color: var(--uq-primary-bg); */
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ✅ Label styling */
.filter-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
  text-align: center;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: #1b1e21;
}

.filter-btn.active {
  background: #1b1e21;
  /* stylish purple */
  color: #fff;
  box-shadow: 0 2px 6px rgba(14, 14, 15, 0.3);
}

.card {
  position: relative;
  /* required for absolute positioning of toggle */
}

.card.dimmed {
  opacity: 0.5;
  filter: grayscale(70%);
  transition: all 0.3s ease;
}

.creator-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  z-index: 10;
  transition: background 0.2s;
}

.creator-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
}

.options-center {
  position: absolute;
  bottom: 20px;
  /* 👈 above overlay (adjust if needed) */
  left: 50%;
  transform: translateX(-50%);

  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 500;

  padding: 6px 10px;
  border-radius: 8px;

  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);

  width: 95%;
  pointer-events: none;
}

.options-center div {
  margin: 2px 0;
}


.admin-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
  z-index: 20;
}

.card:hover .admin-edit-btn {
  opacity: 1;
  transform: scale(1);
}

.admin-edit-btn i {
  font-size: 18px;
}


.search-wrapper {
  position: relative;
  width: 40%;
  max-width: 600px;
}

/* input always full inside wrapper */
.search-input {
  width: 100%;
  padding-right: 40px;
}

/* desktop tuning */
@media (max-width: 1200px) {
  .search-wrapper {
    width: 50%;
  }
}

/* tablets */
@media (max-width: 992px) {
  .search-wrapper {
    width: 65%;
  }
}

/* mobile */
@media (max-width: 768px) {
  .search-wrapper {
    width: 100%;
  }
}

/* clear button */
.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  display: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
}

/* ========================= */
/* ✅ MOBILE LAYOUT (FIXED) */
/* ========================= */
@media (max-width: 768px) {

  /* ✅ Default: Grid (2 items per row) */
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }

  /* ✅ Toggle: List (1 item per row) */
  .gallery.list-view {
    grid-template-columns: 1fr;
  }

  .card {
    width: 100%;
    height: auto;
    margin-bottom: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }
}

/* ========================= */
/* ✅ CARD */
/* ========================= */
.card {
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  /* border-radius: 10px; */
  background: black;
  transition: 0.2s ease;
  cursor: pointer;
  border: none !important;
  border-radius: 0 !important;

}

/* Image */
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========================= */
/* ✅ DESKTOP OVERLAY */
/* ========================= */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  color: white;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px;

  opacity: 0;
  transition: 0.25s ease;
}

.card:hover .overlay {
  opacity: 1;
}

.icon {
  width: 25px !important;
}

/* ========================= */
/* ✅ MOBILE OVERLAY */
/* ========================= */
@media (max-width: 768px) {
  .overlay {
    position: static;
    background: #c5c3c3;
    color: white;

    opacity: 1;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 14px;
  }

  .left,
  .right {
    font-size: 18px;
  }

  .icon {
    width: 18px;
  }
}

/* ========================= */
/* COMMON */
/* ========================= */

.left,
.right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.left .icon {
  transform: scale(1.6);
  width: 18px;
  height: auto;
  object-fit: cover;
  color: white;
}

/* ========================= */
/* HOVER (DESKTOP) */
/* ========================= */
@media (min-width: 769px) {
  .card:hover img {
    transform: scale(1.03);
    transition: 0.3s ease;
  }

  .card {
    height: auto;
    /* masonry natural height */
    margin-bottom: 0;
    /* ❌ remove masonry spacing */
    break-inside: avoid;
  }

  .card img {
    height: auto;
    object-fit: cover;
    /* 🔥 important */
  }

  .card:hover .left .icon {
    transform: scale(1.6);
    width: 18px;
    height: auto;
    object-fit: contain;
  }
}

/* ========================= */
/* END MESSAGE */
/* ========================= */
#endMessage {
  text-align: center;
  padding: 25px;
  color: #888;
  font-size: 14px;
}

/* ========================= */
/* ✅ SKELETON BASE */
/* ========================= */
.skeleton-container {
  column-count: 3;
  column-gap: 6px;
  padding: 6px;
}

/* ========================= */
/* ✅ MOBILE SKELETON (FIXED) */
/* ========================= */
@media (max-width: 768px) {
  .skeleton-container {
    column-count: unset;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }

  .skeleton-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* ✅ perfect square */
    border-radius: 10px;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
  }

  /* ✅ CLEAN SHIMMER (MOBILE) */
  .skeleton-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;

    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);

    animation: shimmerMobile 1.2s infinite;
  }

  @keyframes shimmerMobile {
    100% {
      left: 150%;
    }
  }

  /* ❌ remove weird gradient */
  .skeleton-card::before {
    display: none;
  }
}

/* ========================= */
/* ✅ DESKTOP SKELETON */
/* ========================= */
@media (min-width: 769px) {
  .skeleton-card {
    break-inside: avoid;
    margin-bottom: 0px;
    border-radius: 0px;
    overflow: hidden;
    background: #e0e0e0;
    position: relative;

    aspect-ratio: 3 / 4;
  }

  .skeleton-card.tall {
    aspect-ratio: 3 / 5;
  }

  .skeleton-card.wide {
    aspect-ratio: 4 / 3;
  }

  .skeleton-card.square {
    aspect-ratio: 1 / 1;
  }

  /* DESKTOP SHIMMER */
  .skeleton-card::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 70%);

    animation: shimmerDesktop 1.3s infinite;
  }

  @keyframes shimmerDesktop {
    0% {
      transform: translateX(-100%);
    }

    100% {
      transform: translateX(100%);
    }
  }

  /* subtle fade */
  .skeleton-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;

    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.08),
        transparent);
  }


}

@media (max-width: 480px) {

  .options-center {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    width: 90%;
  }

}




.btn-icon {
  width: 45px;
}