/* =========================================================
   layout.css
   -----------------------------------------------------------
   Shared structural styles used on EVERY page (home + every
   game). Each game keeps its own style.css for its unique
   look (background, card colors, fonts) - this file only
   owns the bits that must look/behave the same everywhere:
   the header bar, the footer bar, and the wrapper that
   centers a game's content between them.
========================================================= */

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding-bottom: 90px;
}
/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10000;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  font-family: Arial, sans-serif;
}

.site-home-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: bold;
}

.site-home-link:hover {
  opacity: 0.85;
}

.site-game-title {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  text-align: right;
}

/* ---------- Footer ---------- */
.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  flex: 0 0 auto;
  padding: 14px 20px;
  background: #1f2937;
  color: #cbd5e1;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.site-footer-link {
  color: #93c5fd;
  text-decoration: none;
}

.site-footer-copy {
  margin: 6px 0 0;
}

/* ---------- Game content wrapper ----------
   Each game page wraps its .card in <main class="game-shell">
   instead of centering via `body { display:flex... }` itself
   (that used to be duplicated, slightly differently, in every
   game's own style.css). Add "center-v" if a game wants its
   card vertically centered instead of top-aligned. */
.game-shell {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.game-shell.center-v {
  align-items: center;
}
img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 0.05em 0 0.1em;
  vertical-align: -0.1em;
}
.game-title-heading {
  text-align: center;
  font-size: 20px;
  margin: 0 0 16px;
}
.site-header {
  position: sticky;      /* was: relative */
  top: 0;                /* new: stick to the top of the screen */
  z-index: 10000;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);   /* new: optional, separates it from content scrolling underneath */
}