/* Maths Glider game page */
.gm-hero { padding: 70px 0 100px; }
.gm-hero h1 { margin: 14px 0 14px; }
.gm-section { padding-top: 40px; }

.gm-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100svh - 110px); min-height: 420px; border-radius: var(--radius); overflow: hidden; background: #122630; box-shadow: var(--shadow), 0 0 0 10px #5a3d26, 0 0 0 12px #3e2a1a; user-select: none; -webkit-user-select: none; }
.gm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
@media (max-width: 700px) {
  .gm-stage { aspect-ratio: 2 / 3; max-height: calc(100svh - 80px); min-height: 440px; box-shadow: var(--shadow), 0 0 0 6px #5a3d26, 0 0 0 8px #3e2a1a; }
}

/* score bar */
.gm-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; pointer-events: none; color: var(--cream); font: 700 14px/1 Montserrat, sans-serif; }
.gm-lives { font-size: 22px; letter-spacing: 3px; color: #e8675a; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.gm-lives .lost { color: rgba(244,238,220,.22); }
.gm-right { display: flex; align-items: center; gap: 8px; }
.gm-stat { padding: 8px 12px; border-radius: 99px; background: rgba(11,22,30,.55); border: 1px solid rgba(244,238,220,.16); letter-spacing: .04em; }
.gm-stat b { color: var(--gold); margin-left: 4px; }
.gm-icon { pointer-events: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--cream); background: rgba(11,22,30,.55); border: 1px solid rgba(244,238,220,.16); }
.gm-icon svg { width: 16px; height: 16px; }
.gm-icon:hover { background: var(--gold); color: var(--navy); }

/* menus over the board */
.gm-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: rgba(9,19,26,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: gmIn .35s var(--ease); }
.gm-overlay.hidden { display: none; }
@keyframes gmIn { from { opacity: 0; } }
.gm-panel { width: min(100%, 560px); text-align: center; color: var(--cream); }
.gm-panel h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }
.gm-panel > p { color: rgba(244,238,220,.82); margin-bottom: 22px; font-weight: 600; }
.gm-panel kbd, .gm-keys kbd { font: 700 12px/1 Montserrat; padding: 4px 7px; border-radius: 6px; border: 1px solid currentColor; opacity: .9; }
.gm-levels { display: grid; gap: 12px; }
.gm-level { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 14px; text-align: left; padding: 16px 20px; border-radius: 16px; background: rgba(244,238,220,.08); border: 1.5px solid rgba(244,238,220,.2); color: var(--cream); transition: transform .25s var(--ease), background .25s, border-color .25s; }
.gm-level b { font: 700 19px/1.2 Poppins, Montserrat, sans-serif; }
.gm-level span { grid-column: 1; font-size: 13.5px; color: rgba(244,238,220,.7); font-weight: 600; }
.gm-level i { grid-column: 2; grid-row: 1 / 3; font: 700 12px/1 Montserrat; font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: rgba(244,238,220,.6); }
.gm-level i em { font-style: normal; display: block; margin-top: 5px; font-size: 22px; color: var(--gold); text-align: center; }
.gm-level:hover, .gm-level:focus-visible { transform: translateY(-2px); background: rgba(201,162,39,.16); border-color: var(--gold); outline: none; }
.gm-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.gm-buttons .btn-ghost { color: var(--cream); }

.gm-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 18px; }
.gm-results div { padding: 14px 8px; border-radius: 14px; background: rgba(244,238,220,.08); border: 1px solid rgba(244,238,220,.16); }
.gm-results b { display: block; font: 800 clamp(26px, 4vw, 36px)/1 Poppins, Montserrat, sans-serif; color: var(--gold); }
.gm-results span { font: 700 11px/1 Montserrat; letter-spacing: .12em; text-transform: uppercase; color: rgba(244,238,220,.65); }
.gm-review-h { font-size: 16px; margin-bottom: 8px; color: rgba(244,238,220,.85); }
.gm-review { list-style: none; display: grid; gap: 6px; text-align: left; max-height: 168px; overflow-y: auto; }
.gm-review li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-radius: 10px; background: rgba(244,238,220,.07); font-weight: 600; font-size: 14.5px; }
.gm-review li b { color: var(--cream); }
.gm-review li span { color: #f0a097; font-size: 13px; white-space: nowrap; }
.gm-review li.perfect { justify-content: center; color: #8fd9b2; }
.gm-help { margin-top: 16px; font-size: 14px; color: rgba(244,238,220,.75); font-weight: 600; }
.gm-help a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.gm-keys { margin-top: 22px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
@media (hover: none) { .gm-keys { display: none; } }
@media (max-width: 700px) {
  .gm-hud { padding: 10px; }
  .gm-stat { padding: 7px 9px; font-size: 12.5px; }
  .gm-level { padding: 13px 16px; }
  .gm-level b { font-size: 17px; }
}

/* topic arrow, difficulty screen and level tag */
.gm-level i.go { font-size: 24px; letter-spacing: 0; color: var(--gold); transition: transform .25s var(--ease); }
.gm-level:hover i.go { transform: translateX(4px); }
.gm-back { margin-top: 16px; font: 700 14px/1 Montserrat; color: rgba(244,238,220,.75); padding: 10px 14px; border-radius: 99px; }
.gm-back:hover { color: var(--cream); background: rgba(244,238,220,.08); }
.gm-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gm-tag { padding: 7px 11px; border-radius: 99px; background: rgba(11,22,30,.55); border: 1px solid rgba(244,238,220,.16); font-size: 12px; letter-spacing: .04em; color: rgba(244,238,220,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-tag:empty { display: none; }
@media (max-width: 700px) { .gm-tag { display: none; } }
