/* Spooky Catch — shares arcade.css theme. */
.game-body { overflow: hidden; height: 100svh; }
#stage { position: fixed; inset: 0; overflow: hidden; background: #0c0418; touch-action: none;
  user-select: none; -webkit-user-select: none; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-between;
  align-items: center; padding: max(10px, env(safe-area-inset-top)) 14px 0; pointer-events: none; }
.icon-btn { pointer-events: auto; cursor: pointer; font: inherit; font-size: 1.3rem; line-height: 1; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: rgba(32,16,64,0.55);
  border: 1.5px solid rgba(249,115,22,0.45); border-radius: 50%; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-decoration: none; transition: transform .1s, background .2s; }
.icon-btn:hover { background: rgba(249,115,22,0.3); }
.icon-btn:active { transform: scale(0.92); }

.hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.score { position: absolute; top: max(52px, calc(env(safe-area-inset-top) + 48px)); left: 0; right: 0; text-align: center;
  font-size: clamp(3rem, 14vw, 5rem); font-weight: 900; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(249,115,22,0.8), 0 4px 10px rgba(0,0,0,0.5); }
.score.pop { animation: pop .2s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }
.lives { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font-size: 1.2rem; letter-spacing: 3px; }

.screen { position: absolute; inset: 0; z-index: 25; display: none; align-items: center; justify-content: center; padding: 20px;
  padding-top: max(20px, calc(env(safe-area-inset-top) + 60px)); }
.screen.on { display: flex; animation: fade .25s ease; }
.screen.over-bg { background: rgba(8,3,18,0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.title-card { text-align: center; max-width: 420px; }
.title { font-size: clamp(2.8rem, 15vw, 5rem); font-weight: 900; letter-spacing: -2px; margin: 0; line-height: .9; }
.title span { display: block; background: linear-gradient(120deg, #fdba74, #f97316, #c084fc);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(249,115,22,0.5)); }
.tag { color: var(--ink-dim); margin: 14px auto 22px; max-width: 30ch; }
.menu-btns { display: flex; flex-direction: column; gap: 12px; }
.menu-btns .btn { background: linear-gradient(135deg, #f97316, #c026d3); }
.best-line { color: var(--ink-mut); margin-top: 18px; font-weight: 600; } .best-line b { color: #fdba74; }
.how { color: var(--ink-mut); font-size: .85rem; margin-top: 8px; }

.panel.over-card { width: 100%; max-width: 360px; padding: 26px 24px; text-align: center; }
.over-card h2 { font-size: 1.6rem; margin-bottom: 4px; }
.over-score { font-size: 3.6rem; font-weight: 900; color: #fff; line-height: 1; text-shadow: 0 0 30px rgba(249,115,22,0.7); }
.over-best { color: var(--ink-dim); margin: 8px 0 16px; } .over-best b { color: #fdba74; }
.new-badge { color: #ffd54a; font-weight: 900; font-size: .85rem; margin-left: 6px; }
.over-btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.submit-row .btn { width: 100%; margin-top: 4px; }
.nick-row { display: flex; gap: 8px; } .nick-row .field { flex: 1; } .nick-row .icon-btn { flex: none; border-radius: 12px; }
.nick-hint { color: var(--ink-mut); font-size: .78rem; margin: 6px 0 14px; text-align: left; } .nick-hint.bad { color: var(--pink); }
.submit-done { color: #7cf29a; font-weight: 800; margin: 10px 0; }

.toast { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translateX(-50%); z-index: 40;
  background: rgba(32,16,64,0.92); border: 1px solid rgba(249,115,22,0.45); color: var(--ink); padding: .6em 1.1em;
  border-radius: 999px; font-weight: 700; font-size: .85rem; max-width: 90vw; text-align: center; }
