/* Index / home feed: landing, trending marquee, filter marquee, search state */

.gp-landing-card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.gp-landing-card:hover {
  border-color: #4b5563;
  transform: translateY(-1px);
}

.gp-landing.gp-landing-collapsed {
  display: none;
}

/* Trending marquee */
.gp-trending-wrap {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.gp-trending-track {
  display: flex;
  width: max-content;
  gap: 0.75rem;
  animation: gp-trending-scroll 100s linear infinite;
}

.gp-trending-wrap:hover .gp-trending-track {
  animation-play-state: paused;
}

.gp-trending-wrap.gp-marquee-touching .gp-trending-track {
  animation-play-state: paused;
}

@keyframes gp-trending-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.gp-trending-card {
  flex: 0 0 auto;
  width: min(280px, 72vw);
  max-width: 280px;
  border: 1px solid #272b31;
  border-radius: 1rem;
  background: #181b20;
  padding: 0.875rem 1rem;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gp-trending-card:hover {
  border-color: #4b5563;
  transform: translateY(-1px);
}

.gp-trending-card-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
}

.gp-trending-card-thumb {
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  border: 1px solid #272b31;
  object-fit: cover;
}

.gp-trending-card-thumb-placeholder {
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  border: 1px solid #272b31;
  background: #0f1115;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.gp-trending-card-text {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.gp-trending-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-trending-card-stats {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.625rem;
  color: #6b7280;
  line-height: 1.2;
}

.gp-trending-card-stats span {
  white-space: nowrap;
}

/* Category filter marquee */
.gp-filter-marquee {
  position: relative;
  overflow: hidden;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.gp-filter-marquee-track {
  display: flex;
  width: max-content;
  gap: 0.5rem;
  animation: gp-filter-scroll 36s linear infinite;
}

.gp-filter-marquee:hover .gp-filter-marquee-track {
  animation-play-state: paused;
}

.gp-filter-marquee.gp-marquee-touching .gp-filter-marquee-track {
  animation-play-state: paused;
}

/* Mobile / touch: native horizontal scroll + JS auto-scroll (CSS animation disabled here) */
@media (max-width: 1023px) {
  .gp-trending-wrap,
  .gp-filter-marquee {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
  }

  .gp-trending-wrap::-webkit-scrollbar,
  .gp-filter-marquee::-webkit-scrollbar {
    display: none;
  }

  .gp-trending-track,
  .gp-filter-marquee-track {
    animation: none !important;
    transform: none !important;
  }
}

@keyframes gp-filter-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.gp-filter-chip {
  flex-shrink: 0;
  cursor: pointer;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
  user-select: none;
}

.gp-filter-chip-active {
  background: #272b31;
  color: #fff;
}

.gp-filter-chip-inactive {
  background: #181b20;
  border: 1px solid #272b31;
  color: #9ca3af;
}

.gp-filter-chip-inactive:hover {
  color: #fff;
}

.gp-feed-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed #272b31;
  border-radius: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}
