/* The minigames' screens and results (assets/minigames.js): a profile's game window (gaming.js) and
   the free game pages (ender.bio/games/, play.js). Colours follow the page's theme where it has one. */
@keyframes gm-spin { to { transform: rotate(360deg); } }
body.gm-open { overflow: hidden; }
.gm-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(5,2,10,.72); backdrop-filter: blur(6px); animation: gm-in .2s ease-out; }
@keyframes gm-in { from { opacity: 0; } }
.gm-box { width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #140a20; color: #F2E8FF; border: 1px solid rgba(179,136,255,.25);
  border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); font-family: 'Manrope', system-ui, sans-serif; }
.gm-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.gm-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-family: 'Sora', sans-serif; white-space: nowrap; }
.gm-title .ic { color: var(--c-accent, #B388FF); }
.gm-tabs { display: flex; gap: 4px; margin-left: auto; background: rgba(255,255,255,.05); padding: 3px; border-radius: 10px; }
.gm-tabs button { border: 0; background: none; color: #A995C4; font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.gm-tabs button.on { background: rgba(179,136,255,.2); color: #fff; }
.gm-x { border: 0; background: rgba(255,255,255,.06); color: #fff; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.gm-body { padding: 16px; }
.gm-intro { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 26px 10px; }
.gm-intro p { margin: 0; color: #D9C8F2; max-width: 440px; line-height: 1.5; }
.gm-intro h3 { margin: 0; font-family: 'Sora', sans-serif; }
.gm-intro .ic.spin { animation: gm-spin 1s linear infinite; }
.gm-big { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-accent, #B388FF), var(--c-highlight, #7C4DFF)); color: #140a20; }
.gm-big.bad { background: #5a1f2a; color: #fff; }
.gm-big .ic { width: 30px; height: 30px; }
.gm-fine { font-size: 12.5px; color: #A995C4 !important; }
.gm-fine a { color: var(--c-accent, #B388FF); }
.gm-start, .gm-ghost { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 800; padding: 11px 20px; border-radius: 12px; }
.gm-start { background: var(--c-accent, #B388FF); color: #140a20; }
.gm-ghost { background: rgba(255,255,255,.07); color: #fff; }
.gm-start .ic, .gm-ghost .ic { width: 15px; height: 15px; }
.gm-stage { position: relative; }
.gm-canvas { display: block; width: 100%; aspect-ratio: 1000 / 600; border-radius: 14px; background: #0b0512; touch-action: none; cursor: crosshair; user-select: none; }
.gm-hud { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none;
  font-weight: 800; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.7); font-variant-numeric: tabular-nums; }
.gm-hud span { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 8px; }
.gm-hud .ic { width: 14px; height: 14px; }
.gm-result { display: grid; justify-items: center; gap: 12px; padding: 12px 0; text-align: center; }
.gm-score span { display: block; color: #A995C4; font-size: 13px; }
.gm-score b { display: block; font-size: 44px; font-family: 'Sora', sans-serif; line-height: 1.1; }
.gm-score em { font-style: normal; font-weight: 800; color: #5AD6A4; font-size: 13px; }
.gm-score em.muted { color: #A995C4; }
.gm-rank { margin: 0; display: flex; gap: 6px; align-items: center; color: #FFD86B; font-weight: 700; font-size: 14px; }
.gm-rank .ic { width: 14px; height: 14px; }
.gm-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.gm-mini, .gm-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: min(360px, 100%); text-align: left; }
.gm-mini li, .gm-board li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: 13.5px; }
.gm-mini li span, .gm-board .rk { width: 26px; color: #A995C4; font-weight: 800; font-variant-numeric: tabular-nums; }
.gm-board .rk.r1 { color: #FFD86B; } .gm-board .rk.r2 { color: #DDE3EE; } .gm-board .rk.r3 { color: #E0A36B; }
.gm-mini b, .gm-board b, .gm-board a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; text-decoration: none; font-weight: 700; }
.gm-board a:hover { color: var(--c-accent, #B388FF); }
.gm-mini em, .gm-board em { font-style: normal; color: #D9C8F2; font-variant-numeric: tabular-nums; }
.gm-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gm-boards h4 { margin: 0 0 8px; display: flex; gap: 6px; align-items: center; font-size: 13px; color: #A995C4; text-transform: uppercase; letter-spacing: .05em; }
.gm-boards h4 .ic { width: 13px; height: 13px; }
.gm-boards .gm-board { width: 100%; }
.gm-you { margin: 8px 0 0; font-size: 12.5px; color: var(--c-accent, #B388FF); font-weight: 700; }
.gm-empty { font-size: 13px; }
.ty-box { position: relative; padding: 46px 18px 18px; border-radius: 14px; background: #0b0512; cursor: text; }
.ty-text { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 20px; line-height: 1.7; color: #5d4d75; max-height: 190px; overflow: hidden; word-break: break-word; }
.ty-text span.ok { color: #F2E8FF; }
.ty-text span.bad { color: #fff; background: #a3243b; border-radius: 3px; }
.ty-text span.cur { box-shadow: inset 2px 0 0 var(--c-accent, #B388FF); }
.ty-in { position: absolute; opacity: 0; left: 0; bottom: 0; width: 1px; height: 1px; }
.ty-hint { margin: 10px 0 0; color: #A995C4; font-size: 13px; }
@media (max-width: 640px) { .gm-boards { grid-template-columns: 1fr; } .gm-tabs button { padding: 6px 8px; } .gm-score b { font-size: 36px; } .gm-body { padding: 10px; } }
