/* =============================================================================
   /browse/<console> — A-Z game index for one console
   Layered on top of search/main.css, which already provides the .browse-page
   shell, the .search-* box and the .pagination controls. Everything here is the
   game grid: a portrait cover (IGDB box art) with the game name beneath it.
   ========================================================================== */

/* ── Back link ────────────────────────────────────────────────────────────── */
/* The row spans the content width so the link's left edge lines up with the
   game grid below, not the wider .container; the link itself stays
   inline-block so only the text is clickable. */
.browse-back-row {
    max-width: 1100px;
    margin: 20px auto 0;
}
.browse-back {
    font-family: 'Electrolize', sans-serif;
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--console-cyan);
    text-decoration: none;
}
.browse-back:hover {
    color: #00ff41;
}

/* ── Listings link ────────────────────────────────────────────────────────── */
.browse-listings-cta {
    font-family: 'Electrolize', sans-serif;
    text-align: center;
    margin: 0 0 26px;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}
.browse-listings-cta a {
    color: var(--console-cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.35);
    padding-bottom: 2px;
}
.browse-listings-cta a:hover {
    color: #00ff41;
    border-bottom-color: rgba(0, 255, 65, 0.5);
}

/* ── Search box ───────────────────────────────────────────────────────────── */
/* search/main.css centres .search-section on the landing hero; this page wants
   it as a compact bar above the grid. */
.browse-search {
    max-width: 640px;
    margin: 0 auto 32px;
}
.browse-clear {
    font-family: 'Electrolize', sans-serif;
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--console-muted);
    text-decoration: underline;
}
.browse-clear:hover {
    color: var(--console-cyan);
}

/* ── Game grid ────────────────────────────────────────────────────────────── */
/* Narrower track than .browse-grid (console logos): box art is portrait, so more
   of them fit per row. */
.browse-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.browse-game-card {
    font-family: 'Electrolize', sans-serif;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--console-border);
    border-radius: 8px;
    background: var(--console-card);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.browse-game-card:hover {
    border-color: var(--console-cyan);
    background: rgba(0, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.18);
}

/* Fixed 3:4 plate so a missing or odd-ratio cover can't make one card taller
   than its row-mates; the art is contained inside it rather than cropped. Same
   deep-navy backing as .browse-card-art. */
.browse-game-art {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    background: #0a0e27;
}
.browse-game-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* No cover: fall back to the title itself rather than an empty plate. */
.browse-game-noart {
    padding: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: var(--console-muted);
}

/* Two lines max, ellipsised — long titles stay inside the tile. */
.browse-game-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.1em;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-align: center;
    color: var(--console-text);
    line-height: 1.35;
    transition: color 0.15s ease;
}
.browse-game-card:hover .browse-game-name {
    color: #fff;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.browse-empty {
    font-family: 'Electrolize', sans-serif;
    text-align: center;
    padding: 48px 16px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--console-muted);
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
/* .page-btn in search/main.css is sized for a <button>; these are links and a
   disabled <span>, so they need the box + centring made explicit. */
.browse-pagination {
    justify-content: center;
    margin: 32px 0 8px;
}
.browse-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.browse-pagination .page-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}
