*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --gf-spot: #e8a040; --gf-ink: #1a1408; --gf-leaf: #58a030; }
body {
  background: var(--gf-ink); color: #f0e0c0;
  font-family: 'Syne Mono', ui-monospace, monospace;
  overflow: hidden; height: 100vh; height: 100dvh;
  cursor: crosshair;
}
#gf-app { position: relative; width: 100vw; height: 100vh; height: 100dvh; }
#gf-canvas { display: block; width: 100%; height: 100%; }
#gf-hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem;
  background: linear-gradient(to bottom, rgba(26,20,8,0.92), transparent);
  font-size: 0.75rem; pointer-events: none;
}
#gf-level { font-family: 'Bungee', sans-serif; color: var(--gf-spot); font-size: 0.85rem; }
#gf-goal { font-family: 'Bungee', sans-serif; color: var(--gf-leaf); font-size: 0.9rem; }
.gf-start-level { margin: 0 0 1rem; color: var(--gf-leaf); font-size: 0.85rem; opacity: 0.85; }
#gf-next-btn { margin-bottom: 0.6rem; border-color: var(--gf-leaf); color: var(--gf-leaf); }
#gf-next-btn[hidden] { display: none !important; }
.gf-meter { display: flex; flex-direction: column; gap: 0.2rem; min-width: 150px; }
.gf-meter span { opacity: 0.6; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.gf-bar { height: 8px; background: rgba(255,255,255,0.1); border: 1px solid rgba(232,160,64,0.4); }
#gf-bal { height: 100%; width: 100%; background: linear-gradient(90deg, #58a030, #e8a040, #ff4040); }
#gf-status { flex: 1; text-align: right; opacity: 0.65; }
.gf-screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 1.5rem;
  background: radial-gradient(ellipse at 45% 20%, rgba(88,160,48,0.12), transparent 50%), rgba(26,20,8,0.94);
  z-index: 30;
}
.gf-screen.active { display: flex; }
.gf-credit { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; margin-bottom: 0.6rem; }
#gf-start h1, #gf-over h2 {
  font-family: 'Bungee', sans-serif; font-size: clamp(2rem, 9vw, 4rem);
  color: var(--gf-spot); text-shadow: 4px 4px 0 #3a2808, -2px 0 0 var(--gf-leaf); margin-bottom: 0.85rem;
}
.gf-tagline { max-width: 34rem; color: #c89040; margin-bottom: 0.9rem; line-height: 1.45; }
.gf-sub { max-width: 30rem; opacity: 0.85; line-height: 1.55; margin-bottom: 1.3rem; font-size: 0.9rem; }
#gf-play-btn, #gf-retry-btn, #gf-next-btn {
  font-family: 'Bungee', sans-serif; font-size: 0.95rem; letter-spacing: 0.08em;
  padding: 0.85rem 1.6rem; border: 3px solid var(--gf-spot); background: #2a1c08; color: var(--gf-spot);
  cursor: pointer; box-shadow: 5px 5px 0 #204010;
}
#gf-play-btn:hover, #gf-retry-btn:hover { background: #3a2810; }
.gf-controls { margin-top: 1rem; font-size: 0.72rem; opacity: 0.5; }
#gf-over-msg { max-width: 28rem; margin-bottom: 1.2rem; line-height: 1.5; }
.gf-exit {
  position: absolute; top: 0.75rem; right: 0.85rem; z-index: 50;
  color: rgba(240,224,192,0.55); text-decoration: none; font-size: 0.75rem;
}
.gf-exit:hover { color: var(--gf-spot); }
