
/* Simple horizontal nav on game pages - no hamburger, works at all widths */
.nav-links.nav-links-simple {
  display: flex;
  position: static;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
  background: none;
  border: none;
  padding: 0;
}
.nav-links.nav-links-simple li { width: auto; }
.nav-links.nav-links-simple .btn { margin: 0; }

.game-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.game-main {
  flex: 1;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.game-head { text-align: center; margin-bottom: 2rem; }
.game-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.game-head .lead { max-width: 52ch; margin: 0.8rem auto 0; }

.game-shell {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  background: var(--card-indigo);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--cream);
  padding: 0 0.3rem 0.8rem;
  font-size: 0.95rem;
}
.game-hud .hud-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b7b1d6;
}
.game-hud .hud-value { font-size: 1.25rem; line-height: 1.2; }
.game-hud .hud-value.accent { color: var(--orange-bright); }

.game-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
canvas.game-canvas {
  display: block;
  width: 100%;
  touch-action: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.5rem;
  background: rgba(22, 17, 15, 0.88);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  z-index: 5;
  /* scroll when content is taller than the stage (small screens) -
     the ::before/::after spacers keep it centred when it fits */
  overflow-y: auto;
}
.game-overlay::before,
.game-overlay::after {
  content: '';
  flex: 1;
}
.game-overlay > * { flex-shrink: 0; }
.game-overlay[hidden] { display: none; }

@media (max-width: 520px) {
  .game-overlay { padding: 1rem 0.9rem; gap: 0.45rem; }
  .game-overlay .big-score { font-size: 2.2rem; }
  .game-overlay .overlay-actions { margin-top: 0.6rem; gap: 0.6rem; }
  .game-overlay .overlay-actions .btn { padding: 0.7rem 1.3rem; font-size: 0.92rem; }
  .lb-list { max-height: 130px; }
}
.game-overlay h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.2rem; }
.game-overlay p { color: var(--muted); max-width: 34ch; }
.game-overlay .big-score {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}
.game-overlay .overlay-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.game-note {
  text-align: center;
  color: var(--muted-dark);
  font-size: 0.85rem;
  margin-top: 1.2rem;
}

.game-pitch {
  max-width: 560px;
  margin: 2.5rem auto 0;
  text-align: center;
  background: rgba(244, 239, 230, 0.04);
  border: 1px solid rgba(244, 239, 230, 0.09);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
}
.game-pitch h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.game-pitch p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.5rem;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: rgba(244, 239, 230, 0.035);
  border: 1px solid rgba(244, 239, 230, 0.09);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.game-card:hover { transform: translateY(-6px); border-color: rgba(245, 115, 27, 0.5); }
.game-card-art {
  height: 170px;
  display: grid;
  place-items: center;
  background: var(--card-indigo);
}
.game-card-art svg { width: 96px; height: 96px; }
/* real gameplay thumbnails fill the whole art area */
.game-card-shot { padding: 0; overflow: hidden; }
.game-card-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.game-card:hover .game-card-shot img { transform: scale(1.06); }
.game-card-body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.game-card h3 { color: var(--cream); margin-bottom: 0.5rem; }
.game-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.game-card .play {
  margin-top: 1.2rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--orange);
}
.game-card:hover .play { color: var(--orange-bright); }

.quiz-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.1);
  overflow: hidden;
  margin-bottom: 1.4rem;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-bright));
  transition: width 0.35s ease;
}
.quiz-q {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--cream);
  margin-bottom: 1.2rem;
  min-height: 3.2em;
}
.quiz-options { display: grid; gap: 0.7rem; list-style: none; padding: 0; margin: 0; }
.quiz-option {
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--cream);
  background: rgba(244, 239, 230, 0.05);
  border: 1.5px solid rgba(244, 239, 230, 0.14);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--orange); transform: translateX(4px); }
.quiz-option:disabled { cursor: default; opacity: 0.75; }
.quiz-option.correct {
  border-color: #3fb96f;
  background: rgba(63, 185, 111, 0.14);
  opacity: 1;
}
.quiz-option.wrong {
  border-color: #e05252;
  background: rgba(224, 82, 82, 0.14);
  opacity: 1;
}
.quiz-feedback {
  margin-top: 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 3em;
}
.quiz-feedback strong { color: var(--cream); }
.quiz-next { margin-top: 0.6rem; width: 100%; }

.wheel-wrap {
  position: relative;
  width: min(420px, 100%);
  margin: 0 auto;
}
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid var(--orange);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
  z-index: 4;
}
.wheel-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid rgba(244, 239, 230, 0.15);
  display: grid;
  place-items: center;
  z-index: 3;
}
.wheel-hub img { width: 42px; height: auto; }
.spin-actions { text-align: center; margin-top: 1.4rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* <button> elements reusing .btn styles need the UA background cleared */
button.btn { cursor: pointer; border: none; font: inherit; }
button.btn { font-family: var(--font-head); font-weight: 600; }
button.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(244, 239, 230, 0.35);
}

.game-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  border-color: rgba(245, 115, 27, 0.35);
}
.game-card-featured .game-card-art {
  width: 42%;
  height: auto;
  min-height: 220px;
}
.game-card-featured .game-card-art svg { width: 80%; height: auto; max-height: 180px; }
.game-card-featured .game-card-body { justify-content: center; }
.game-card-featured h3 { font-size: 1.5rem; }

@media (max-width: 960px) {
  .games-grid { grid-template-columns: 1fr; }
  .game-card-featured { flex-direction: column; }
  .game-card-featured .game-card-art { width: 100%; min-height: 170px; }
}
