/* =========================================
   GAMES SHOWCASE SECTION (MOBILE SLIDER)
   ========================================= */
.showcase-section {
  background-color: var(--app-bg);
  padding: 15px 0;
  overflow: hidden; /* Prevents horizontal page scroll */
}

.swimlane-wrapper {
  position: relative;
  margin-bottom: 12px;
}

/* Header */
.swimlane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px 8px 5px;
}

.swimlane-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.swimlane-nav {
  font-size: 0.85rem;
  color: #f0c24b; /* Gold/Yellow accent */
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}
.swimlane-nav:hover {
  color: #fff;
}

/* The Scroll Area (The Slider) */
.swimlane-scroll-area {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  padding-left: 5px;
  padding-right: 10px;
  scroll-snap-type: none !important;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.swimlane-scroll-area.is-dragging {
  cursor: grabbing;
  cursor: -webkit-grabbing;
  scroll-behavior: auto !important;
}

.swimlane-scroll-area::-webkit-scrollbar {
  display: none;
}

.swimlane-scroll-area.active {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

/* Ensure images don't get dragged natively by the browser */
.game-card img {
  pointer-events: none;
}

/* Game Card - Mobile First */
.game-card {
  flex: 0 0 110px; /* Fixed width, do not shrink/grow */
  width: 110px;
  cursor: pointer;
  position: relative;
  scroll-snap-align: none !important;
}

/* Card Image Container */
.card-media {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* Overlay Effect */
.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.media-overlay i {
  font-size: 2rem;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Text Info */
.card-info {
  margin-top: 8px;
  text-align: left;
}
.game-name {
  display: block;
  color: #e0e0e0;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.provider-name {
  display: block;
  color: #6c757d;
  font-size: 0.7rem;
  margin-top: 2px;
}

/* Badges */
.rank-badge,
.new-badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 800;
  border-bottom-right-radius: 8px;
  z-index: 2;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.rank-1 {
  background: #ffd700;
  color: #000;
}
.rank-2 {
  background: #c0c0c0;
  color: #000;
}
.rank-3 {
  background: #cd7f32;
  color: #fff;
}
.new-badge {
  background: #00c851;
  color: #fff;
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

/* --- DESKTOP ENHANCEMENTS (Min-width 768px) --- */
@media (min-width: 768px) {
  .game-card {
    flex: 0 0 160px; /* Larger cards on desktop */
    width: 160px;
  }
  .swimlane-title {
    font-size: 1.5rem;
  }

  /* Hover effects only on desktop to prevent mobile sticky hover */
  .game-card:hover .media-overlay {
    opacity: 1;
  }
  .game-card:hover .card-media img {
    transform: scale(1.1);
  }
}

@media (max-width: 480px) {
  .showcase-section {
    padding: 4px 0;
  }
}
