/* ──────────────────────────────────────────────────────────────────────
   Home page modern game listing redesign
   - "Son Oynananlar" bölümü gizlenir (üst stripte zaten var)
   - Oyun kartları daha büyük, daha yumuşak köşeli, hover'da glow + scale
   - Responsive grid (2/3/4/5/6 col)
   - Görsel iyileştirmeler: contrast/saturate boost
   - 2P badge, NEW badge, play count rozetleri
   - Bölüm başlıkları daha şık
   ────────────────────────────────────────────────────────────────────── */

/* ── "Son Oynananlar" / "Recently Played" section'ını sakla ────────── */
.hs-hidden { display: none !important; }

/* ── Genel görüntü iyileştirme: oyun thumbnail'leri daha canlı ──────── */
#root a[href^="/game/"] img,
#root [class*="grid"] img {
  image-rendering: -webkit-optimize-contrast;
  filter: saturate(1.08) contrast(1.04);
  transition: filter 0.25s ease, transform 0.25s ease;
}
#root a[href^="/game/"]:hover img {
  filter: saturate(1.15) contrast(1.08) brightness(1.02);
}

/* ── Game card glow up ─────────────────────────────────────────────── */
#root a[href^="/game/"] {
  position: relative;
  border-radius: 14px !important;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  background: #11131a;
}
#root a[href^="/game/"]:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55),
              0 0 0 2px var(--gv-red, #e11d2a),
              0 0 24px rgba(225, 29, 42, 0.35);
  z-index: 2;
}

/* Üst-katman gradient — başlık okunabilirliği için */
#root a[href^="/game/"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 35%,
    transparent 100%);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.22s ease;
  z-index: 1;
}
#root a[href^="/game/"]:hover::after {
  opacity: 1;
}

/* Card resimleri tam kaplasin */
#root a[href^="/game/"] img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

/* Card içindeki title elementi gradient üstünde dursun */
#root a[href^="/game/"] > * {
  position: relative;
  z-index: 2;
}
#root a[href^="/game/"] > img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ── Daha sıkı + responsive grid ─────────────────────────────────────── */
#root .grid[class*="grid-cols"] {
  gap: 12px !important;
}
@media (min-width: 1600px) {
  #root .grid.grid-cols-4 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
@media (min-width: 1280px) and (max-width: 1599px) {
  #root .grid.grid-cols-4 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  #root .grid.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #root .grid.grid-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 639px) {
  #root .grid.grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
}

/* ── Bölüm başlıkları (h2) ───────────────────────────────────────────── */
#root h2 {
  letter-spacing: -0.02em !important;
  position: relative;
}

/* Başlık altında ince kırmızı çubuk */
#root section > h2::after,
#root section > div > h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #e11d2a 0%, #ff3344 100%);
  border-radius: 2px;
  margin-top: 8px;
}

/* ── Badges (JS tarafından eklenir) ──────────────────────────────────── */
.hs-badge {
  position: absolute;
  z-index: 3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-family: 'Nunito', system-ui, sans-serif;
}
.hs-badge-2p {
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
}
.hs-badge-new {
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
}
.hs-badge-hot {
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
  animation: hs-pulse 2s ease-in-out infinite;
}
@keyframes hs-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.hs-badge-featured {
  bottom: 6px;
  right: 6px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1a1a;
}

/* Play count rozeti — sol alt */
.hs-plays {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 3;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 3px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  font-family: 'Nunito', system-ui, sans-serif;
}
.hs-plays svg {
  width: 10px;
  height: 10px;
  fill: #ef4444;
}

/* ── Hero altındaki ilk grid biraz nefes alsın ───────────────────────── */
#root section + section,
#root section + div {
  margin-top: 32px !important;
}

/* ── Loading skeleton — daha modern shimmer ──────────────────────────── */
#root [class*="animate-pulse"] {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%) !important;
  background-size: 200% 100% !important;
  animation: hs-shimmer 1.4s ease-in-out infinite !important;
  border-radius: 14px !important;
}
@keyframes hs-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
