:root {
  color-scheme: dark;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #14121c;
  color: #fff9ed;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #14121c; }
button, input { font: inherit; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
.hidden { display: none !important; }

.menu-wrap {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 25%, rgba(110, 86, 163, .24), transparent 40%);
}
.menu-card {
  width: min(460px, 100%); padding: 30px; border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px; background: rgba(24, 21, 35, .88); backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(0,0,0,.38); text-align: center;
}
.cat-logo { font-size: 58px; filter: saturate(.65); transform: translateY(3px); }
.eyebrow { margin: 8px 0 4px; color: #b9a6df; letter-spacing: .16em; font-size: 11px; font-weight: 800; }
h1 { margin: 0; font-size: clamp(40px, 8vw, 62px); letter-spacing: -.055em; line-height: .95; }
h1 span, .brand span { color: #c5a7ff; }
.tagline { color: #cfc7d8; margin: 14px auto 24px; max-width: 340px; line-height: 1.45; }
form { display: grid; gap: 12px; text-align: left; }
label { display: grid; gap: 6px; color: #bfb5ca; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
input {
  width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 13px 14px;
  background: rgba(255,255,255,.055); color: white; outline: none; text-transform: none; letter-spacing: 0;
}
input:focus { border-color: #b99aee; box-shadow: 0 0 0 3px rgba(185,154,238,.12); }
button {
  margin-top: 4px; border: 0; border-radius: 14px; padding: 14px; font-weight: 900; cursor: pointer;
  color: #17121e; background: linear-gradient(135deg, #f8e8bf, #c6a7ff); box-shadow: 0 10px 30px rgba(187,153,239,.22);
}
button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.food-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 22px; color: #ddd5e7; font-size: 12px; }
.small { margin: 14px 0 0; color: #857d91; font-size: 11px; line-height: 1.4; }

#hud { position: fixed; inset: 0; pointer-events: none; }
.brand { position: absolute; left: 18px; top: 16px; font-size: 21px; font-weight: 950; letter-spacing: -.045em; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.stats { position: absolute; left: 18px; top: 51px; display: flex; gap: 7px; }
.stats div { min-width: 72px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(19,16,28,.67); backdrop-filter: blur(10px); }
.stats span { display: block; color: #90879d; font-size: 9px; text-transform: uppercase; letter-spacing: .11em; font-weight: 800; }
.stats strong { font-size: 14px; }
.leaderboard { position: absolute; right: 16px; top: 16px; width: min(220px, 44vw); padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; background: rgba(19,16,28,.67); backdrop-filter: blur(10px); }
.leaderboard h3 { margin: 0 0 7px; font-size: 10px; letter-spacing: .13em; color: #998faa; text-transform: uppercase; }
.leaderboard-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 7px; align-items: center; font-size: 11px; padding: 3px 0; }
.leaderboard-row.me { color: #e7d4ff; font-weight: 800; }
.help { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 7px 12px; border-radius: 999px; background: rgba(19,16,28,.58); color: #a9a0b5; font-size: 10px; white-space: nowrap; }
.toast { position: fixed; left: 50%; top: 16%; transform: translate(-50%, -10px); opacity: 0; transition: .2s ease; padding: 9px 14px; border-radius: 999px; background: rgba(19,16,28,.8); border: 1px solid rgba(255,255,255,.1); font-size: 12px; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 600px) {
  .menu-card { padding: 24px 19px; border-radius: 22px; }
  .leaderboard { top: 12px; right: 10px; }
  .brand { left: 12px; top: 12px; }
  .stats { left: 12px; top: 44px; flex-direction: column; gap: 4px; }
  .stats div { min-width: 66px; padding: 6px 8px; }
  .help { bottom: max(12px, env(safe-area-inset-bottom)); }
}
