@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}
:root {
  --ink: #eef1fa;
  --muted: #9aa4c0;
  --panel: rgba(10, 14, 30, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #4fd1ff;
  --hot: #ff4f8b;
  --font-d: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05060d; color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

.game-frame {
  position: relative; width: 100vw; height: calc(100vh - 48px); height: calc(100dvh - 48px); overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #141a3a, #05060d 75%);
}
html.ksz-fullscreen .game-frame { height: 100vh; height: 100dvh; }
.fullscreen-btn {
  position: absolute; top: 8px; right: 8px; z-index: 30; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(10, 14, 30, 0.7); color: var(--ink);
}
.fullscreen-icon { width: 18px; height: 18px; }
.fullscreen-icon--exit { display: none; }
.fullscreen-btn.is-fullscreen .fullscreen-icon--enter { display: none; }
.fullscreen-btn.is-fullscreen .fullscreen-icon--exit { display: block; }

.stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; }
.hud {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 52px 6px 10px; width: 100%; max-width: 640px;
  font-variant-numeric: tabular-nums;
}
.hud-item { display: flex; flex-direction: column; line-height: 1.05; min-width: 64px; }
.hud-item small { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hud-item b { font: 800 1.15rem var(--font-d); color: #fff; }
.hud-lives { flex: 1; display: flex; gap: 4px; justify-content: flex-end; }
.hud-lives i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #ffd9b0 0 38%, transparent 40%), linear-gradient(#ff8a1f 0 50%, #2f6fe0 50%); box-shadow: 0 0 6px rgba(255, 140, 40, 0.5); }
.hud-power { display: flex; gap: 8px; font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-power span { display: inline-flex; align-items: center; gap: 2px; }
.hud-power .x { opacity: 0.9; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4)); }
.hud-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); font-size: 0.85rem; }
#cv { flex: 1; min-height: 0; width: 100%; display: block; touch-action: none; }
.pw-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; text-align: left; font-size: 0.86rem; color: var(--muted); margin: 0 auto; max-width: 340px; }
.pw-legend i { font-style: normal; display: inline-block; width: 1.5em; }

/* érintős vezérlés: csak durva mutatónál (telefon, tablet) */
.pad { flex: none; display: none; width: 100%; max-width: 640px; justify-content: space-between; align-items: center; padding: 8px 18px calc(10px + env(safe-area-inset-bottom)); touch-action: none; }
@media (pointer: coarse) { .pad { display: flex; } }
.stick { position: relative; width: 136px; height: 136px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), rgba(255,255,255,.03) 70%); border: 1px solid var(--line); touch-action: none; }
.stick::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.12); }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: linear-gradient(145deg, #5a6a9a, #2a3358); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 6px 16px rgba(0,0,0,.5); pointer-events: none; }
.pad-btns { display: flex; gap: 14px; align-items: center; }
.pad-btn { width: 84px; height: 84px; border-radius: 50%; border: 0; font-size: 2rem; background: radial-gradient(circle at 35% 30%, #ff7a8a, #c4203a); box-shadow: 0 8px 20px -6px rgba(230, 40, 70, .7), inset 0 -4px 0 rgba(0,0,0,.25); touch-action: none; }
.pad-btn--det { width: 64px; height: 64px; font-size: 1.5rem; background: radial-gradient(circle at 35% 30%, #7ad8ff, #2a6fd0); box-shadow: 0 8px 20px -6px rgba(60, 140, 255, .7), inset 0 -4px 0 rgba(0,0,0,.25); }
.pad-btn:active { transform: scale(.94); }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; z-index: 20; padding: 16px; background: rgba(3, 4, 12, 0.55); backdrop-filter: blur(3px); }
.panel {
  width: min(460px, 100%); max-height: 100%; overflow-y: auto; padding: 24px 22px; border-radius: 22px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.title { margin: 0 0 10px; font: 800 clamp(2.2rem, 9vw, 3.2rem)/1 var(--font-d); letter-spacing: 0.04em; }
.title span { background: linear-gradient(95deg, var(--accent), var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel h2 { font: 800 1.7rem var(--font-d); margin: 0 0 12px; }
.lead { color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.keys { color: var(--muted); font-size: 0.82rem; margin: 10px 0 16px; }
.btnrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.btn {
  padding: 12px 26px; border-radius: 999px; border: 0; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #3a7bff); color: #fff; box-shadow: 0 10px 24px -10px var(--accent);
}
.btn--ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); box-shadow: none; }
.lb { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 5px; text-align: left; }
.lb li { display: grid; grid-template-columns: 2em 1fr auto auto; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 0.9rem; }
.lb .r { color: var(--accent); font-weight: 800; } .lb .s { font-weight: 800; } .lb .l { color: var(--muted); }
.hs-form { display: grid; gap: 10px; margin: 0 0 14px; text-align: left; }
.hs-form input { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; }
.banner {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 15; pointer-events: none;
  font: 800 clamp(1.6rem, 6vw, 2.6rem) var(--font-d); letter-spacing: 0.06em; text-align: center; color: #fff;
  text-shadow: 0 0 20px var(--accent), 0 4px 0 rgba(0, 0, 0, 0.4);
}
@media (max-width: 480px) {
  .hud { gap: 6px; padding-right: 50px; }
  .hud-item { min-width: 0; }
  .hud-item b { font-size: 1rem; }
  .hud-power { font-size: 0.75rem; gap: 4px; }
  .hud-lives i { width: 11px; height: 11px; }
  .hud-btn { width: 30px; height: 30px; }
  .pw-legend { font-size: 0.8rem; }
}
