/* Pumpkin Pong — 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; left: 0; right: 0; text-align: center; font-size: clamp(2.2rem, 10vw, 3.4rem); font-weight: 900;
  color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(249,115,22,0.7); }
.score-op { top: max(56px, calc(env(safe-area-inset-top) + 50px)); color: #e9d5ff; text-shadow: 0 0 22px rgba(192,132,252,0.7); }
.score-me { bottom: calc(env(safe-area-inset-bottom) + 14px); }

.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; }
@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); }
.how { color: var(--ink-mut); font-size: .85rem; margin-top: 18px; }

.panel.setup-card, .panel.lobby-card, .panel.results-card { width: 100%; max-width: 380px; padding: 26px 24px; text-align: center; }
.setup-card h2, .results-card h2 { font-size: 1.5rem; }
.setup-card .btn.big { width: 100%; }
.lbl, .lobby-label { display: block; text-align: left; color: var(--ink-dim); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin: 0 0 6px; }
.lobby-label { text-align: center; }
.nick-row, .join-row { display: flex; gap: 8px; align-items: stretch; }
.nick-row .field, .join-row .field { flex: 1; }
.nick-row .icon-btn { flex: none; border-radius: 12px; }
.join-row .btn { flex: none; }
.join-row { margin-bottom: 8px; }
.nick-hint { color: var(--ink-mut); font-size: .78rem; margin: 6px 0 16px; text-align: left; }
.or { color: var(--ink-mut); font-size: .8rem; margin: 16px 0 10px; }
.err { color: var(--pink); font-weight: 700; font-size: .85rem; margin: 10px 0 0; min-height: 1em; }
.btn.small { font-size: .85rem; padding: .55em 1.1em; }
.setup-card .small { margin-top: 16px; }
.code-big { font-size: 2.8rem; font-weight: 900; letter-spacing: 6px; color: #fff; text-shadow: 0 0 26px rgba(249,115,22,0.7); margin: 4px 0 10px; }
.player-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.player-list li { display: flex; align-items: center; gap: 8px; font-weight: 700; background: rgba(11,4,23,0.4);
  border: 1px solid rgba(249,115,22,0.25); border-radius: 10px; padding: .5em .8em; }
.player-list li .host { margin-left: auto; font-size: .72rem; color: #ffd54a; font-weight: 800; }
.player-list li .me { margin-left: auto; font-size: .72rem; color: #fdba74; font-weight: 800; }
.wait { color: var(--ink-dim); font-weight: 700; font-style: italic; }

.count-num { font-size: clamp(6rem, 40vw, 16rem); font-weight: 900; color: #fff; text-shadow: 0 0 60px rgba(249,115,22,0.9);
  animation: pulse .9s ease; }
.count-num.go { color: #fdba74; }
@keyframes pulse { 0% { transform: scale(0.4); opacity: 0 } 40% { transform: scale(1.1); opacity: 1 } 100% { transform: scale(1); opacity: 1 } }

.results-score { font-size: 3rem; font-weight: 900; color: #fff; margin: 8px 0 0; text-shadow: 0 0 30px rgba(249,115,22,0.7); }
.over-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

.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; }
