/* ============================================================
   LOGINN GAMING CAFE — css/games.css
   Games Library — card grid with search + filter
============================================================ */

/* ─── SEARCH BAR ─────────────────────────────────────────── */
.games-search-wrap {
  display: flex; justify-content: center; margin-bottom: 20px;
}
.games-search {
  position: relative; width: 100%; max-width: 480px;
}
.games-search i {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.9rem; pointer-events: none;
}
.games-search input {
  width: 100%; padding: 12px 16px 12px 44px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text);
  font-family: var(--f-heading); font-size: 0.85rem; font-weight: 500;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.games-search input::placeholder { color: var(--text-muted); }
.games-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.12);
}

/* ─── FILTER BAR ─────────────────────────────────────────── */
.games-filter {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 36px;
}
.filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 100px;
  font-family: var(--f-heading); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; min-height: 44px; touch-action: manipulation;
}
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #000; font-weight: 700; }

/* ─── CARD GRID ──────────────────────────────────────────── */
.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  min-height: 200px;
}

/* ─── GAME CARD ──────────────────────────────────────────── */
.game-card {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 0;
  display: flex; flex-direction: column; gap: 0;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  cursor: default;
  /* reveal start */
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.22s, box-shadow 0.22s;
}
.game-card.revealed {
  opacity: 1; transform: translateY(0);
}
/* Glow strip at top */
.game-card-glow {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--glow, var(--blue));
  opacity: 0.7;
}

/* Removed Image Container and fallbacks */

/* Card body */
.game-card-body { 
  display: flex; flex-direction: column; flex: 1; 
  padding: 24px; 
}

.game-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.game-card-platform { display: flex; flex-wrap: wrap; gap: 4px; }

.pill-platform {
  font-family: var(--f-display); font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.1em; padding: 2px 7px; border-radius: 4px;
}
.pill-platform.pc   { background: var(--blue-dim);        color: var(--blue);  }
.pill-platform.ps5  { background: var(--pink-dim);        color: var(--pink);  }
.pill-platform.xbox { background: var(--green-dim);       color: var(--green); }
.pill-platform.sim  { background: rgba(255,200,0,0.12);   color: #ffc800;      }

/* Title */
.game-card-title {
  font-family: var(--f-heading); font-size: 1.1rem; font-weight: 700;
  color: var(--text); line-height: 1.2; margin: 0 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Genre */
.game-card-genre {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
  display: flex; align-items: center; gap: 5px; margin-bottom: 10px;
}
.game-card-genre i { font-size: 0.65rem; }

/* Tags */
.game-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 8px; }
.game-tag {
  font-family: var(--f-heading); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.04em; padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-muted); transition: color 0.2s, border-color 0.2s;
}

/* Availability badge */
.game-card-avail {
  display: flex; align-items: center; gap: 6px;
  margin-top: auto; padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--f-heading); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--green);
}
.avail-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50%       { opacity: 0.5; box-shadow: 0 0 2px var(--green); }
}

/* ─── EMPTY STATE ────────────────────────────────────────── */
.games-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; color: var(--text-muted);
}
.games-empty i { font-size: 2rem; margin-bottom: 12px; display: block; opacity: 0.4; }
.games-empty p { font-family: var(--f-heading); font-size: 0.9rem; }

/* ─── STATS ROW ──────────────────────────────────────────── */
.games-stats {
  display: flex; align-items: center; justify-content: center; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  max-width: 560px; margin: 0 auto 48px;
}
.games-stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 16px; background: rgba(255,255,255,0.02); }
.games-stat-num { font-family: var(--f-display); font-size: 1.4rem; font-weight: 900; color: var(--blue); line-height: 1; }
.games-stat-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.05em; }
.games-stat-divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }
.games-stat:nth-child(3) .games-stat-num { color: var(--pink); }
.games-stat:nth-child(5) .games-stat-num { color: var(--green); }

/* ─── REQUEST CTA ────────────────────────────────────────── */
.games-request {
  text-align: center; padding: 32px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); max-width: 560px; margin: 0 auto;
}
.games-request-title {
  font-family: var(--f-heading); font-size: 1.1rem; font-weight: 700;
  color: #fff; margin-bottom: 8px;
}
.games-request-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .games-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .games-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card-body  { padding: 18px; }
  .game-card-avail { padding: 14px 18px; }
  .game-card-title { font-size: 0.82rem; }
}
@media (max-width: 640px) {
  .games-filter {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .games-filter::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }
  .games-stats { flex-direction: column; max-width: 280px; }
  .games-stat { width: 100%; }
  .games-stat-divider { width: 80%; height: 1px; }
}

/* ─── GAME COVER IMAGE ───────────────────────────────────── */
/* Add this block to your existing games.css */

.game-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.game-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* ─── HOVER — POINTER DEVICES ONLY ──────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover { border-color: var(--blue); color: var(--blue); }

  .game-card:hover {
    border-color: color-mix(in srgb, var(--glow, var(--blue)) 60%, transparent);
    box-shadow: 0 0 24px color-mix(in srgb, var(--glow, var(--blue)) 20%, transparent);
    transform: translateY(-3px);
  }
  .game-card:hover .game-card-glow { opacity: 1; }

  .game-card:hover .game-tag {
    border-color: color-mix(in srgb, var(--glow, var(--blue)) 30%, transparent);
    color: color-mix(in srgb, var(--glow, var(--blue)) 80%, var(--text-muted));
  }

  .game-card:hover .game-card-img img { transform: scale(1.05); }
}