/* THE LUCKY PRO — game styles
   Palette + type tokens lifted from design/colors_and_type.css.
   Canvas renders the world; HUD + dialogue are DOM overlays so they can use
   real typography per the design system (VT323 at 22px, Press Start 2P labels). */

@font-face {
  font-family: "Press Start 2P";
  src: url("https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8T-267oIAQAu6jDQyK3nVivM.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("https://fonts.gstatic.com/s/vt323/v17/pxiKyp0ihIEF2isfFJU.woff2") format("woff2");
  font-display: swap;
}

:root {
  --c-black:         #000000;
  --c-ink:           #1a1a2e;
  --c-slate:         #3c3c5c;
  --c-fluoro-bone:   #bcbcbc;
  --c-bone:          #e8e0d0;
  --c-chocolate:     #5c2c1c;
  --c-tobacco:       #a85820;
  --c-sickly-yellow: #bca838;
  --c-faded-red:     #a82820;
  --c-dirty-teal:    #2c6c6c;
  --c-casino-purple: #502878;
  --c-skin:          #d8a878;

  --font-pixel: "Press Start 2P", "VT323", "Courier New", ui-monospace, monospace;
  --font-mono:  "VT323", "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--c-black);
  color: var(--c-bone);
  font-family: var(--font-pixel);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: none;
  font-smooth: never;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

body {
  display: grid;
  place-items: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#stage {
  position: relative;
  width: 768px;
  height: 672px;
  background: var(--c-ink);
  border: 4px solid var(--c-black);
  box-shadow: 0 0 0 4px var(--c-slate), 0 0 0 8px var(--c-black);
  cursor: none;
}

#game {
  width: 768px;
  height: 672px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: transparent;
  display: block;
}

/* HUD overlay */
#hud {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-pixel);
  color: var(--c-bone);
  font-size: 10px;
  letter-spacing: 1px;
}
#hud .box {
  background: var(--c-black);
  border: 2px solid var(--c-bone);
  padding: 6px 10px;
  display: flex; align-items: center; gap: 8px;
}
#hud .v {
  color: var(--c-sickly-yellow);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* Dialogue overlay */
#dialogue {
  position: absolute;
  left: 24px; right: 24px; bottom: 24px;
  background: var(--c-bone);
  border: 4px solid var(--c-black);
  box-shadow:
    0 0 0 3px var(--c-sickly-yellow),
    0 0 0 7px var(--c-black);
  padding: 18px 22px 22px;
  font-family: var(--font-mono);
  color: var(--c-black);
  font-size: 22px;
  line-height: 1.35;
  z-index: 20;
  display: none;
}
#dialogue.active { display: block; }
#dialogue .speaker {
  color: var(--c-faded-red);
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: none;
}
#dialogue .speaker.show { display: block; }
#dialogue .body { min-height: 60px; }
#dialogue .arrow {
  position: absolute;
  right: 22px; bottom: 18px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--c-faded-red);
  animation: blink 1s steps(2) infinite;
  display: none;
}
#dialogue .arrow.show { display: block; }
@keyframes blink { 50% { opacity: 0; } }

#hint {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  color: #5a5a5a;
  text-align: center;
}
