/* Shared arcade chrome: back-to-arcade button + footer bar.
   All pages use the same flat, full-width bottom bar:
     [← Arcade]  Home · Privacy · USA · © STARSOFT LLC. STAR TROOPERS™  [Donate]
   with the Donate pill at the far right. Game pages put the back link
   inside a <footer class="site-footer"> element; the landing page's
   footer has no back link (it is the arcade home).

   --arcade-footer-h is the single source of truth for the bar height
   (content 26px + iPhone home-indicator safe area). Any game control
   anchored near the bottom of the viewport must add this to its
   `bottom` value so it never lands under the bar. */
:root {
  --arcade-footer-h: calc(26px + env(safe-area-inset-bottom, 0px));
}

.arcade-back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 138, 61, 0.55);
  background: rgba(8, 12, 10, 0.88);
  color: #e8f0e6;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.arcade-back:hover,
.arcade-back:focus-visible {
  background: #e85d04;
  border-color: #ff8a3d;
  color: #120a04;
}

.arcade-back:focus-visible {
  outline: 2px solid #9ef01a;
  outline-offset: 3px;
}

/* Footer bar: flat, full-width band locked to the very bottom edge
   of every page (no floating gap, no rounded corners). */
.arcade-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  height: var(--arcade-footer-h);
  padding: 0 0.55rem;
  border-top: 1px solid rgba(143, 163, 150, 0.22);
  background: rgba(4, 8, 12, 0.92);
  color: #8fa396;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: auto;
}


/* Back pill, first item of the bar on game pages */
.arcade-footer .arcade-back {
  position: static;
  flex: 0 0 auto;
  padding: 0.25rem 0.6rem;
  font-size: 0.55rem;
  gap: 0.3rem;
}

/* Middle run of links + legal line. Shrinkable: on narrow screens the
   legal line truncates first so the back pill, links and Donate pill
   always stay whole. */
.arcade-footer-line {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  gap: 0.35rem;
  line-height: 1.1;
  overflow: hidden;
}

.arcade-footer-line > a,
.arcade-footer-line > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.arcade-footer a {
  color: #b8c4bc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.arcade-footer a:hover,
.arcade-footer a:focus-visible {
  color: #ff8a3d;
}

.arcade-footer a:focus-visible {
  outline: 2px solid #9ef01a;
  outline-offset: 2px;
}

.arcade-footer-legal {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6f7d74;
  letter-spacing: 0.04em;
}

/* Donate pill — always the last item of the bar (far right) */
.arcade-footer .st-donate-footer-link {
  flex: 0 0 auto;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255, 138, 61, 0.55);
  border-radius: 999px;
  background: rgba(232, 93, 4, 0.18);
  color: #ff8a3d;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.arcade-footer .st-donate-footer-link:hover,
.arcade-footer .st-donate-footer-link:focus-visible {
  color: #ffd2a8;
  background: rgba(232, 93, 4, 0.38);
  border-color: #ff8a3d;
}
