/* Times Table Blaster — arcade shooter on /playground/times-blaster/ */
/* The game stage keeps one deep-space look in both themes; the page around it uses mv-biz tokens */

.mv-tb {
  --tb-accent: #5ff0c8;
  --tb-panel: rgba(10, 12, 30, 0.85);
  --tb-stage-ink: #f4f1e8;
  --tb-stage-muted: #c3cadb;
}

.mv-tb__inner {
  max-width: 34rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem max(1rem, env(safe-area-inset-right, 0px))
    calc(2rem + env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  color: var(--mv-biz-foreground);
}

.mv-tb__back {
  font-size: 0.875rem;
  color: var(--mv-biz-muted-fg);
  text-decoration: none;
}

.mv-tb__back:hover {
  color: var(--mv-biz-primary);
}

.mv-tb__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.mv-tb__brand {
  margin: 0;
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--mv-biz-primary);
}

.mv-tb__hud {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--mv-biz-muted-fg);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mv-tb__hud b {
  display: block;
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--mv-biz-foreground);
}

.mv-tb__stage {
  position: relative;
  height: min(62vh, 30rem);
  min-height: 20rem;
  overflow: hidden;
  border-radius: 16px;
  background: #0d1022;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mv-tb__stage:focus-visible {
  outline: 3px solid var(--tb-accent);
  outline-offset: 2px;
}

.mv-tb__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.mv-tb__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem;
  background: var(--tb-panel);
  color: var(--tb-stage-ink);
  text-align: center;
}

.mv-tb__overlay h2 {
  margin: 0;
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.85rem;
  color: var(--tb-accent);
}

.mv-tb__overlay p {
  max-width: 30ch;
  margin: 0;
  line-height: 1.45;
  color: var(--tb-stage-muted);
}

.mv-tb__overlay .mv-tb__post {
  min-height: 1.4em;
  color: var(--tb-stage-ink);
  font-weight: 600;
}

.mv-tb__overlay .mv-tb__post a {
  color: var(--tb-accent);
}

.mv-tb__big {
  font-family: "Bungee", "Arial Black", system-ui, sans-serif;
  font-size: 2.75rem;
}

.mv-tb__btn {
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--tb-accent);
  color: #04241b;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.mv-tb__btn:focus-visible {
  outline: 3px solid var(--tb-stage-ink);
  outline-offset: 3px;
}

.mv-tb__tip {
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--mv-biz-muted-fg);
}

.mv-tb__hud b.mv-tb__lives {
  color: #e0406f;
  letter-spacing: 2px;
}

[data-theme="myvillage-dark"] .mv-tb__hud b.mv-tb__lives {
  color: #ff7aa0;
}

.mv-tb__stage {
  cursor: crosshair;
}
