﻿/* ============================================================================
   ArcadeNexa — site theme
   ============================================================================ */

:root {
  --bg: #0b0e17;
  --bg-soft: #121627;
  --panel: #171c30;
  --panel-2: #1e2440;
  --line: #2a3154;
  --text: #e8ebf7;
  --muted: #98a0c0;
  --accent: #7c5cff;
  --accent-2: #38bdf8;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(700px 420px at -10% 10%, rgba(56, 189, 248, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }

.gz-container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.gz-page-narrow { max-width: 460px; padding: 3rem 0; }

/* ---------------- Navigation ---------------- */

.gz-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.gz-nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.gz-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}
.gz-brand:hover { text-decoration: none; }
.gz-brand-bolt { filter: drop-shadow(0 0 6px rgba(124, 92, 255, 0.8)); }
.gz-brand-accent { color: var(--accent); }

.gz-nav-links { display: flex; gap: 1.25rem; }
.gz-nav-links a { color: var(--muted); font-weight: 600; }
.gz-nav-links a:hover { color: var(--text); text-decoration: none; }

.gz-nav-user { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.gz-nav-hello { color: var(--muted); font-size: 0.9rem; }
.gz-inline-form { display: inline; }

/* ---------------- Buttons, chips ---------------- */

.gz-btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.gz-btn:hover { text-decoration: none; transform: translateY(-1px); }
.gz-btn:active { transform: translateY(0); }
.gz-btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.gz-btn-block { width: 100%; }

.gz-btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b3df5);
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.35);
}
.gz-btn-primary:hover { box-shadow: 0 6px 24px rgba(124, 92, 255, 0.5); }

.gz-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.gz-btn-ghost:hover { background: var(--panel-2); }

.gz-btn-good { background: var(--good); color: #05281c; }
.gz-btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.gz-btn-danger:hover { background: rgba(248, 113, 113, 0.12); }

.gz-chip {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.gz-chip-cat { color: var(--accent-2); }

/* ---------------- Hero ---------------- */

.gz-hero { padding: 4rem 0 2.5rem; text-align: center; }
.gz-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; }
.gz-hero-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gz-hero-sub {
  max-width: 640px;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.gz-hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.gz-stat { display: flex; flex-direction: column; }
.gz-stat strong { font-size: 1.6rem; color: var(--accent-2); }
.gz-stat span { color: var(--muted); font-size: 0.85rem; }

/* ---------------- Category sections & game cards ---------------- */

.gz-category { margin: 2.5rem 0; }
.gz-category-head { margin-bottom: 1.1rem; }
.gz-category-head h2 { font-size: 1.5rem; }
.gz-category-icon { margin-right: 0.35rem; }
.gz-category-head p { margin: 0.15rem 0 0; color: var(--muted); }

.gz-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}

.gz-game-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.gz-game-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.gz-game-icon { font-size: 2.4rem; line-height: 1; }
.gz-game-info h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.gz-game-info p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.gz-game-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.gz-play-cta { color: var(--accent-2); font-weight: 700; font-size: 0.92rem; }

/* ---------------- Panels, tables ---------------- */

.gz-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.gz-page-head { padding: 2.5rem 0 1.5rem; }
.gz-page-head p { color: var(--muted); margin: 0; }

.gz-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.gz-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.gz-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid rgba(42, 49, 84, 0.5); }
.gz-table tbody tr:last-child td { border-bottom: none; }
.gz-table tbody tr:hover { background: rgba(124, 92, 255, 0.06); }
.gz-num { text-align: right; font-variant-numeric: tabular-nums; }
.gz-rank { width: 2.2rem; }

.gz-lb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.1rem;
  padding-bottom: 3rem;
}
.gz-lb-head { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.8rem; }
.gz-lb-icon { font-size: 1.8rem; }
.gz-lb-head h3 { margin: 0; font-size: 1.05rem; }
.gz-lb-head h3 a { color: var(--text); }
.gz-lb-cat { color: var(--muted); font-size: 0.8rem; }
.gz-lb-empty { color: var(--muted); font-size: 0.9rem; }

/* ---------------- Play page ---------------- */

.gz-play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  padding: 1.75rem 0 3rem;
  align-items: start;
}
@media (max-width: 960px) {
  .gz-play-layout { grid-template-columns: 1fr; }
}

.gz-play-head { margin-bottom: 1rem; }
.gz-play-title { display: flex; align-items: center; gap: 0.9rem; }
.gz-play-icon { font-size: 2.6rem; }
.gz-play-title h1 { font-size: 1.7rem; margin-bottom: 0.25rem; }
.gz-play-desc { color: var(--muted); margin: 0.7rem 0 0; line-height: 1.55; }

.gz-game-panel { padding: 0; overflow: hidden; }

.gz-hud {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.7rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.gz-hud-item { color: var(--muted); font-size: 0.9rem; }
.gz-hud-item strong { color: var(--text); font-size: 1.05rem; }
.gz-hud-spacer { flex: 1; }
.gz-save-note { color: var(--good); font-size: 0.8rem; }

.gz-stage-wrap { position: relative; min-height: 480px; }

.gz-stage {
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  outline: none;
}

/* Overlay (menus, level complete, game over) */
.gz-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(11, 14, 23, 0.88);
  backdrop-filter: blur(4px);
  z-index: 5;
  padding: 1.5rem;
}
.gz-overlay.gz-show { display: flex; }

.gz-overlay-card { text-align: center; max-width: 420px; width: 100%; }
.gz-overlay-card h2 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.gz-overlay-card p { color: var(--muted); margin: 0.3rem 0 1rem; line-height: 1.5; }
.gz-overlay-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }

.gz-level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}
.gz-level-btn {
  padding: 0.7rem 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}
.gz-level-btn:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.gz-level-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.gz-level-btn.gz-level-current { background: var(--accent); border-color: var(--accent); }

.gz-guest-name { margin: 0.75rem 0; }
.gz-guest-name input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  text-align: center;
}

.gz-final-score { font-size: 2.4rem; font-weight: 900; color: var(--accent-2); margin: 0.4rem 0; }
.gz-submit-status { font-size: 0.85rem; }
.gz-submit-status.gz-ok { color: var(--good); }
.gz-submit-status.gz-err { color: var(--bad); }

.gz-howto { margin-top: 1.25rem; }
.gz-howto p { color: var(--muted); line-height: 1.6; margin: 0; }

.gz-play-side { display: flex; flex-direction: column; gap: 1.1rem; }
.gz-side-note p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* ---------------- Auth forms ---------------- */

.gz-auth-panel { padding: 2rem; }
.gz-auth-sub { color: var(--muted); margin-top: 0; }
.gz-auth-alt { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; margin-top: 1.25rem; }

.gz-field { margin-bottom: 1rem; }
.gz-field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.35rem; }
.gz-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}
.gz-field input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.gz-field span.field-validation-error { color: var(--bad); font-size: 0.82rem; }
.gz-validation-summary { color: var(--bad); font-size: 0.9rem; margin-bottom: 0.75rem; }
.gz-validation-summary ul { margin: 0; padding-left: 1.1rem; }

.gz-error-panel { text-align: center; padding: 2.5rem; }

/* ---------------- SEO content section ---------------- */

.gz-seo {
  margin: 3.5rem 0 1rem;
  padding: 2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.gz-seo h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.gz-seo p { color: var(--muted); line-height: 1.75; margin: 0 0 1rem; }
.gz-seo p:last-child { margin-bottom: 0; }
.gz-seo strong { color: var(--text); }

/* ---------------- Mobile layout & touch controls ---------------- */

canvas.gz-canvas, canvas.gz-retro { max-width: 100%; height: auto !important; }

.gz-touch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.gz-touch button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #262e55, #171c38);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.gz-touch button.gz-t-on {
  background: linear-gradient(160deg, #8f74ff, #6344e8);
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.55);
}
.gz-touch-dpad {
  display: grid;
  grid-template-areas: ". u ." "l . r" ". d .";
  gap: 5px;
}
.gz-touch-dpad .gz-tu { grid-area: u; }
.gz-touch-dpad .gz-tl { grid-area: l; }
.gz-touch-dpad .gz-tr { grid-area: r; }
.gz-touch-dpad .gz-td { grid-area: d; }
.gz-touch-actions { display: flex; align-items: center; gap: 0.6rem; }
.gz-touch-actions .gz-tspace { width: auto; padding: 0 1.1rem; border-radius: 28px; font-size: 0.8rem; }

@media (max-width: 720px) {
  .gz-nav-inner { flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.6rem 0; }
  .gz-brand { font-size: 1.15rem; }
  .gz-nav-links { gap: 0.9rem; font-size: 0.9rem; }
  .gz-nav-hello { display: none; }
  .gz-nav-user { gap: 0.4rem; }
  .gz-hero { padding: 2.2rem 0 1.6rem; }
  .gz-hero-stats { gap: 1.4rem; }
  .gz-stat strong { font-size: 1.25rem; }
  .gz-play-title h1 { font-size: 1.35rem; }
  .gz-play-icon { font-size: 2rem; }
  .gz-hud { gap: 0.7rem; padding: 0.55rem 0.7rem; font-size: 0.82rem; }
  .gz-stage { min-height: 300px; padding: 0.8rem; }
  .gz-stage-wrap { min-height: 300px; }
  .gz-overlay-card h2 { font-size: 1.3rem; }
  .gz-seo { padding: 1.3rem; }
  .gz-footer .gz-container { flex-direction: column; gap: 0.4rem; }
}

/* ---------------- Footer ---------------- */

.gz-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.gz-footer .gz-container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ============================================================================
   In-game shared styles (used by the 12 games)
   ============================================================================ */

.gz-game-area { text-align: center; width: 100%; }
.gz-game-msg { color: var(--muted); margin: 0.6rem 0 0; min-height: 1.4em; font-size: 0.95rem; }
.gz-game-msg.gz-good { color: var(--good); }
.gz-game-msg.gz-bad { color: var(--bad); }

.gz-lives { letter-spacing: 0.15em; }

canvas.gz-canvas {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  max-width: 100%;
  touch-action: none;
}

/* Retro pixel-art games: crisp scaling + subtle CRT scanlines */
canvas.gz-retro {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  position: relative;
}
.gz-retro-wrap { position: relative; display: inline-block; line-height: 0; }
.gz-retro-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
/* phosphor vignette: darkened tube corners + faint screen glare */
.gz-retro-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background:
    radial-gradient(ellipse 120% 120% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0%, transparent 22%);
  pointer-events: none;
  z-index: 1;
}

/* Memory match */
.gz-mm-grid { display: grid; gap: 0.55rem; justify-content: center; margin: 0 auto; }
.gz-mm-card {
  width: 64px; height: 64px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  font-size: 1.7rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  color: transparent;
}
.gz-mm-card:hover { transform: scale(1.05); border-color: var(--accent); }
.gz-mm-card.gz-flipped { background: var(--bg-soft); color: inherit; }
.gz-mm-card.gz-matched { background: rgba(52, 211, 153, 0.15); border-color: var(--good); color: inherit; cursor: default; }
@media (max-width: 640px) { .gz-mm-card { width: 48px; height: 48px; font-size: 1.3rem; } }

/* Simon */
.gz-simon-board {
  display: grid;
  grid-template-columns: repeat(2, 130px);
  gap: 0.7rem;
  justify-content: center;
  margin: 1rem auto;
}
.gz-simon-pad {
  height: 130px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.1s ease, transform 0.1s ease;
}
.gz-simon-pad.gz-lit { opacity: 1; transform: scale(1.04); box-shadow: 0 0 24px currentColor; }
.gz-simon-pad:disabled { cursor: default; }
.gz-simon-0 { background: #ef4444; color: #ef4444; }
.gz-simon-1 { background: #22c55e; color: #22c55e; }
.gz-simon-2 { background: #3b82f6; color: #3b82f6; }
.gz-simon-3 { background: #eab308; color: #eab308; }

/* Number recall / text inputs in games */
.gz-big-display {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  min-height: 3.5rem;
  margin: 1rem 0;
}
.gz-game-input {
  padding: 0.7rem 1rem;
  font-size: 1.3rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  width: min(320px, 90%);
  font-family: inherit;
}
.gz-game-input:focus { outline: 2px solid var(--accent); }

/* Board games (tic tac toe, connect four, minesweeper, sliding, 2048) */
.gz-ttt-grid { display: grid; grid-template-columns: repeat(3, 96px); gap: 0.5rem; justify-content: center; margin: 1rem auto; }
.gz-ttt-cell {
  height: 96px; font-size: 2.6rem; font-weight: 900;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); cursor: pointer;
}
.gz-ttt-cell:hover:not(:disabled) { border-color: var(--accent); }
.gz-ttt-cell:disabled { cursor: default; }
.gz-ttt-x { color: var(--accent-2); }
.gz-ttt-o { color: var(--warn); }

.gz-c4-board {
  display: grid; gap: 6px; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; margin: 1rem auto; width: fit-content;
}
.gz-c4-cell {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); cursor: pointer;
  transition: background 0.15s ease;
}
.gz-c4-cell.gz-c4-p1 { background: radial-gradient(circle at 35% 30%, #fca5a5, #dc2626); }
.gz-c4-cell.gz-c4-p2 { background: radial-gradient(circle at 35% 30%, #fde68a, #d97706); }
.gz-c4-cell.gz-c4-win { box-shadow: 0 0 14px var(--good); border-color: var(--good); }
@media (max-width: 640px) { .gz-c4-cell { width: 38px; height: 38px; } }

.gz-ms-grid { display: grid; gap: 3px; justify-content: center; margin: 1rem auto; width: fit-content; }
.gz-ms-cell {
  width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-weight: 800; font-size: 0.85rem;
  cursor: pointer; padding: 0; font-family: inherit;
}
.gz-ms-cell:hover:not(.gz-ms-open) { border-color: var(--accent); }
.gz-ms-open { background: var(--bg-soft); cursor: default; }
.gz-ms-mine { background: rgba(248, 113, 113, 0.35); }
.gz-ms-c1 { color: #60a5fa; } .gz-ms-c2 { color: #34d399; } .gz-ms-c3 { color: #f87171; }
.gz-ms-c4 { color: #c084fc; } .gz-ms-c5 { color: #fbbf24; } .gz-ms-c6 { color: #2dd4bf; }
.gz-ms-c7 { color: #f472b6; } .gz-ms-c8 { color: #94a3b8; }
@media (max-width: 640px) { .gz-ms-cell { width: 24px; height: 24px; font-size: 0.7rem; } }

.gz-2048-board {
  display: grid; grid-template-columns: repeat(4, 84px); gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; margin: 1rem auto; width: fit-content;
}
.gz-2048-cell {
  height: 84px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.5rem; background: var(--bg); color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .gz-2048-board { grid-template-columns: repeat(4, 64px); }
  .gz-2048-cell { height: 64px; font-size: 1.15rem; }
}

.gz-sp-grid { display: grid; gap: 6px; justify-content: center; margin: 1rem auto; width: fit-content; }
.gz-sp-tile {
  width: 72px; height: 72px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 1.4rem; font-weight: 900;
  cursor: pointer; font-family: inherit;
}
.gz-sp-tile:hover { border-color: var(--accent); }
.gz-sp-empty { background: transparent; border-style: dashed; cursor: default; }
.gz-sp-correct { color: var(--good); }
@media (max-width: 640px) { .gz-sp-tile { width: 56px; height: 56px; font-size: 1.1rem; } }

/* Typing */
.gz-type-text {
  text-align: left; font-size: 1.15rem; line-height: 1.8;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem 1.3rem; margin: 1rem 0; user-select: none;
}
.gz-type-done { color: var(--good); }
.gz-type-err { color: var(--bad); text-decoration: underline; }
.gz-type-cursor { background: var(--accent); border-radius: 2px; color: #fff; }
.gz-type-input {
  width: 100%; padding: 0.8rem 1rem; font-size: 1.05rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-family: inherit;
}
.gz-type-stats { display: flex; gap: 2rem; justify-content: center; margin-top: 0.8rem; color: var(--muted); }
.gz-type-stats strong { color: var(--accent-2); font-size: 1.3rem; }

/* ============================================================================
   Visual uplift layer — richer boards, pads, cards and glow across all games
   ============================================================================ */

@keyframes gz-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes gz-glow-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }
  50% { box-shadow: 0 0 22px rgba(56, 189, 248, 0.85); }
}

/* ambient stage lighting */
.gz-stage {
  background:
    radial-gradient(480px 300px at 50% 15%, rgba(124, 92, 255, 0.08), transparent 70%),
    radial-gradient(400px 260px at 85% 90%, rgba(56, 189, 248, 0.05), transparent 70%);
}

/* memory cards: depth, tilt and matched pop */
.gz-mm-card {
  background: linear-gradient(145deg, #262e55, var(--panel-2) 45%, #171c38);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.gz-mm-card:hover { transform: scale(1.06) rotate(-1.5deg); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(124, 92, 255, 0.35); }
.gz-mm-card.gz-flipped { background: linear-gradient(160deg, #1a2040, var(--bg-soft)); }
.gz-mm-card.gz-matched {
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.28), rgba(52, 211, 153, 0.08));
  animation: gz-pop 0.35s ease;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.4);
}

/* simon pads: glassy domes */
.gz-simon-pad {
  background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5), transparent 55%);
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.45), 0 5px 14px rgba(0, 0, 0, 0.4);
  transition: opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
}
.gz-simon-pad.gz-lit { box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.25), 0 0 34px currentColor; }

/* board game cells: bevel + hover lift */
.gz-ttt-cell, .gz-sp-tile, .gz-sud-pad button, .gz-level-btn {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 55%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.gz-ttt-cell:hover:not(:disabled), .gz-sp-tile:hover, .gz-sud-pad button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), 0 0 10px rgba(124, 92, 255, 0.3);
}

/* connect four: recessed holes and glossy discs */
.gz-c4-board { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, #232a4e, #191f3c); }
.gz-c4-cell { box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.65); transition: background 0.2s ease, box-shadow 0.2s ease; }
.gz-c4-cell.gz-c4-p1, .gz-c4-cell.gz-c4-p2 { box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.25); }

/* minesweeper: raised unopened, sunken opened */
.gz-ms-cell { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 3px rgba(0, 0, 0, 0.35);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.05), transparent); }
.gz-ms-open { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4); background-image: none; }

/* 2048 tiles: depth */
.gz-2048-board { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); background: linear-gradient(165deg, #232a4e, #191f3c); }
.gz-2048-cell { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); transition: background 0.12s ease; }

/* lights out & grid flash: lamp glass */
.gz-lo-cell { box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.5); }
.gz-lo-cell.gz-lo-on {
  background: radial-gradient(circle at 38% 32%, #fef3c7, #fbbf24 60%, #d97706);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.7), inset 0 1px 3px rgba(255, 255, 255, 0.6);
}
.gz-gf-cell { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45); }
.gz-gf-cell.gz-gf-lit {
  background: radial-gradient(circle at 38% 32%, #bae6fd, #38bdf8 65%, #0284c7);
  animation: gz-glow-pulse 0.9s ease infinite;
}
.gz-gf-cell.gz-gf-good { background: radial-gradient(circle at 38% 32%, #a7f3d0, #34d399 65%, #059669);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.6); animation: gz-pop 0.3s ease; }
.gz-gf-cell.gz-gf-bad { background: radial-gradient(circle at 38% 32%, #fecaca, #f87171 65%, #b91c1c);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.6); }

/* reversi: felt board + 3D discs */
.gz-rv-grid { background: linear-gradient(165deg, #1d2a4e, #151c38); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.gz-rv-cell { background: linear-gradient(160deg, #1a3a25, #12291a); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
.gz-rv-disc { box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.3); }

/* sudoku: paper depth + selection glow */
.gz-sud-grid { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.gz-sud-cell.gz-sud-sel { box-shadow: inset 0 0 0 2px var(--accent), 0 0 12px rgba(124, 92, 255, 0.5); }

/* playing cards: paper feel + deal-in */
.gz-bj-card {
  background: linear-gradient(160deg, #ffffff, #e8edf5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 #ffffff;
  animation: gz-pop 0.28s ease;
  border: 1px solid #cbd5e1;
}
.gz-bj-card.gz-bj-back { border-color: #4c1d95; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(0, 0, 0, 0.3); }

/* level buttons: current one glows */
.gz-level-btn.gz-level-current {
  background: linear-gradient(145deg, #8f74ff, #6344e8);
  box-shadow: 0 0 16px rgba(124, 92, 255, 0.55);
}

/* game overlay cards: arcade attract-screen feel */
.gz-overlay-card {
  background: linear-gradient(170deg, rgba(30, 36, 64, 0.78), rgba(17, 21, 40, 0.78));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(124, 92, 255, 0.06);
}
.gz-overlay-card h2 {
  font-family: Consolas, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 12px rgba(124, 92, 255, 0.7), 0 0 30px rgba(56, 189, 248, 0.35);
}

@keyframes gz-score-pulse {
  0%, 100% { text-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
  50% { text-shadow: 0 0 24px rgba(56, 189, 248, 1), 0 0 40px rgba(124, 92, 255, 0.5); }
}
.gz-final-score {
  font-family: Consolas, "Courier New", monospace;
  animation: gz-score-pulse 1.4s ease infinite;
}

@keyframes gz-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0.25; } }
.gz-overlay-actions .gz-btn-primary { animation: gz-blink 1.6s step-end infinite; }
.gz-overlay-actions .gz-btn-primary:hover { animation: none; }

/* arcade HUD readouts */
.gz-hud-item strong {
  font-family: Consolas, "Courier New", monospace;
  color: var(--accent-2);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* Reversi */
.gz-rv-grid { display: grid; grid-template-columns: repeat(8, 46px); gap: 3px; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin: 1rem auto; width: fit-content; }
.gz-rv-cell { width: 46px; height: 46px; border-radius: 8px; background: #16321f; border: 1px solid #24503a;
  cursor: default; padding: 0; position: relative; }
.gz-rv-cell.gz-rv-legal { cursor: pointer; box-shadow: inset 0 0 0 2px rgba(124, 92, 255, 0.55); }
.gz-rv-cell.gz-rv-legal:hover { box-shadow: inset 0 0 0 3px var(--accent); }
.gz-rv-disc { position: absolute; inset: 6px; border-radius: 50%; }
.gz-rv-black { background: radial-gradient(circle at 35% 30%, #4b5563, #0b0e17); }
.gz-rv-white { background: radial-gradient(circle at 35% 30%, #ffffff, #9ca3af); }
@media (max-width: 640px) { .gz-rv-grid { grid-template-columns: repeat(8, 36px); } .gz-rv-cell { width: 36px; height: 36px; } }

/* Sudoku */
.gz-sud-grid { display: grid; grid-template-columns: repeat(9, 40px); justify-content: center;
  margin: 1rem auto; width: fit-content; border: 2px solid var(--muted); border-radius: 6px; overflow: hidden; }
.gz-sud-cell { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--accent-2); font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; padding: 0; }
.gz-sud-cell.gz-sud-given { color: var(--text); background: var(--panel-2); cursor: default; }
.gz-sud-cell.gz-sud-sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.gz-sud-cell.gz-sud-br { border-right: 2px solid var(--muted); }
.gz-sud-cell.gz-sud-bb { border-bottom: 2px solid var(--muted); }
.gz-sud-pad { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin-top: 0.9rem; }
.gz-sud-pad button { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.gz-sud-pad button:hover { border-color: var(--accent); }
@media (max-width: 640px) { .gz-sud-grid { grid-template-columns: repeat(9, 32px); } .gz-sud-cell { width: 32px; height: 32px; font-size: 0.9rem; } }

/* Lights Out / Grid Flash */
.gz-lo-cell { width: 60px; height: 60px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; transition: all 0.12s ease; padding: 0; }
.gz-lo-cell.gz-lo-on { background: #fbbf24; box-shadow: 0 0 16px rgba(251, 191, 36, 0.55); border-color: #fbbf24; }
.gz-gf-cell { width: 58px; height: 58px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; transition: background 0.1s ease; padding: 0; }
.gz-gf-cell.gz-gf-lit { background: var(--accent-2); box-shadow: 0 0 14px rgba(56, 189, 248, 0.6); }
.gz-gf-cell.gz-gf-good { background: var(--good); }
.gz-gf-cell.gz-gf-bad { background: var(--bad); }

/* Blackjack */
.gz-bj-table { max-width: 460px; margin: 0 auto; }
.gz-bj-row { margin: 0.8rem 0; }
.gz-bj-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.gz-bj-hand { display: flex; gap: 0.45rem; justify-content: center; min-height: 66px; margin-top: 0.4rem; flex-wrap: wrap; }
.gz-bj-card { width: 46px; height: 64px; border-radius: 8px; background: #f8fafc; color: #0f172a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); }
.gz-bj-card.gz-bj-red { color: #dc2626; }
.gz-bj-card.gz-bj-back { background: repeating-linear-gradient(45deg, #5b3df5, #5b3df5 6px, #7c5cff 6px, #7c5cff 12px); }
.gz-bj-actions { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }


.gz-about { margin-top: 1.25rem; }
.gz-about h2,
.gz-howto h2,
.gz-faq h2,
.gz-related h2 { margin: 0 0 0.85rem; font-size: 1.15rem; color: var(--text); }
.gz-about p { color: var(--muted); line-height: 1.7; margin: 0 0 0.85rem; }
.gz-about p:last-child { margin-bottom: 0; }
.gz-howto p { color: var(--muted); line-height: 1.6; margin: 0; }
.gz-faq { margin-top: 1.25rem; }
.gz-faq-item { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.gz-faq-item:first-of-type { border-top: 0; padding-top: 0; }
.gz-faq-item h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--text); }
.gz-faq-item p { margin: 0; color: var(--muted); line-height: 1.6; }
.gz-related { margin-top: 1.25rem; }
.gz-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.gz-related-card { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.gz-related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.gz-related-icon { font-size: 1.3rem; }
.gz-related-name { font-size: 0.9rem; font-weight: 600; }