/* Shared shell for the Games overlay variations. Animates transform/opacity only. */
.gx {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #050506;
  color: #fff;
  font-family: var(--body, 'Sora', system-ui, sans-serif);
  font-weight: 300;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 18px, 0) scale(.985);
  transition: opacity .38s var(--ease, ease), transform .55s var(--ease, ease), visibility 0s linear .55s;
  overscroll-behavior: contain;
}
.gx.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.gx *, .gx *::before, .gx *::after { box-sizing: border-box; }
.gx-body {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.gx a { color: inherit; text-decoration: none; }
.gx img { display: block; }
.gx button { font: inherit; color: inherit; }

.gx-close {
  position: absolute;
  z-index: 30;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(8,8,10,.78);
  cursor: pointer;
  transition: transform .35s var(--ease, ease), background .3s;
}
.gx-close svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; fill: none; }
.gx-close:hover { background: rgba(255,255,255,.16); transform: rotate(90deg); }

.gx :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.gx-h {
  font-family: var(--display, 'Archivo', system-ui, sans-serif);
  font-weight: 900;
  font-variation-settings: 'wdth' 122;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .95;
  overflow-wrap: break-word;
}

/* live dot: the only green on the page */
.gx-dot { position: relative; flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live, #3ddc84); }
.gx-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: gxPulse 2.4s ease-out infinite; }
.gx:not(.is-open) .gx-dot::after { animation: none; }
@keyframes gxPulse { from { transform: scale(1); opacity: .55; } to { transform: scale(3); opacity: 0; } }
.gx-live { display: inline-flex; align-items: center; gap: .55em; font-family: var(--mono, ui-monospace, monospace); }
.gx-live b { color: var(--live, #3ddc84); font-weight: 500; font-variant-numeric: tabular-nums; }
.gx-live-l { font-size: .8em; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }

.gx-stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; }
.gx-stat { display: grid; gap: 5px; }
.gx-stat dt { font-family: var(--mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8d8d95; }
.gx-stat dd { margin: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 15px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.gx-stat b { font-weight: 500; }

.gx .gx-play {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  padding: .95em 1.5em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .4s var(--ease, ease);
}
.gx-play svg { width: 15px; height: 15px; stroke: #000; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; transition: transform .4s var(--ease, ease); }
a:hover > .gx-play svg, .gx-play:hover svg { transform: translate3d(4px,0,0); }

.gx-icon { border-radius: 22%; object-fit: cover; background: #111; border: 1px solid rgba(255,255,255,.22); }
.gx img.is-icon { object-fit: contain; padding: 14%; background: radial-gradient(circle at 50% 40%, #1c1c20, #060607 70%); }

.gx-msg { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #9a9aa2; }
.gx-retry { padding: .9em 1.6em; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: transparent; font-family: inherit; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .gx, .gx * , .gx *::before, .gx *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .gx { transform: none; }
}
