/* ── Games Hub Specifics ──────────────────────────── */
.games-hub-page body { background: var(--cream); }

.lobby-preferences-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 2rem; flex-wrap: wrap; }
.pref-pill { background: var(--warm-white); border: 1px solid var(--border); border-radius: 100px; padding: 6px 16px; display: flex; align-items: center; gap: 8px; transition: all .2s; }
.pref-pill:focus-within { border-color: var(--teal); }
.pref-pill select { border: none; background: transparent; font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 0.85rem; color: var(--ink); cursor: pointer; outline: none; }

.filter-bar { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 2.5rem; justify-content: center; }
.fl { font-size: .75rem; color: var(--ink-faint); font-weight: 700; margin-right: 2px; }

.sec-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.15rem; margin-bottom: 1.2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; margin-top: 2rem; }
.sec-title .cosy-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--ink-soft, #3f4e41); }
.sec-title span { font-size: .75rem; color: var(--ink-faint); font-family: 'DM Sans', sans-serif; font-weight: 400; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 4rem; }

.gc { background: linear-gradient(135deg, var(--warm-white), var(--card-bg, var(--teal-light))); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.75rem; cursor: pointer; transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .35s ease, border-color .25s; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
.gc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--card-accent, var(--teal)); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(0.25, 1, 0.5, 1); }
.gc:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 16px 32px rgba(26, 43, 29, 0.08); border-color: var(--teal); }
.gc:hover::before { transform: scaleX(1); }
.gc:hover .gc-play { filter: brightness(1.05); }

.gc-top { display: flex; align-items: center; gap: 12px; }
.gc-icon { width: 52px; height: 52px; border-radius: var(--r-md); background: var(--card-bg, var(--teal-light)); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; transition: transform 0.3s ease; }
.gc:hover .gc-icon { transform: scale(1.05) rotate(3deg); }
.gc-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; line-height: 1.25; color: var(--ink); }
.gc-desc { font-size: .85rem; color: var(--ink-muted); line-height: 1.5; flex: 1; }

.gc-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); margin-top: auto; }
.gc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gtag { font-size: .68rem; padding: 2px 10px; border-radius: 100px; background: var(--card-bg, var(--teal-light)); color: var(--card-accent, var(--teal)); font-weight: 700; transition: all 0.2s ease; border: 1px solid rgba(0, 0, 0, 0.03); }
.gtag.multi { background: #fffbeb; color: #b45309; border-color: rgba(245, 158, 11, 0.15); }
.gtag.solo { background: #faf5ff; color: #6b21a8; border-color: rgba(139, 92, 246, 0.15); }
.gtag.combo { background: #eef6ff; color: #1d4ed8; border-color: rgba(29,78,216,0.15); }
.gtag.mystery { background: #fdf2f8; color: #be185d; border-color: rgba(236, 72, 153, 0.15); }

.gc-featured { grid-column: 1 / -1; background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  color: #fff; padding: 1.5rem; border-radius: var(--r-lg); }
.gc-featured .gc-icon { font-size: 2.5rem; background: transparent; }
.gc-featured .gc-name { font-size: 1.5rem; color: #fff; }
.gc-featured .gc-desc { color: #e6f4ea; font-size: 1.05rem; margin: 1rem 0; }
.gc-featured .gc-play { background: #fff; color: #064e3b; font-weight: 800; }

.gc-play { background: var(--card-accent, var(--teal)); color: #fff; border: none; border-radius: 100px; font-family: 'DM Sans', sans-serif; font-size: .78rem; font-weight: 700; padding: 7px 18px; cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.gc-play:hover { transform: scale(1.08); filter: brightness(1.1); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.gc-play:active { transform: scale(0.96); }

/* ── GAME ENGINE OVERLAY ── */
.game-overlay { display: none; position: fixed; inset: 0; background: var(--cream); z-index: 2000; flex-direction: column; overflow-y: auto; }
.game-overlay.open { display: flex; }
.go-topbar { background: rgba(26, 43, 29, 0.92); backdrop-filter: blur(12px); color: #fff; padding: 1.15rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-shrink: 0; position: sticky; top: 0; z-index: 10; box-shadow: 0 4px 20px rgba(0,0,0,0.1); border-bottom: 1px solid rgba(255,255,255,0.08); }
.go-back,
.go-topbar .go-back,
.go-topbar .cg-btn-secondary { background: rgba(255, 255, 255, 0.12); border: 1.5px solid rgba(255,255,255,.25); color: #ffffff !important; border-radius: 100px; font-family: 'DM Sans', sans-serif; font-size: .8rem; font-weight: 600; padding: 7px 16px; min-height: 44px; cursor: pointer; transition: all .2s ease; display: inline-flex; align-items: center; gap: 6px; }
.go-back:hover,
.go-topbar .go-back:hover,
.go-topbar .cg-btn-secondary:hover { background: rgba(255, 255, 255, 0.22); border-color: rgba(255,255,255,.4); color: #ffffff !important; transform: translateX(-2px); }
.go-back:active { transform: scale(0.97); }
.go-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; color: #fff; }
.go-meta { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 1px; }
.go-body { flex: 1; max-width: 680px; margin: 0 auto; width: 100%; padding: 2.5rem 1.5rem 4rem; }

/* ── SETUP SCREEN ── */
.setup-screen { padding: 1rem 0.5rem; display: flex; flex-direction: column; gap: 1.75rem; }
.setup-screen h2 { font-family: var(--font-serif); font-weight: 600; font-size: 2rem; margin-bottom: .2rem; color: var(--ink); }
.setup-screen p { color: var(--ink-muted); font-size: .95rem; margin-bottom: 0.5rem; line-height: 1.6; }
.setup-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.5rem; }
.setup-opt { border: 1.5px solid var(--border); background: var(--warm-white); border-radius: var(--r-md); padding: .9rem 1.2rem; min-height: 44px; cursor: pointer; transition: all .2s cubic-bezier(0.25, 0.8, 0.25, 1); font-family: 'DM Sans', sans-serif; font-size: .88rem; color: var(--ink-muted); display: flex; align-items: center; gap: 8px; text-align: left; }
.setup-opt:hover { border-color: var(--teal); background: var(--warm-white); transform: translateY(-1px); }
.setup-opt.sel { border-color: var(--teal); background: var(--teal-light); color: var(--teal); font-weight: 700; box-shadow: 0 4px 12px rgba(107, 143, 113, 0.1); }
.setup-field label { display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: .6rem; }

/* ── STANDARD GAMEPLAY BUTTONS ── */
.btn-start-game, .btn-g-primary { background: var(--ink); color: var(--cream); border: none; border-radius: 100px; font-family: 'DM Sans', sans-serif; font-size: .95rem; font-weight: 700; padding: 12px 28px; min-height: 48px; cursor: pointer; transition: all .2s cubic-bezier(0.25, 0.8, 0.25, 1); display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(26, 43, 29, 0.12); }
.btn-start-game:hover, .btn-g-primary:hover { background: var(--teal); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(107, 143, 113, 0.25); }
.btn-start-game:active, .btn-g-primary:active { transform: translateY(1px) scale(0.98); }
.btn-start-game:focus-visible, .btn-g-primary:focus-visible, .btn-g-secondary:focus-visible, .btn-g-danger:focus-visible, .setup-opt:focus-visible, .go-back:focus-visible, .word-opt:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.btn-start-game:disabled, .btn-g-primary:disabled { background: var(--border); color: var(--ink-faint); cursor: not-allowed; transform: none; box-shadow: none; }

.btn-g-secondary { background: var(--warm-white); color: var(--ink); border: 1.5px solid var(--border); border-radius: 100px; font-family: 'DM Sans', sans-serif; font-size: .88rem; font-weight: 700; padding: 11px 24px; min-height: 48px; cursor: pointer; transition: all .2s cubic-bezier(0.25, 0.8, 0.25, 1); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-g-secondary:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); transform: translateY(-1px); }
.btn-g-secondary:active { transform: translateY(1px) scale(0.98); }

.btn-g-danger { background: transparent; color: var(--coral); border: 1.5px solid var(--border); border-radius: 100px; font-family: 'DM Sans', sans-serif; font-size: .88rem; font-weight: 700; padding: 11px 24px; min-height: 48px; cursor: pointer; transition: all .2s cubic-bezier(0.25, 0.8, 0.25, 1); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-g-danger:hover { border-color: var(--coral); background: var(--coral-light); transform: translateY(-1px); }
.btn-g-danger:active { transform: translateY(1px) scale(0.98); }

/* ── GAME INPUTS ── */
.input-row { display: flex; gap: 10px; margin-bottom: 1.25rem; width: 100%; }
.input-row .game-input { flex: 1; }
.game-input { width: 100%; padding: 11px 18px; border: 1.5px solid var(--border); border-radius: var(--r-md); font-family: 'DM Sans', sans-serif; font-size: .95rem; color: var(--ink); background: var(--cream); transition: all .2s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,0.01); min-height: 44px; }
.game-input:hover { border-color: var(--teal-hover, #6b8f71); }
.game-input:focus { border-color: var(--teal); background: var(--surface-color); box-shadow: 0 0 0 3px rgba(107, 143, 113, 0.15); outline: none; }
.game-input.ok { border-color: var(--green); background: var(--green-light); }
.game-input.bad { border-color: var(--coral); background: var(--coral-light); animation: shake 0.4s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ── GAME PLAY AREA ── */
.game-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 2.5rem; margin-bottom: 1rem; animation: popIn .25s ease; }
.game-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: .5rem; font-weight: 700; }
.game-prompt { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.35rem; line-height: 1.4; margin-bottom: .5rem; }
.game-sub { font-size: .88rem; color: var(--ink-muted); margin-bottom: 1.3rem; line-height: 1.6; }
.timer-ring-wrap { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.game-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.score-bar { background: var(--sage-light); border-radius: var(--r-lg); padding: .85rem 1.2rem; display: flex; gap: 1.5rem; margin-bottom: 1rem; border: 1px solid var(--border); }
.sb-val { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.2rem; line-height: 1; color: var(--sage-dark); }
.word-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
.word-opt { border: 1.5px solid var(--border); background: var(--warm-white); border-radius: var(--r-md); padding: .9rem 1.2rem; min-height: 48px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: .92rem; color: var(--ink); transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); text-align: left; box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; align-items: center; }
.word-opt:hover { border-color: var(--teal); background: var(--surface-color); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(107, 143, 113, 0.1); }
.word-opt:active { transform: translateY(1px); }
.word-opt.correct { border-color: var(--green) !important; background: var(--green-light) !important; color: var(--green) !important; font-weight: 700; box-shadow: 0 4px 12px rgba(58,122,74,0.15) !important; }
.word-opt.wrong { border-color: var(--coral) !important; background: var(--coral-light) !important; color: var(--coral) !important; font-weight: 700; text-decoration: line-through; box-shadow: 0 4px 12px rgba(196,82,42,0.1) !important; }

.feedback-bar { padding: 1rem 1.25rem; border-radius: var(--r-md); font-size: .9rem; margin-bottom: 1.25rem; display: none; line-height: 1.6; animation: slideUpFadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.feedback-bar.show { display: block; }
.feedback-bar.ok { background: var(--green-light); color: var(--green); border: 1px solid rgba(58,122,74,0.15); border-left: 5px solid var(--green); }
.feedback-bar.bad { background: var(--coral-light); color: var(--coral); border: 1px solid rgba(196,82,42,0.15); border-left: 5px solid var(--coral); }

@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chain-display { font-family: 'Fraunces', serif; font-size: 1.15rem; background: var(--cream); border-radius: var(--r-md); padding: .85rem 1.1rem; margin-bottom: .85rem; min-height: 52px; border: 1px solid var(--border); word-break: break-all; }

@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.fi { opacity: 0; animation: fadeUp .38s ease forwards; }

/* ── Category Jump Links (chip row, not run-on text) ── */
.sd-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.sd-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a5246;
  text-decoration: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid #e2d9d2;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.sd-jump-link:hover {
  color: #2f4a36;
  background: #eef4ed;
  border-color: #416b49;
}

/* ── Filter Pills (accessible tap targets) ── */
.fpill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.05rem;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid #e2d9d2;
  background: #fffdf8;
  color: #3f4e41;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fpill:hover,
.fpill.active {
  background: #416b49;
  color: #fff;
  border-color: #416b49;
}

@media(max-width: 800px) {
  .game-grid { grid-template-columns: 1fr; }
  .go-topbar { padding: 0.85rem 1rem; }
  .go-body { padding: 1.5rem 1rem calc(120px + var(--safe-bottom, 0px)); }
  .game-card { padding: 1.5rem; }
  .setup-options { grid-template-columns: 1fr; gap: 0.75rem; }
  .word-options { grid-template-columns: 1fr; gap: 0.75rem; }
  .lobby-preferences-bar { gap: 8px; }
  .filter-bar { gap: 5px; }
  .re-actions { flex-direction: column; width: 100%; }
  .re-actions button { width: 100%; max-width: 100%; }
  /* Featured card: stack tags above the launch button so it never overflows */
  .gc-featured .gc-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .gc-featured .gc-play { align-self: flex-start; }
}

@media (max-width: 480px) {
  .report-issue-text {
    display: none;
  }
  .go-topbar {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    justify-content: space-between;
  }
  html[data-context="phone"] .go-topbar .go-back,
  .go-topbar .go-back {
    order: 1;
    width: auto;
    min-height: 44px;
  }
  .go-topbar #go-topbar-right {
    order: 2;
    margin-left: auto;
  }
  .go-topbar .go-title-wrapper,
  .go-topbar > div:not(#go-topbar-right) {
    order: 3;
    flex: 1 1 100%;
    text-align: left;
  }
}

/* ── ROUND END SCREEN ── */
.round-end {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    animation: popIn 0.3s ease;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}
.re-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite alternate;
}
.re-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}
.re-sub {
    font-size: 0.95rem;
    color: var(--ink-muted);
    margin-bottom: 2rem;
}
.re-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    background: var(--cream);
    padding: 1.25rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}
.re-stat-val {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
}
.re-stat-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}
.re-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: center;
}
.re-actions button {
    flex: 1;
    max-width: 200px;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--teal);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── FOOTER COMPONENT ── */
.cg-footer {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem max(2.5rem, var(--safe-bottom, 16px));
  background: var(--surface-color, #1F2937);
  color: var(--text-color, #F9FAFB);
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  text-align: center;
  transition: all var(--motion-duration-med, 300ms) ease;
}

.cg-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cg-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif, 'Fraunces', serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.cg-footer-desc {
  margin: 0;
  color: var(--ink-muted, #9CA3AF);
  font-size: 0.95rem;
}

.cg-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.cg-footer-links a {
  color: var(--teal, #0D9488);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
  transition: color var(--motion-duration-fast, 150ms) ease;
}

.cg-footer-links a:hover {
  text-decoration: underline;
  color: var(--teal-hover, #0F766E);
}

.cg-footer-copy {
  font-size: 0.85rem;
  color: var(--ink-faint, #6B7280);
  margin-top: 0.5rem;
}

/* Context Overrides for Footer */
html[data-context="projector"] .cg-footer,
[data-context="projector"] .cg-footer {
  padding: 3.5rem 2rem;
  font-size: 1.15rem;
}

html[data-context="projector"] .cg-footer-brand,
[data-context="projector"] .cg-footer-brand {
  font-size: 1.6rem;
}

html[data-context="phone"] .cg-footer,
[data-context="phone"] .cg-footer {
  padding: 1.5rem 1rem max(2rem, var(--safe-bottom, 16px));
}

html[data-context="phone"] .cg-footer-links,
[data-context="phone"] .cg-footer-links {
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Dark Mode Adaptations for Games ── */
html[data-theme="dark"] .gc,
body.theme-dark .gc {
    background: var(--surface-color);
    border-color: var(--border-hover);
}

html[data-theme="dark"] .game-card,
body.theme-dark .game-card {
    background: var(--surface-color);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .setup-opt,
body.theme-dark .setup-opt {
    background: var(--surface-color);
    border-color: var(--border-hover);
    color: var(--ink-soft);
}

html[data-theme="dark"] .setup-opt:hover,
body.theme-dark .setup-opt:hover {
    border-color: var(--sage);
    color: var(--ink);
}

html[data-theme="dark"] .word-opt,
body.theme-dark .word-opt {
    background: var(--surface-color);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .chain-display,
body.theme-dark .chain-display {
    background: var(--sage-mist);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .score-bar,
body.theme-dark .score-bar {
    background: var(--sage-light);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .sb-val,
body.theme-dark .sb-val {
    color: var(--sage-dark);
}

html[data-theme="dark"] .game-input,
body.theme-dark .game-input {
    background: var(--sage-mist);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .btn-g-secondary,
body.theme-dark .btn-g-secondary {
    background: var(--surface-color);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .round-end,
body.theme-dark .round-end {
    background: var(--surface-color);
    border-color: var(--border-hover);
    color: var(--ink);
}

html[data-theme="dark"] .re-stats,
body.theme-dark .re-stats {
    background: var(--sage-mist);
    border-color: var(--border-hover);
}

html[data-theme="dark"] .re-title,
body.theme-dark .re-title {
    color: var(--ink);
}

html[data-theme="dark"] .why-container,
body.theme-dark .why-container {
    background: var(--sage-light);
    color: var(--ink);
}

html[data-theme="dark"] .why-text,
body.theme-dark .why-text {
    color: var(--ink);
}

html[data-theme="dark"] .btn-gender,
body.theme-dark .btn-gender {
    background: var(--surface-color);
    color: var(--ink);
    border-color: var(--border-hover);
}

/* Clean Utility Classes for Games Engine */
.game-loader-centered {
  text-align: center;
  padding: 4rem;
}
.game-card-centered {
  text-align: center;
}
.game-card-padded {
  padding: 1rem;
}
.game-prompt-large {
  font-size: 5rem;
}
.game-controls-centered {
  justify-content: center;
}
.game-controls-centered-spaced {
  justify-content: center;
  margin-top: 2rem;
}
.game-controls-top-spaced {
  margin-top: 1.5rem;
  justify-content: center;
}
.game-history-box {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.6;
  word-wrap: break-word;
}
.bingo-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 1.5rem 0;
}
.crossword-grid-box {
  margin: 1.5rem 0;
  overflow-x: auto;
}
.crossword-clue-box {
  font-size: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.crossword-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1rem;
}
.clues-list-box {
  font-size: 0.8rem;
  text-align: left;
}
.ideas-title-sage {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin: 0.5rem 0 0.5rem;
}
.ideas-list-styled {
  font-size: 0.85rem;
  text-align: left;
  margin: 0 0 1rem 1rem;
  padding: 0;
  line-height: 1.4;
}
.personal-best-sub {
  margin-bottom: 1rem;
}
.gold-info-banner {
  background: var(--gold-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 1rem;
  border: 1px solid rgba(176,125,43,0.2);
}

/* Standalone Overlay, Loader & Toast Utilities */
.game-overlay-standalone {
    position: relative;
    height: auto;
    min-height: calc(100vh - 62px);
    z-index: 1;
}

.game-loader {
    text-align: center;
    padding: 4rem;
}

.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--ink);
    color: var(--cream);
    padding: 12px 24px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 3000;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Games Hub Hero & Card Theme Extensions ── */
.hero-inner-centered {
  display: block;
  text-align: center;
}

.gc-teal { --card-accent: var(--teal); --card-bg: var(--teal-light); }
.gc-coral { --card-accent: var(--coral); --card-bg: var(--coral-light); }
.gc-plum { --card-accent: var(--plum); --card-bg: var(--plum-light); }
.gc-rose { --card-accent: var(--rose); --card-bg: var(--rose-light); }
.gc-sage { --card-accent: var(--sage-dark); --card-bg: var(--sage-light); }
.gc-blue { --card-accent: var(--blue); --card-bg: var(--blue-light); }
.gc-indigo { --card-accent: var(--indigo); --card-bg: rgba(79,70,229,0.08); }
.gc-navy { --card-accent: var(--navy); --card-bg: var(--navy-light); }
.gc-gold { --card-accent: var(--gold); --card-bg: var(--gold-light); }
.gc-ink { --card-accent: var(--ink); --card-bg: var(--tan); }
.gc-pink { --card-accent: #d53f8c; --card-bg: #fff5f7; }
