* { box-sizing: border-box; }
:root {
  --bg: #0b1020;
  --panel: #0f172a;
  --panel-2: #101826;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --accent: #f97316;
  --accent-2: #ea580c;
  --good: #22c55e;
  --bad: #ef4444;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial;
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -10%, #1e293b 0%, transparent 60%),
              radial-gradient(1200px 600px at 10% -20%, #0f172a 0%, transparent 60%),
              linear-gradient(180deg, #0b1020 0%, #0b1020 100%);
}
.site-header, .site-footer {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 16px 20px;
}
.site-footer { justify-content: center; color: var(--muted); }
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; }
.site-nav a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.site-nav a.active, .site-nav a:hover { color: var(--text); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }
.panel { background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%); border: 1px solid #1f2937; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03); }
.panel-header { padding: 24px 24px 0; }
.panel-header h1 { margin: 0 0 6px; font-size: 28px; }
.sub { margin: 0; color: var(--muted); }
.controls { margin-top: 12px; display: flex; align-items: center; gap: 10px; color: #cbd5e1; }
.controls code { background: #0b1220; border: 1px solid #1f2937; padding: 4px 8px; border-radius: 8px; color: #e2e8f0; }
.game-wrap { position: relative; padding: 20px; }
canvas#game { width: 100%; height: auto; max-height: 68vh; border-radius: 16px; background: linear-gradient(180deg, #0b1020 0%, #0b1020 100%); display: block; border: 1px solid #1f2937; }
.overlay { position: absolute; inset: 20px; display: grid; place-items: center; background: rgba(10, 14, 26, .5); backdrop-filter: blur(6px); border-radius: 16px; border: 1px solid #1f2937; }
.overlay.hidden { display: none; }
.overlay-box { text-align: center; background: rgba(15, 23, 42, .85); border: 1px solid #263043; padding: 22px; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03); width: min(90%, 460px); }
.overlay-box h2 { margin: 4px 0 8px; font-size: 26px; }
.overlay-box p { margin: 0 0 14px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%); color: white; padding: 10px 16px; font-weight: 700; border-radius: 10px; cursor: pointer; box-shadow: 0 8px 30px rgba(234, 88, 12, .35); }
.btn:hover { filter: brightness(.98); }
.btn.ghost { background: none; border: 1px solid #334155; color: #e2e8f0; box-shadow: none; }
.panel-footer { padding: 0 24px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.legend { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #0b1220; border: 1px solid #1f2937; padding: 6px 10px; border-radius: 999px; }
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.chip.pumpkin::before { background: #f97316; }
.chip.skeleton::before { background: #e5e7eb; }
.chip.bat::before { background: #8b5cf6; }
.chip.candy::before { background: #22c55e; }
.scorebar { position: absolute; top: 30px; left: 36px; right: 36px; height: 46px; display: flex; align-items: center; justify-content: space-between; background: rgba(2,6,23,.55); border: 1px solid #1f2937; border-radius: 12px; padding: 10px 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.scorebar .left, .scorebar .right { display: flex; align-items: center; gap: 12px; }
.scorebar .stat { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #0b1220; border: 1px solid #1f2937; border-radius: 10px; color: #e2e8f0; }
.scorebar .stat .dot { width: 10px; height: 10px; border-radius: 999px; }
.stat .pumpkin { background: #f97316; }
.stat .skull { background: #e5e7eb; }
.stat .bat { background: #8b5cf6; }
.stat .candy { background: #22c55e; }
.hud-msg { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #e2e8f0; opacity: .8; font-weight: 600; background: rgba(2,6,23,.5); border: 1px solid #1f2937; padding: 6px 10px; border-radius: 10px; }
