/* Gadget Snake — page-local styles. Site CSS stays at ?v=20261114c31. */
.gs-page { padding: 20px 0 48px; }
.gs-page .page-hero { padding: 20px 0 4px; }
.gs-page .page-hero p { max-width: 640px; }

.gs-shell {
  max-width: 480px;
  margin: 16px auto 8px;
  background: #050814;
  border: 1px solid rgba(92, 246, 255, 0.28);
  box-shadow:
    0 0 28px rgba(168, 85, 255, 0.14),
    0 0 0 1px rgba(125, 255, 58, 0.08);
  border-radius: 16px;
  overflow: hidden;
}
.gs-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aabc0;
  background: #080d18;
  border-bottom: 1px solid rgba(92, 246, 255, 0.16);
  font-variant-numeric: tabular-nums;
}
.gs-hud b { color: #7dffc5; font-weight: 800; letter-spacing: 0.02em; }
.gs-hud-end { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.gs-mute {
  appearance: none;
  border: 1px solid rgba(92, 246, 255, 0.35);
  background: transparent;
  color: #d7deee;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}
.gs-mute[aria-pressed="false"] {
  border-color: rgba(125, 255, 58, 0.55);
  color: #7dffc5;
}
.gs-mute:hover { color: #5cf6ff; }

/* Closed neon frame around the play area, matching Alien Invasion. */
.gs-stage {
  position: relative;
  background: #050b16;
  border: 2px solid rgba(125, 255, 58, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(92, 246, 255, 0.22),
    0 0 16px rgba(125, 255, 58, 0.28),
    0 8px 18px rgba(125, 255, 58, 0.2);
  z-index: 1;
}
.gs-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(92, 246, 255, 0.45),
    #7dffc5 22%,
    #b6ff3b 50%,
    #7dffc5 78%,
    rgba(92, 246, 255, 0.45)
  );
  box-shadow:
    0 0 8px rgba(125, 255, 58, 0.95),
    0 0 18px rgba(125, 255, 58, 0.6),
    0 4px 14px rgba(92, 246, 255, 0.35);
  pointer-events: none;
  z-index: 2;
}
#gs-game {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  background: #050b16;
  touch-action: none;
  cursor: pointer;
}

.gs-status {
  margin: 0;
  padding: 8px 12px 0;
  text-align: center;
  color: #9aabc0;
  font-size: 13px;
  min-height: 1.3em;
}
.gs-play {
  display: block;
  margin: 8px auto 0;
  appearance: none;
  border: 0;
  background: linear-gradient(90deg, #5cf6ff, #a855ff);
  color: #050b16;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  min-height: 44px;
}
.gs-play[hidden] { display: none; }
.gs-play:hover { filter: brightness(1.08); }

.gs-controls {
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    ". up ."
    "left down right";
  gap: 8px;
  padding: 12px;
  background: #080d18;
  border-top: 1px solid rgba(92, 246, 255, 0.16);
}
.gs-up { grid-area: up; }
.gs-left { grid-area: left; }
.gs-down { grid-area: down; }
.gs-right { grid-area: right; }
.gs-btn {
  appearance: none;
  border: 1px solid rgba(92, 246, 255, 0.3);
  background: #121a2c;
  color: #edf4ff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 12px;
  min-height: 48px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.gs-btn:active { background: rgba(92, 246, 255, 0.16); color: #5cf6ff; }

@media (max-width: 800px), (pointer: coarse) {
  .gs-controls { display: grid; }
}

.gs-hint {
  margin: 10px auto 8px;
  max-width: 480px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.game-more {
  margin: 0 auto 28px;
  max-width: 480px;
  text-align: center;
  font-size: 14px;
}
.game-more a { font-weight: 700; }

.gs-gear { margin: 8px 0 0; }
.gs-gear .section-head { margin-bottom: 16px; }

body.gs-no-scroll { overflow: hidden; overscroll-behavior: none; }

@media (max-width: 560px) {
  .gs-page { padding: 8px 0 32px; }
  .gs-page .page-hero { padding: 12px 0 0; }
  .gs-page .page-hero h1 { font-size: 28px; }
}
