/* /games and /games/<id>. Colours from marketing.css (the gaming theme's --uc), status.css (st-facts, st-sources) and
   maps.css (the night map). Everything here is scoped to .gm-page so the shared sheets stay untouched. */

.gm-page { --gm-good: #6ee7a8; --gm-fair: #f7d774; --gm-poor: #ff8a7a; --gm-ping: #8fc7ff; --gm-panel: #15161d; }

/* ---------- Game page hero: the copy, and the app's Game servers panel beside it ---------- */
.gm-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 56px; margin-top: 28px; padding: 64px 56px; border: 1px solid var(--border); border-radius: 28px; overflow: hidden; background: #0a0b0f; }
.gm-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(46% 70% at 84% 42%, color-mix(in srgb, var(--uc) 16%, transparent), transparent 70%), radial-gradient(50% 70% at 0% 100%, #4f5bff12, transparent 70%); }
.gm-hero-copy { min-width: 0; }
.gm-hero-id { display: flex; align-items: center; gap: 14px; }
.gm-hero-id img { flex: none; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px #ffffff14, 0 12px 30px -12px #000; }
.site .gm-hero .eyebrow { margin: 0; font: 600 14px var(--mono); letter-spacing: .02em; color: var(--uc); }
.site .gm-hero h1 { margin: 22px 0 0; max-width: none; font-size: clamp(38px, 4.6vw, 60px); font-weight: 680; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.gm-hero h1 span { display: block; margin-top: 8px; font-size: .52em; font-weight: 600; letter-spacing: -.015em; color: var(--text-3); }
.site .gm-hero .page-lead { margin: 22px 0 0 !important; max-width: 44ch; text-wrap: pretty; color: #d2d2dc; }
.gm-hero .hero-actions { justify-content: flex-start; margin-top: 30px; }
.gm-hero .hero-trust { justify-content: flex-start; }

.gm-panel-wrap { margin: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; }
.gm-panel-wrap figcaption { font-size: 13px; color: var(--text-3); }
.gm-panel { width: 100%; max-width: 420px; padding: 16px; border-radius: 20px; background: linear-gradient(180deg, #1a1b23, #121319); box-shadow: 0 0 0 1px #ffffff14, 0 40px 90px -30px #000, inset 0 1px 0 #ffffff0d; font-size: 14px; color: var(--text-2); text-align: start; }
.gm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gm-panel-title { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-3); }
.gm-panel-pick { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 10px 5px 6px; border-radius: 9px; background: #ffffff0d; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-panel-pick img { flex: none; border-radius: 5px; }
.gm-panel-best { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--gm-ping) 8%, #ffffff05); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gm-ping) 30%, transparent); }
.gm-panel-best > div { display: grid; gap: 2px; min-width: 0; }
.gm-panel-best b { font-size: 13px; font-weight: 600; color: var(--gm-ping); }
.gm-panel-best > div > strong { font-size: 20px; font-weight: 650; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.gm-panel-best span { font-size: 13px; color: var(--text-3); }
.gm-panel-best .gm-panel-ms { justify-items: end; text-align: end; }
.gm-panel-ms strong { font-size: 30px; font-weight: 680; letter-spacing: -.02em; color: var(--gm-ping); font-variant-numeric: tabular-nums; white-space: nowrap; }
.site .gm-panel-rows { display: grid; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.site .gm-panel-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 34% 54px; align-items: center; gap: 12px; max-width: none; margin: 0; padding: 6px 2px; font-size: 14px; line-height: 1.3; }
.gm-panel-rows span { display: grid; min-width: 0; }
.gm-panel-rows strong { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-panel-rows small { font-size: 12px; color: var(--text-3); }
.gm-panel-rows i { position: relative; height: 5px; border-radius: 3px; background: #ffffff12; overflow: hidden; }
.gm-panel-rows i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: color-mix(in srgb, var(--gm-ping) 70%, #4a6a9a); }
.gm-panel-rows b { font-weight: 600; color: var(--text); text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.site .gm-panel-more { margin: 6px 0 0; font-size: 14px; color: var(--text-3); }
.gm-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.gm-panel-btn { padding: 7px 14px; border-radius: 9px; background: #f4f4f7; font-weight: 600; color: #0b0c10; }
.gm-panel-overlay { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: #c9b8ff; }

/* In-page links under the hero */
.site .gm-jump { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin: 20px 0 0; padding: 0; }
.gm-jump a { flex: none; white-space: nowrap; padding: 7px 14px; border: 1px solid var(--border); border-radius: 99px; font-size: 14px; color: var(--text-2); transition: border-color .15s, color .15s; }
.gm-jump a:hover { border-color: color-mix(in srgb, var(--uc) 50%, transparent); color: var(--text); }
.gm-jump a:focus-visible, .gm-others a:focus-visible, .gm-card:focus-visible { outline: 2px solid var(--uc); outline-offset: 2px; }

/* ---------- Regions: the map with a count per area, then a table per area ---------- */
.gm-map { margin-top: 36px; }
.gm-map .nm { border-radius: 20px; }
/* The map spans the column, so its pins and labels are drawn smaller than NightMap's default for a card. */
.gm-map .nm-pin circle { r: 1px; }
.gm-map .nm-pin .nm-ring { r: 2.4px; }
.gm-map .nm-label { font-size: 3.2px !important; stroke-width: .8px !important; }
.site .gm-areas { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.site .gm-areas li { margin: 0; padding: 5px 11px; border-radius: 999px; background: #ffffff08; box-shadow: inset 0 0 0 1px #ffffff12; font-size: 13px; line-height: 1.4; color: var(--text-3); }
.gm-areas b { color: var(--text); font-weight: 600; }

.gm-groups { columns: 2; column-gap: 20px; margin-top: 40px; }
.gm-groups--wide { columns: 1; }
.gm-group { break-inside: avoid; padding-bottom: 28px; }
.site .gm-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font: 600 13px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.gm-group h3 span { color: var(--uc); }
.gm-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, #ffffff06, #ffffff01); }
.gm-table-wrap:focus-visible { outline: 2px solid var(--uc); outline-offset: 3px; }
.gm-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; text-align: start; }
.gm-table th, .gm-table td { padding: 11px 16px; border-bottom: 1px solid #ffffff0f; text-align: start; vertical-align: top; }
.gm-table tbody tr:last-child > * { border-bottom: 0; }
.gm-table tbody tr:hover > * { background: #ffffff05; }
.gm-table thead th { font: 600 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: #ffffff04; }
.gm-table th:nth-child(1) { width: 40%; }
.gm-table th:nth-child(2) { width: 26%; }
.gm-table--cloud th:nth-child(1) { width: 24%; }
.gm-table--cloud th:nth-child(2) { width: 20%; }
.gm-table--cloud th:nth-child(3) { width: 18%; }
.gm-table tbody th { font-weight: 600; color: var(--text); }
.gm-table td { color: var(--text-2); }
.site .gm-table code { font: 13px var(--mono); color: var(--text-2); background: none; padding: 0; overflow-wrap: anywhere; }
.gm-table small { display: block; margin-top: 2px; color: var(--text-3); font-size: 13px; }

/* ---------- Down or you: four answers, each with a row of region dots ---------- */
.gm-verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.gm-verdict { display: grid; gap: 14px; align-content: start; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: #ffffff04; }
.site .gm-verdict p { margin: 0; max-width: none; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.gm-verdict strong { font-weight: 620; color: var(--text); }
.gm-dots { display: flex; gap: 6px; }
.gm-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--gm-good); box-shadow: 0 0 10px -2px currentColor; color: var(--gm-good); }
.gm-dots .gm-dot--off { background: transparent; box-shadow: inset 0 0 0 1.5px #ffffff38; }
.gm-dots .gm-dot--slow { background: var(--gm-fair); color: var(--gm-fair); }

/* ---------- Ping grades, with a scale above them ---------- */
.gm-scale { margin-top: 36px; }
.gm-scale-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gm-good) 0 33.3%, var(--gm-fair) 33.3% 66.6%, var(--gm-poor) 66.6%); opacity: .85; }
.gm-scale-ticks { position: relative; height: 16px; margin-top: 8px; font: 12px var(--mono); color: var(--text-3); }
.gm-scale-ticks span { position: absolute; top: 0; white-space: nowrap; }
.gm-scale-ticks span:nth-child(1) { inset-inline-start: 0; }
.gm-scale-ticks span:nth-child(2) { left: 33.3%; transform: translateX(-50%); }
.gm-scale-ticks span:nth-child(3) { left: 66.6%; transform: translateX(-50%); }
.gm-scale-ticks span:nth-child(4) { inset-inline-end: 0; }
[dir="rtl"] .gm-scale-bar { transform: scaleX(-1); }
[dir="rtl"] .gm-scale-ticks span:nth-child(2) { left: auto; right: 33.3%; transform: translateX(50%); }
[dir="rtl"] .gm-scale-ticks span:nth-child(3) { left: auto; right: 66.6%; transform: translateX(50%); }
.gm-grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.gm-grades > div { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--gm) 6%, #ffffff03); }
.gm-good { --gm: var(--gm-good); }
.gm-fair { --gm: var(--gm-fair); }
.gm-poor { --gm: var(--gm-poor); }
.site .gm-grades h3 { margin: 0; font: 600 13px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--gm); }
.gm-grades strong { display: block; margin-top: 10px; font-size: 26px; font-weight: 680; letter-spacing: -.02em; color: var(--text); }
.site .gm-grades p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }

.gm-term { margin-top: 24px; }
.gm-fixes .hub-card strong { font-size: 17px; }

/* ---------- Other games: icon chips ---------- */
.site .gm-others { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.site .gm-others li { margin: 0; max-width: none; font-size: 15px; }
.gm-others a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: #ffffff03; color: var(--text-2); line-height: 1.3; transition: border-color .15s, color .15s; }
.gm-others a:hover { border-color: color-mix(in srgb, var(--uc) 45%, transparent); color: var(--text); }
.gm-others img, .gm-noicon { flex: none; width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px #ffffff14; }
.gm-noicon { background: #ffffff0d; }

@media (max-width: 960px) {
  .gm-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 48px 32px; }
  .gm-groups { columns: 1; }
}
@media (max-width: 820px) {
  .gm-grades, .gm-verdicts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .gm-hero { margin-top: 16px; padding: 32px 20px 24px; border-radius: 22px; }
  .gm-panel { padding: 14px; }
  .gm-panel-ms strong { font-size: 26px; }
  .gm-table .gm-host { display: none; }
  .gm-table th, .gm-table td { padding: 10px 12px; }
  .gm-table th:nth-child(1), .gm-table--cloud th:nth-child(1) { width: 50%; }
  .gm-table th:nth-child(2), .gm-table--cloud th:nth-child(2), .gm-table--cloud th:nth-child(3) { width: auto; }
  .site .gm-others { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site .gm-jump { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .gm-panel-title svg { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gm-jump a, .gm-others a { transition: none; } }

/* ---------- The /games hub: copy over the map of every region, then the cards ---------- */
.gm-hub-hero { position: relative; isolation: isolate; margin-top: 28px; padding: 64px 56px 0; border: 1px solid var(--border); border-radius: 28px; overflow: hidden; background: #0a0b0f; text-align: center; }
.gm-hub-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--uc) 12%, transparent), transparent 70%); }
.gm-hub-copy { max-width: 760px; margin: 0 auto; }
.site .gm-hub-hero .eyebrow { margin: 0; font: 600 14px var(--mono); letter-spacing: .02em; color: var(--uc); }
.site .gm-hub-hero h1 { margin: 18px auto 0; max-width: 16ch; font-size: clamp(38px, 5vw, 62px); font-weight: 680; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.site .gm-hub-hero .page-lead { margin: 22px auto 0 !important; max-width: 56ch; text-wrap: pretty; color: #d2d2dc; }
.gm-hub-hero .page-lead a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.gm-hub-hero .hero-actions { justify-content: center; margin-top: 30px; }
.gm-hub-map.nm { margin: 40px -56px 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%); mask-image: linear-gradient(180deg, transparent, #000 22%); }
.gm-hub-map .nm-pin circle { r: .8px; }
.gm-hub-map .nm-pin .nm-ring { r: 2px; }

.gm-cards .gm-card { gap: 10px; }
.gm-card-head { display: flex; align-items: center; gap: 14px; }
.gm-card-head img, .gm-card-head .gm-noicon { flex: none; width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 0 0 1px #ffffff14, 0 10px 24px -14px #000; }
.hub-card .gm-card-head strong { margin: 0; font-size: 17px; line-height: 1.25; }
.gm-card:hover { border-color: color-mix(in srgb, var(--uc) 45%, transparent); }
.gm-card em { color: var(--uc); }
.gm-table--why th:nth-child(1) { width: 28%; }
.gm-table--why th:nth-child(2) { width: auto; }
@media (max-width: 960px) { .gm-hub-hero { padding: 48px 32px 0; } .gm-hub-map.nm { margin-inline: -32px; } }
@media (max-width: 640px) {
  .gm-hub-hero { margin-top: 16px; padding: 36px 20px 0; border-radius: 22px; }
  .gm-hub-map.nm { margin: 28px -20px 0; }
  .gm-table--why th:nth-child(1) { width: 38%; }
}
