/* cheerquake.com Games pages (scripts/site/build-games.mjs makes them). On top of site.css, same colours; logical
   properties only, so the Arabic pages mirror by themselves. Everything shows without JavaScript; games.js adds the
   filters, the search, "Show all" and the sticky menu's highlight. */

.gx main { overflow-x: clip; }
.nav a.on { color: var(--text); background: var(--panel-2); }

/* ---------- breadcrumbs ---------- */
.gx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 14px 0; font-size: 14px; color: var(--muted); }
.gx-crumbs a { color: var(--text-2); }
.gx-crumbs [aria-current] { color: var(--text); font-weight: 600; }

/* ---------- hero: the game's own art, blurred behind, and in front ---------- */
.gx-hero { position: relative; isolation: isolate; overflow: hidden; padding: 34px 0 54px; }
.gx-hero-bg { position: absolute; inset: -40px; z-index: -2; width: calc(100% + 80px); max-width: none; height: calc(100% + 80px); object-fit: cover; filter: blur(34px) saturate(1.25); opacity: 0.32; transform: scale(1.1); pointer-events: none; }
.gx-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 420px at 20% 10%, rgba(46, 168, 255, 0.16), transparent 70%), radial-gradient(700px 380px at 90% 70%, rgba(255, 138, 31, 0.14), transparent 70%), linear-gradient(180deg, rgba(6, 10, 21, 0.2), var(--bg)); }
.gx-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 40px; align-items: center; }
.gx-hero-text { text-align: start; }
.gx-hero-text.wide { grid-column: 1 / -1; text-align: center; }
.gx-hero h1 { margin: 14px 0 14px; font-size: clamp(32px, 5.2vw, 54px); max-width: none; }
.gx-hero-text.wide h1, .gx-hero-text.wide .lead { margin-inline: auto; }
.gx-hero .lead { margin: 0; max-width: 620px; font-size: clamp(16px, 2vw, 18.5px); }
.gx-hero .cta { justify-content: flex-start; margin-top: 24px; }
.gx-hero-text.wide .cta { justify-content: center; }
.gx-chip-line { margin: 14px 0 0; color: var(--ok); font-weight: 600; font-size: 14.5px; }
.gx-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.gx-hero-text.wide .gx-stats { justify-content: center; }
/* A game's numbers: each box a quarter of the row whatever how many there are (they never stretch). */
.gx-hero-text:not(.wide) .gx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; }
.gx-hero-text:not(.wide) .gx-stat { min-width: 0; }
.gx-stat { background: linear-gradient(180deg, rgba(18, 27, 52, 0.85), rgba(13, 20, 41, 0.85)); border: 1px solid var(--border); border-radius: 14px; padding: 9px 16px; min-width: 112px; }
.gx-stat b { display: block; font: 800 26px/1.15 var(--font-display); background: linear-gradient(90deg, #7cc4ff, #2ea8ff 40%, #ff9a22 60%, #ffb048); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gx-stat span { color: var(--text-2); font-size: 13.5px; }
.gx-hero-art { margin: 0; position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--border-2); box-shadow: 0 30px 70px -30px rgba(46, 168, 255, 0.45), 0 18px 40px -24px rgba(255, 138, 31, 0.5); transform-style: preserve-3d; transition: transform 0.25s ease; }
.gx-hero-art img { width: 100%; height: auto; aspect-ratio: 616 / 353; object-fit: cover; }
.gx-hero-art figcaption { position: absolute; inset-inline-end: 10px; inset-block-end: 8px; font-size: 11.5px; color: rgba(255, 255, 255, 0.78); background: rgba(6, 10, 21, 0.6); padding: 2px 8px; border-radius: 6px; }
.gx-hero-art.drawn { border: 0; box-shadow: none; overflow: visible; display: grid; place-items: center; }
.gx-hero-art.drawn::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 138, 31, 0.35), rgba(46, 168, 255, 0.12) 55%, transparent 72%); animation: gx-breathe 5s ease-in-out infinite; }
.gx-hero-art.drawn img { position: relative; width: min(320px, 80%); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); animation: gx-float 6s ease-in-out infinite; }
@keyframes gx-breathe { 50% { transform: scale(1.08); opacity: 0.8; } }
@keyframes gx-float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@media (max-width: 860px) {
  .gx-hero .wrap { grid-template-columns: 1fr; gap: 26px; }
  .gx-hero-text { text-align: center; }
  .gx-hero .lead { margin-inline: auto; }
  .gx-hero .cta, .gx-stats { justify-content: center; }
  .gx-hero-art { max-width: 520px; margin-inline: auto; }
}

/* ---------- the page's own menu, stuck under the header ---------- */
.gx-subnav { position: sticky; top: 66px; z-index: 15; background: rgba(6, 10, 21, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-block: 1px solid var(--border); }
.gx-subnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.gx-subnav .wrap::-webkit-scrollbar { display: none; }
.gx-subnav a { flex: none; color: var(--text-2); padding: 7px 13px; border-radius: 10px; font-size: 14.5px; font-weight: 600; }
.gx-subnav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.gx-subnav a.on { color: #fff; background: var(--accent-grad); text-shadow: 0 1px 2px rgba(110, 38, 0, 0.45); }
.gx-section { scroll-margin-top: 120px; }

/* ---------- how a gift travels: four steps with a light running along ---------- */
.gx-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; position: relative; counter-reset: none; }
.gx-flow::before { content: ""; position: absolute; inset-inline: 10%; top: 38px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(46, 168, 255, 0.25), rgba(255, 138, 31, 0.25)); }
.gx-flow::after { content: ""; position: absolute; top: 33px; inset-inline-start: 10%; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 4px rgba(255, 170, 70, 0.9), 0 0 26px 10px rgba(46, 168, 255, 0.45); animation: gx-run 3.2s cubic-bezier(0.55, 0.1, 0.35, 0.95) infinite; }
[dir="rtl"] .gx-flow::after { animation-name: gx-run-rtl; }
@keyframes gx-run { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { transform: translateX(calc(min(var(--wrap), 100vw) * 0.74)); opacity: 0; } }
@keyframes gx-run-rtl { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { transform: translateX(calc(min(var(--wrap), 100vw) * -0.74)); opacity: 0; } }
.gx-flow li { position: relative; z-index: 1; text-align: center; display: grid; justify-items: center; gap: 4px; }
.gx-flow-icon { width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; font-size: 34px; background: var(--panel); border: 1px solid var(--border-2); box-shadow: 0 10px 30px -14px rgba(46, 168, 255, 0.6); margin-bottom: 8px; }
.gx-flow li:nth-child(2) .gx-flow-icon { box-shadow: 0 10px 30px -12px rgba(255, 138, 31, 0.7); border-color: rgba(255, 138, 31, 0.45); }
.gx-flow b { font-size: 17px; }
.gx-flow span:last-child { color: var(--text-2); font-size: 14.5px; max-width: 220px; }
@media (max-width: 760px) {
  .gx-flow { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .gx-flow::before, .gx-flow::after { display: none; }
}

/* ---------- filters, search and counts ---------- */
.gx-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gx-chips button { font: 600 14px var(--font); color: var(--text-2); background: var(--panel); border: 1px solid var(--border-2); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.gx-chips button b { color: var(--muted); font-weight: 700; margin-inline-start: 2px; }
.gx-chips button:hover { color: var(--text); border-color: rgba(46, 168, 255, 0.5); }
.gx-chips button[aria-pressed="true"] { color: #fff; background: var(--accent-grad); border-color: transparent; text-shadow: 0 1px 2px rgba(110, 38, 0, 0.45); }
.gx-chips button[aria-pressed="true"] b { color: rgba(255, 255, 255, 0.85); }
.gx-search { font: 15px var(--font); color: var(--text); background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; padding: 9px 14px; min-width: 240px; flex: 0 1 300px; }
.gx-search:focus { outline: none; border-color: rgba(46, 168, 255, 0.7); box-shadow: 0 0 0 3px rgba(46, 168, 255, 0.18); }
.gx-search, .gx-chips { display: none; }
.js .gx-search, .js .gx-chips { display: flex; }
.js .gx-search { display: block; }
.gx-count { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.gx-empty { text-align: center; color: var(--text-2); padding: 30px 0; }

/* ---------- commands ---------- */
.gx-cmds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.gx-cmd { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 12px; content-visibility: auto; contain-intrinsic-size: auto 120px; transition: border-color 0.2s, transform 0.2s; }
.gx-cmd:hover { border-color: rgba(255, 138, 31, 0.5); transform: translateY(-2px); }
.gx-cmd[hidden], .gx-face[hidden], .gx-card[hidden] { display: none; }
.gx-cmd img, .gx-cmd .gx-noimg { flex: none; width: 72px; height: 72px; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(46, 168, 255, 0.16), rgba(13, 20, 41, 0) 70%); object-fit: contain; }
.gx-cmd h3 { margin: 2px 0 4px; font-size: 16px; line-height: 1.35; }
.gx-cmd p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.gx-tag { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: var(--cyan); background: var(--cyan-soft); }
.gx-cmd[data-cat="hurt"] .gx-tag { color: #ff7d8a; background: rgba(255, 77, 94, 0.12); }
.gx-cmd[data-cat="help"] .gx-tag { color: #5dff9c; background: rgba(47, 209, 111, 0.12); }
.gx-cmd[data-cat="fun"] .gx-tag { color: #ffd257; background: rgba(255, 210, 87, 0.12); }
.gx-noimg { display: grid; place-items: center; color: var(--accent); font-size: 24px; }

/* ---------- enemies, bosses and Pals ---------- */
.gx-faces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gx-face { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 10px 8px; text-align: center; display: grid; justify-items: center; gap: 6px; content-visibility: auto; contain-intrinsic-size: auto 140px; transition: transform 0.2s, border-color 0.2s; }
.gx-face:hover { transform: translateY(-3px); border-color: rgba(255, 138, 31, 0.5); }
.gx-face img { width: 84px; height: 84px; object-fit: contain; }
.gx-face span { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.gx-more { display: flex; justify-content: center; margin-top: 18px; }

/* ---------- game cards (the index, related games, Minecraft's mini-games) ---------- */
.gx-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.gx-card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.gx-card > a { display: flex; flex-direction: column; height: 100%; padding: 14px 16px 16px; color: inherit; }
.gx-card > a:hover { text-decoration: none; }
.gx-card .art { position: relative; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; }
.gx-card .art::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(46, 168, 255, 0.2), transparent 70%); transition: transform 0.35s, background 0.35s; }
.gx-card .art img { position: relative; width: 78%; height: auto; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.gx-card:hover { border-color: rgba(255, 138, 31, 0.55); transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(255, 138, 31, 0.55); }
.gx-card:hover .art::before { transform: scale(1.15); background: radial-gradient(circle, rgba(255, 138, 31, 0.28), transparent 70%); }
.gx-card:hover .art img { transform: scale(1.08) rotate(-2deg); }
.gx-card h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; text-align: start; }
.gx-card p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; line-height: 1.5; flex: 1; }
.gx-pill { align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--accent-hover); background: var(--accent-soft); border: 1px solid rgba(255, 138, 31, 0.3); padding: 3px 10px; border-radius: 999px; }
.gx-new { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 2; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #2fd16f, #16a454); padding: 3px 10px; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(47, 209, 111, 0.8); }
.gx-related { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.gx-mc .art img { width: 70%; }
.gx-tier { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.gx-tier.easy { color: #5dff9c; background: rgba(47, 209, 111, 0.13); }
.gx-tier.medium { color: #ffd257; background: rgba(255, 210, 87, 0.13); }
.gx-tier.hard { color: #ff7d8a; background: rgba(255, 77, 94, 0.13); }
.gx-card .gx-tier { align-self: flex-start; }

/* ---------- GTA V's game modes ---------- */
.gx-modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.gx-mode { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.gx-mode > img { flex: none; width: 96px; height: 96px; object-fit: contain; }
.gx-mode h3 { margin: 0 0 6px; font-size: 18px; }
.gx-mode h3 .gx-tier { margin: 0 0 0 6px; }
.gx-mode p { margin: 0 0 10px; color: var(--text-2); font-size: 14.5px; }
.gx-mode summary { cursor: pointer; color: var(--cyan); font-weight: 600; font-size: 14px; }
.gx-mini { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.gx-mini li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.gx-mini img { width: 34px; height: 34px; object-fit: contain; }

/* ---------- setup, good to know, requirements, mini-game info ---------- */
.gx-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gx-steps li { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px; position: relative; }
.gx-num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font: 800 18px var(--font-display); color: #fff; background: var(--accent-grad); margin-bottom: 10px; box-shadow: 0 8px 20px -8px rgba(255, 122, 18, 0.8); }
.gx-steps h3 { margin: 0 0 6px; font-size: 16.5px; }
.gx-steps p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.gx-two, .gx-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gx-info { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gx-box { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; }
.gx-box h3 { margin: 0 0 10px; font-size: 17px; }
.gx-box p { margin: 0; color: var(--text-2); }
.gx-box ul { margin: 0; padding-inline-start: 20px; color: var(--text-2); display: grid; gap: 6px; font-size: 14.5px; }
.gx-box dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14.5px; }
.gx-box dt { color: var(--muted); font-weight: 600; }
.gx-box dd { margin: 0; color: var(--text-2); }
.gx-controls { margin-top: 14px; }
@media (max-width: 900px) { .gx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gx-info { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .gx-steps, .gx-two { grid-template-columns: 1fr; } .gx-search { min-width: 0; flex-basis: 100%; } .gx-mode { flex-direction: column; } }

@media (prefers-reduced-motion: reduce) {
  .gx-flow::after, .gx-hero-art.drawn::before, .gx-hero-art.drawn img { animation: none; }
  .gx-cmd, .gx-card, .gx-face, .gx-card .art img { transition: none; }
}
/* On a phone: the hero's column never grows wider than the screen, and a game's numbers sit two by two. */
@media (max-width: 860px) {
  .gx-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .gx-hero-text:not(.wide) .gx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: auto; }
}
/* A number and its words, centred together in their box. */
.gx-stat { text-align: center; }
