/* ---- Game page ---- */
.g-back { margin-bottom: 14px; }
.bz-gamelayout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.g-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.g-aside { flex: 1 1 300px; min-width: 280px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.g-gallery { order: 1; display: flex; flex-direction: column; gap: 10px; }
.g-title { order: 2; display: flex; flex-direction: column; gap: 8px; }
.g-play { order: 3; }
.g-desc { order: 4; }
.g-controls { order: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.g-new { order: 6; }
.g-friends { order: 7; }
.g-creator { order: 8; }
.g-donate { order: 9; }
.g-ad { order: 9; }
.g-report { order: 10; align-self: center; }
.g-shot { aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; position: relative; }
/* The top of the page is the game's card at full size: the same parts (art, live badge, title, meta), nothing dropped. */
.g-card { border-radius: 24px; }
.g-card:hover, .g-card:has(:focus-visible) { transform: none; box-shadow: 0 2px 0 var(--line); outline: none; }
.g-card .g-shot { border-radius: 0; }
.g-body { padding: 18px 22px 22px; gap: 8px; }
.g-h1 { margin: 0; font-family: var(--font-text); font-weight: 600; letter-spacing: normal; } /* the card's title face, so the card morphs into the page title without the font changing */
.g-card .bz-card__meta { font-size: 16px; }
.g-extra { margin-top: -4px; }
.g-shot svg { width: 100%; height: 100%; display: block; }
.g-shot__tag { position: absolute; left: 16px; bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(11, 13, 30, 0.78); color: #fff; font-size: 13px; font-weight: 600; }
.g-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.g-thumb { aspect-ratio: 16 / 9; border-radius: 12px; border: 3px solid transparent; padding: 0; color: #fff; display: flex; align-items: center; justify-content: center; }
.g-thumb[aria-pressed="true"] { border-color: var(--accent); }
.bz-info { background: var(--surface); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.bz-vote { flex: 1; padding: 10px 0; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.bz-vote[aria-pressed="true"] { background: var(--teal-soft); border-color: var(--teal); }
.bz-vote--down[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.bz-fb { padding: 12px; border-radius: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.bz-linkbtn { background: none; border: 0; padding: 6px; color: var(--muted); font-size: 14px; text-decoration: underline; }
.bz-linkbtn:hover { color: var(--accent-text); }
@media (max-width: 720px) {
  .bz-gamelayout { flex-direction: column; flex-wrap: nowrap; gap: 16px; align-items: stretch; }
  .g-main, .g-aside { display: contents; }
  .g-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-card { border-radius: 20px; }
  .g-body { padding: 14px 16px 18px; }
}

/* ---- Play page ---- */
.bzp { background: #0F1124; color: #fff; min-height: 100vh; height: 100vh; display: flex; align-items: stretch; --ink: #fff; font-family: var(--font-text); }
.bzp a { color: #fff; }
.bzp a:hover { color: #FFC93C; }
.bzp--center { flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.bzp__main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #0F1124; position: relative; }
.bzp__stage { flex: 1; position: relative; min-height: 0; background: #14163A; overflow: hidden; }
.bzp__bar { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: #1E2244; min-height: 56px; flex-wrap: wrap; }
.bzp__btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 0; background: transparent; color: #fff; font-weight: 600; text-decoration: none; min-height: 40px; }
.bzp__btn:hover { background: #2C3160; color: #fff; }
.bzp :focus-visible { outline-color: #FFC93C; }
.bzp__name { font-family: var(--font-head); font-size: 20px; }
.bzp__meta, .bzp__guest { font-size: 14px; color: #C3C7DD; }
.bzp .bz-ad { background: #1E2244; border-color: #2E3360; }
.bzp .bz-ad__label { color: #C3C7DD; }
.bzp .bz-ad__box { background: #262B52; color: #C3C7DD; }
.bzp__loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; background: #14163A; overflow: auto; }
.bzp__progress { width: min(560px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.bzp__game { position: absolute; inset: 0; }
.bzp__game svg { width: 100%; height: 100%; display: block; }
.bzp__gametext { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); padding: 8px 14px; border-radius: 12px; background: rgba(11, 13, 30, .7); font-weight: 600; text-align: center; width: max-content; max-width: 90%; }
/* Touch controls, the FPS / ping readout, and the Controls and Quality menus (lib/play-controls.js) */
.bzp__layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.bzp__touch { position: absolute; inset: 0; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bzp__touch[hidden] { display: none; }
.bzp__stick { position: absolute; left: max(24px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.4); pointer-events: auto; touch-action: none; }
.bzp__stick.is-down { background: rgba(255,255,255,.24); }
.bzp__knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.bzp__buttons { position: absolute; right: calc(max(24px, env(safe-area-inset-right)) + 44px); bottom: calc(max(24px, env(safe-area-inset-bottom)) + 44px); width: 0; height: 0; }
.bzp__tbtn { --s: 64px; position: absolute; left: calc(var(--dx, 0px) - var(--s) / 2); top: calc(var(--dy, 0px) - var(--s) / 2); width: var(--s); height: var(--s); padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.2); color: #fff; font: 700 12px/1.1 var(--font-text); display: flex; align-items: center; justify-content: center; pointer-events: auto; touch-action: none; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.bzp__tbtn--main { --s: 88px; font-size: 14px; background: rgba(255,201,60,.34); border-color: rgba(255,201,60,.8); }
.bzp__tbtn span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; max-width: 100%; padding: 0 5px; overflow-wrap: anywhere; }
.bzp__tbtn.is-down { background: rgba(255,255,255,.5); transform: scale(.94); }
.bzp__tbtn--main.is-down { background: rgba(255,201,60,.66); }
.bzp__stats { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 10px; background: rgba(11,13,30,.72); color: #fff; font: 600 12px/1.4 var(--font-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bzp__stats[hidden] { display: none; }
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) { .bzp__stats { top: 46px; } }
.bzp-controls__row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--soft); }
.bzp-controls__name { font-weight: 600; overflow-wrap: anywhere; }
.bzp-controls__keys { display: flex; flex-wrap: wrap; gap: 6px; }
.bzp-key { font: 600 13px/1 var(--font-text); padding: 5px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 3px; color: var(--ink); }
.bzp-key--other { color: var(--muted); font-weight: 500; border-style: dashed; }
.bzp-key--changed { border-color: var(--accent); color: var(--accent-text); }
.bzp-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.bzp-opt.is-on { border-color: var(--accent); background: var(--accent-soft); }
.bzp-opt input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
@media (max-width: 480px) { .bzp-controls__row { grid-template-columns: 1fr auto; } .bzp-controls__keys { grid-column: 1 / -1; order: 3; } }
.bzp__rotate { display: none; }
.bzp-menu section + section { margin-top: 14px; }
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .bzp__bar { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(#0F1124cc, transparent); min-height: 0; padding: 6px 8px; }
  .bzp__meta, .bzp__guest, .bzp__btn span { display: none; }
}
@media (orientation: portrait) and (max-width: 720px) {
  .bzp__rotate { position: absolute; inset: 0; z-index: 5; background: rgba(11, 13, 30, .96); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-weight: 600; font-size: 20px; text-align: center; padding: 24px; }
  .bzp__rotate .bz-icon { width: 56px; height: 56px; }
}

/* ---- Report dialog and reasons ---- */
.bz-report__head { display: flex; align-items: center; gap: 12px; }
.bz-report__flag { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; flex: none; }
.bz-reason { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); }
.bz-reason:hover { border-color: var(--accent); }
.bz-reason span { font-size: 13px; color: var(--muted); }
.bz-report__tick { width: 56px; height: 56px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-ink); display: flex; align-items: center; justify-content: center; }
.bz-report__tick .bz-icon { width: 28px; height: 28px; }
.bz-report__list { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; list-style: disc; }

/* ---- Toasts ---- */
.bz-toasts { position: fixed; left: 0; right: 0; bottom: 84px; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.bz-toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 8px 24px var(--shadow); max-width: calc(100vw - 32px); }
/* The game itself: a sandboxed frame filling the stage (pages/play.js). The loading screen sits above it until the game starts. */
.bzp__frame { position: absolute; inset: 0; background: #000; }
.bzp__frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
