/* Signal Catcher — Matrix mini-game (www.rrmyers.com) */

.page-game .site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.page-game .page-hero--matrix {
  padding-top: calc(var(--header-height) + 1.5rem);
}

.game-shell {
  position: relative;
  background: #050805;
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.12);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: min(72vh, 640px);
  margin: 0 auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
}

.game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: #7cff6b;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.45);
  z-index: 2;
}

.game-hud strong {
  color: #39ff14;
  font-weight: 700;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.78);
  z-index: 3;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.game-overlay[hidden] {
  display: none !important;
}

.game-overlay h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  color: #39ff14;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
}

.game-overlay p {
  margin: 0;
  max-width: 28rem;
  color: #a8e6a8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.game-overlay .muted {
  color: #6a9a6a;
  font-size: 0.8rem;
}

.game-overlay .score-line {
  color: #7cff6b;
  font-size: 1rem;
}

.game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.4rem;
  margin-top: 0.35rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #0a0a0a;
  background: #39ff14;
  border: 2px solid #39ff14;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.game-btn:hover,
.game-btn:focus {
  background: #7cff6b;
  border-color: #7cff6b;
  outline: none;
}

.game-btn:active {
  transform: scale(0.98);
}

.game-howto {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text);
}

.game-howto li {
  margin: 0.4rem 0;
  padding-left: 1.1rem;
  position: relative;
}

.game-howto li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #39ff14;
}

.game-howto .signal {
  color: #39ff14;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.game-howto .noise {
  color: #ff4d4d;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.game-teaser {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 10px;
  background: rgba(13, 31, 14, 0.55);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92rem;
}

.game-teaser a {
  color: #39ff14;
  font-weight: 600;
}

.game-teaser a:hover,
.game-teaser a:focus {
  color: #7cff6b;
}

.game-teaser .teaser-tag {
  display: inline-block;
  margin-right: 0.35rem;
  color: #66bb6a;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 520px) {
  .game-shell {
    aspect-ratio: 3 / 4;
    max-height: min(68vh, 560px);
  }

  .game-hud {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-btn {
    transition: none;
  }

  .game-shell {
    box-shadow: none;
  }
}

/* 20260928e: Share score (RRShare) inside the game-over overlay */
.game-overlay .sc-share-btn {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}

.game-overlay .sc-share-btn[hidden] {
  display: none !important;
}
