/* =============================================================================
   /top-games — Top-rated games by console
   v2 cyberpunk aesthetic, mirroring /browse (console grid) and /search colors.
   Tapping a console opens a slide-in panel of its highest-rated games.
   ========================================================================== */

/* Hide the Google reCAPTCHA badge (this stylesheet only loads here). */
.grecaptcha-badge { visibility: hidden !important; }

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.topgames-wrap {
    padding: 16px 0 88px;
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.topgames-header {
    text-align: center;
    padding: 4px 16px 22px;
}
.topgames-heading {
    font-family: 'Electrolize', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--v2-text);
    margin: 0 0 5px;
}
.topgames-sub {
    font-family: 'Electrolize', sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.5px;
    color: var(--v2-text-dim);
    margin: 0;
}

/* ── Brand section (mirrors .browse-section / .browse-brand) ───────────────── */
.topgames-section {
    padding: 0 14px 24px;
}
.topgames-brand {
    font-family: 'Electrolize', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--v2-cyan);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--v2-cyan-25);
    display: flex;
    align-items: center;
    gap: 8px;
}
.topgames-brand::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--v2-cyan-25), transparent);
}

/* ── Console grid (mirrors .browse-grid / .browse-card) ───────────────────── */
.topgames-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}
@media (min-width: 480px) {
    .topgames-grid { grid-template-columns: repeat(3, 1fr); }
}
.topgames-card {
    font-family: 'Electrolize', sans-serif;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 217, 255, 0.22);
    border-radius: 8px;
    background: rgba(10, 10, 20, 0.65);
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.topgames-card:active,
.topgames-card:focus-visible {
    border-color: var(--v2-cyan);
    background: rgba(0, 217, 255, 0.06);
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.18);
    outline: none;
}
.topgames-card-art {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    padding: 14px 12px;
    background: #0a0e27;
}
.topgames-card-img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}
.topgames-card-fallback {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    color: var(--v2-text);
    line-height: 1.3;
}
.topgames-card-name {
    padding: 7px 8px 9px;
    font-size: 0.69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
    color: var(--v2-text-dim);
    line-height: 1.3;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
}

/* ── Slide-in panel of top games for a console ────────────────────────────── */
.topgames-menu {
    background: linear-gradient(135deg, var(--v2-bg-0) 0%, var(--v2-bg-1) 100%) !important;
}
.topgames-menu-head {
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--v2-cyan-25);
}
.topgames-menu-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Electrolize', sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--v2-cyan);
    text-decoration: none;
    margin-bottom: 12px;
}
.topgames-menu-logo {
    display: block;
    max-height: 80px;
    max-width: 240px;
    object-fit: contain;
    margin: 2px 0 10px;
}
.topgames-menu-title {
    font-family: 'Electrolize', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--v2-text);
    margin: 0 0 2px;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}
.topgames-menu-sub {
    font-family: 'Electrolize', sans-serif;
    font-size: 0.72rem;
    color: var(--v2-text-dim);
    letter-spacing: 0.5px;
    margin: 0;
}
.topgames-menu-list {
    padding: 10px 12px 4px;
}
.topgames-game {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 217, 255, 0.12);
    border-radius: 8px;
    background: rgba(10, 10, 20, 0.6);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.topgames-game:active,
.topgames-game:focus-visible {
    border-color: var(--v2-cyan);
    background: rgba(0, 217, 255, 0.06);
    outline: none;
}
.topgames-game-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #0a0e27;
}
.topgames-game-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--v2-cyan);
}
.topgames-game-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.topgames-game-name {
    font-family: 'Electrolize', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--v2-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topgames-game-sum {
    font-family: 'Roboto', sans-serif;
    font-size: 0.72rem;
    color: var(--v2-text-dim);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.topgames-game-arrow {
    color: var(--v2-cyan);
    font-size: 0.7rem;
    flex-shrink: 0;
}
.topgames-menu-attribution {
    margin: 4px 16px 12px;
    font-family: 'Electrolize', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
    color: var(--v2-text-dim);
    text-align: center;
}
.topgames-menu-attribution a {
    color: var(--v2-cyan);
    text-decoration: none;
}
.topgames-menu-attribution a:hover {
    text-decoration: underline;
}
.topgames-menu-close {
    display: block;
    margin: 8px 15px 24px;
    background: linear-gradient(135deg, #00d9ff 0%, #00ff41 100%);
    color: #0a0e27;
    border-radius: 6px;
    padding: 13px 20px;
    font-family: 'Electrolize', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.25);
}
