/* Games — hub + per-game pages. Scoped to .gm-* (only present on this plugin's pages), theme-var driven
   so it inherits the active ForgeBoard theme. */
.gm-hub, .gm-page { --gm-line: var(--border-color, rgba(127,127,127,.28)); --gm-mut: var(--muted-color, #8b93a4);
  --gm-gold: #e0ac3e; --gm-accent: var(--link-color, #5aa2e6); max-width: 940px; }

/* ---- letter-tile fallback (shown when there is no box art, or the CDN/CSP blocks it) ---- */
.gm-card-art, .gm-head-art { position: relative; overflow: hidden; background: linear-gradient(135deg, #3a4051, #232735);
  display: flex; align-items: center; justify-content: center; }
.gm-card-art::before, .gm-head-art::before { content: attr(data-initial); position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: rgba(255,255,255,.5); }
.gm-card-art img, .gm-head-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- hub ---- */
.gm-hub-title { font-size: 22px; margin: 0 0 2px; }
.gm-hub-sub { color: var(--gm-mut); margin: 0 0 16px; font-size: 13px; }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gm-card { display: flex; gap: 10px; text-decoration: none; color: inherit; border: 1px solid var(--gm-line);
  border-radius: 8px; overflow: hidden; background: rgba(0,0,0,.12); transition: border-color .12s, background .12s; }
.gm-card:hover { border-color: var(--gm-accent); background: rgba(255,255,255,.04); }
.gm-card-art { flex: 0 0 92px; width: 92px; height: 62px; }
.gm-card-art::before { font-size: 26px; }
.gm-card-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 10px 6px 0; }
.gm-card-name { font-weight: 700; color: var(--gm-gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-card-meta { font-size: 11.5px; color: var(--gm-mut); margin-top: 2px; }

/* ---- game page header ---- */
.gm-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.gm-head-art { flex: 0 0 200px; width: 200px; height: 94px; border-radius: 8px; border: 1px solid var(--gm-line); }
.gm-head-art::before { font-size: 42px; }
.gm-head-name { font-size: 24px; margin: 0 0 4px; }
.gm-head-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--gm-mut); font-size: 13px; }
.gm-steam { color: var(--gm-accent); text-decoration: none; font-weight: 600; }
.gm-steam:hover { text-decoration: underline; }

/* ---- currently playing (live steam presence for this game) ---- */
.gm-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px;
  border: 1px solid var(--gm-line); border-radius: 8px; background: rgba(64,180,96,.07); }
.gm-now-h { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--gm-mut); }
.gm-now-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.gm-now-p { display: inline-flex; align-items: center; gap: 6px; }
.gm-now-p a { color: var(--gm-gold); text-decoration: none; font-weight: 700; }
.gm-now-p a:hover { text-decoration: underline; }
.gm-dot { width: 8px; height: 8px; border-radius: 50%; background: #4bd06a; box-shadow: 0 0 0 3px rgba(75,208,106,.18);
  flex: none; animation: gm-pulse 2s ease-in-out infinite; }
@keyframes gm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---- tabs ---- */
.gm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gm-line); margin-bottom: 16px; }
.gm-tab { font: inherit; font-size: 13px; cursor: pointer; padding: 8px 14px; border: 0; background: none;
  color: var(--gm-mut); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gm-tab:hover { color: var(--text-color, #eef1f6); }
.gm-tab.is-active { color: var(--text-color, #fff); border-bottom-color: var(--gm-gold); }
.gm-count { font-size: 11px; opacity: .7; }

/* ---- screenshots grid ---- */
.gm-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gm-shot { display: block; border-radius: 6px; overflow: hidden; border: 1px solid var(--gm-line); aspect-ratio: 16 / 10; }
.gm-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .18s; }
.gm-shot:hover img { transform: scale(1.04); }

/* ---- players ---- */
.gm-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-player { display: flex; align-items: baseline; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--gm-line); }
.gm-player:last-child { border-bottom: none; }
.gm-player-name { font-weight: 700; color: var(--gm-gold); text-decoration: none; }
.gm-player-name:hover { text-decoration: underline; }
.gm-player-meta { font-size: 12px; color: var(--gm-mut); }

.gm-empty { color: var(--gm-mut); font-size: 13px; padding: 18px 4px; }
