/* ══ Games Page: Game Library Grid & Search ══ */

/* ── Search + sort toolbar (shared across /games A/B variants; not scoped to .games-page) ── */
.games-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto 1.5rem;
}

.games-toolbar .games-search {
    flex: 1 1 260px;
    max-width: 480px;
    margin: 0;
}

.games-toolbar .games-search .input-group-text {
    background-color: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    color: var(--text-muted);
}

.games-sort {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.games-sort-btn {
    font-family: var(--font-display);
    font-size: .9rem;
    font-weight: 600;
    padding: .5rem .95rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: var(--bg-dark);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.games-sort-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.28);
}

.games-sort-btn.active {
    color: #04121b;
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

@media (min-width: 768px) {
    .games-toolbar {
        margin-bottom: 2rem;
    }
}

/* ── Game Card Grid ── */
.games-page .games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .games-page .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .games-page .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.75rem;
    }
}

/* Slightly larger card titles than homepage */
.games-page .top-game-card-title {
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .games-page .top-game-card-title {
        font-size: 0.95rem;
    }
}

/* ── No Results Message (shared) ── */
.games-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
    font-size: 1.05rem;
}

/* Utility: hide cards filtered out by search, or the empty message when there are results. */
.games-hidden { display: none !important; }
