/* Mobiuz Arcade Kit — общий вид оверлеев, кнопок и HUD для всех игр. */
:root {
  --ak-accent: #ff3b4e;
  --ak-bg: #07080f;
  --ak-surface: rgba(17, 19, 31, 0.92);
  --ak-line: rgba(255, 255, 255, 0.1);
  --ak-text: #fff;
  --ak-muted: rgba(255, 255, 255, 0.55);
  --ak-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ak-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ak-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(80% 60% at 50% 30%, color-mix(in srgb, var(--ak-accent) 16%, transparent), transparent 70%), rgba(5, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--ak-font);
  color: var(--ak-text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.ak-overlay.ak-show { opacity: 1; pointer-events: auto; }

.ak-card {
  width: min(360px, 100%);
  max-height: calc(100% - 8px);
  overflow: auto;
  padding: 26px 24px 22px;
  border-radius: 28px;
  border: 1px solid var(--ak-line);
  background: var(--ak-surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ak-show .ak-card { transform: none; }

.ak-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ak-muted);
}
.ak-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ak-accent);
  box-shadow: 0 0 12px var(--ak-accent);
}
.ak-title {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ak-text { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--ak-muted); }

.ak-score {
  margin: 14px 0 0;
  font-family: var(--ak-mono);
  font-size: 52px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ak-accent);
  font-variant-numeric: tabular-nums;
}
.ak-score small { font-family: var(--ak-font); font-size: 15px; font-weight: 600; color: var(--ak-muted); letter-spacing: 0; margin-left: 6px; }
.ak-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #111;
  background: var(--ak-accent);
}

.ak-stats { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ak-stat {
  min-width: 78px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ak-stat b { display: block; font-family: var(--ak-mono); font-size: 17px; font-variant-numeric: tabular-nums; }
.ak-stat span { display: block; margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ak-muted); }

.ak-controls { display: grid; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; text-align: left; }
.ak-controls li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--ak-muted);
}
.ak-keys { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ak-key {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-width: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.ak-touch .ak-only-desktop, .ak-desktop .ak-only-touch { display: none !important; }

.ak-actions { display: grid; gap: 8px; margin-top: 20px; }
.ak-btn {
  height: 50px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 var(--ak-font);
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--ak-line);
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}
.ak-btn:hover { background: rgba(255, 255, 255, 0.11); }
.ak-btn:active { transform: scale(0.98); }
.ak-btn-primary {
  border: 0;
  color: #0b0b12;
  background: var(--ak-accent);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--ak-accent) 40%, transparent);
}
.ak-btn-primary:hover { background: var(--ak-accent); filter: brightness(1.08); }
.ak-best { margin-top: 12px; font-size: 12px; color: var(--ak-muted); }
.ak-best b { color: #fff; font-family: var(--ak-mono); }

/* HUD — компактные плашки поверх игры */
.ak-hud {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  font-family: var(--ak-font);
}
.ak-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  align-items: center;
  border-radius: 999px;
  background: rgba(7, 8, 15, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.ak-chip span { color: var(--ak-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; }
.ak-chip b { font-family: var(--ak-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.ak-spacer { flex: 1; }
.ak-pause-btn {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 8, 15, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}
.ak-pause-btn::before, .ak-pause-btn::after { content: ""; width: 4px; height: 14px; border-radius: 2px; background: #fff; }
.ak-pause-btn { grid-auto-flow: column; gap: 4px; justify-content: center; }

.ak-toast {
  position: fixed;
  left: 50%;
  top: 58px;
  z-index: 900;
  transform: translate(-50%, -8px);
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(17, 19, 31, 0.92);
  border: 1px solid color-mix(in srgb, var(--ak-accent) 45%, transparent);
  color: #fff;
  font: 700 13px/1 var(--ak-font);
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
  white-space: nowrap;
}
.ak-toast.ak-show { opacity: 1; transform: translate(-50%, 0); }

@media (max-height: 560px) {
  .ak-card { padding: 18px 18px 16px; }
  .ak-title { font-size: 24px; }
  .ak-controls { display: none; }
  .ak-score { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .ak-overlay, .ak-card, .ak-toast { transition: none; }
}
