/* ============================================================
   GAMEHUB — Games Page Styles
   ============================================================ */

body { padding-top: var(--nav-height); }

/* ── Category Page Banner (full-width, above filter buttons) ── */
.category-page-banner {
  position: relative;
  width: 100%;
  /* No fixed height on desktop — image displays at its real natural height */
  overflow: hidden;
  background: var(--bg-secondary);
}
.cat-page-banner-img {
  width: 100%;
  height: auto;        /* natural height — no cropping */
  display: block;
  max-width: 100%;
}
.cat-page-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,12,26,0.20) 0%,
    rgba(8,12,26,0.75) 100%
  );
}
.cat-page-banner-text {
  position: absolute;
  bottom: 32px; left: 80px; right: 80px;
  z-index: 2;
}
.cat-page-banner-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.cat-page-banner-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 900; color: #fff; margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
  word-break: break-word;
}

/* ── Games Hero ── */
.games-hero {
  padding: 60px 80px 50px;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(79,110,247,0.08) 0%, transparent 70%);
}
/* When a banner is shown above, reduce top padding */
.games-hero.has-banner { padding-top: 32px; }

.games-hero h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900; margin-bottom: 8px;
}
.games-hero p { color: var(--text-muted); font-size: 16px; }

.games-filters {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px;
}
.filter-btn {
  padding: 8px 18px; border-radius: 30px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.04); color: var(--text-muted);
  font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 14px;
  transition: all 0.25s; text-decoration: none;
  display: inline-block;
}
.filter-btn.active, .filter-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
}

.games-content { padding: 0 80px 80px; }

.genre-section { margin-bottom: 50px; }
.genre-title {
  font-family: 'Orbitron', monospace;
  font-size: 16px; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.genre-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border2);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.game-grid-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border2);
  transition: all 0.3s;
  text-decoration: none; color: inherit; display: block;
}
.game-grid-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79,110,247,0.3);
  box-shadow: var(--glow);
}

.game-grid-img {
  height: 160px; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; overflow: hidden;
}
.game-grid-img img {
  width: 100%; height: 100%;
  object-fit: cover; position: absolute; inset: 0;
}
.game-grid-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,12,26,0.95) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s;
}
.game-grid-card:hover .game-grid-overlay { opacity: 1; }

.game-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.game-grid-card:hover .game-play-btn { opacity: 1; }

.play-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(79,110,247,0.9);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 24px rgba(79,110,247,0.6);
  transform: scale(0.8); transition: transform 0.25s;
}
.game-grid-card:hover .play-icon { transform: scale(1); }

.game-grid-info { padding: 14px; }
.game-grid-name {
  font-family: 'Exo 2', sans-serif;
  font-size: 15px; font-weight: 600; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-grid-meta { display: flex; align-items: center; justify-content: space-between; }
.game-genre-tag {
  font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px; border-radius: 4px;
}
.game-plays-count {
  font-size: 11px; color: var(--text-dim);
}

/* No games state */
.no-games {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.no-games-icon { font-size: 64px; margin-bottom: 16px; }
.no-games h3 {
  font-family: 'Orbitron', monospace;
  font-size: 18px; margin-bottom: 8px;
}

/* Extra card colours */
.gc-default { background: linear-gradient(135deg,#111830,#0f1525); }
.gc-cyber   { background: linear-gradient(135deg,#1a0a00,#2a1500); }
.gc-elden   { background: linear-gradient(135deg,#0a0500,#1a1000); }
.gc-star    { background: linear-gradient(135deg,#000814,#001440); }
.gc-zelda   { background: linear-gradient(135deg,#001a0a,#002a15); }
.gc-bg3     { background: linear-gradient(135deg,#0a001a,#150028); }
.gc-gow     { background: linear-gradient(135deg,#1a0000,#2a0500); }
.gc-halo    { background: linear-gradient(135deg,#1a2a4a,#0d1a33); }
.gc-val     { background: linear-gradient(135deg,#1a0d0d,#2a1500); }
.gc-fortnite{ background: linear-gradient(135deg,#1a0d2e,#0f1a33); }
.gc-dead    { background: linear-gradient(135deg,#1a0d0d,#2a1a1a); }
.gc-ori     { background: linear-gradient(135deg,#0d2a1a,#0f331a); }
.gc-skull   { background: linear-gradient(135deg,#1a0d2a,#0d0d33); }
