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

:root {
  --lz-moss: #6a8f2a;
  --lz-slime: #c8f04a;
  --lz-mud: #2a2218;
  --lz-bug: #ff4d1a;
  --lz-ink: #0e1208;
  --lz-wrong: #e8a020;
}

body {
  background: var(--lz-ink);
  color: #d8e8b0;
  font-family: 'Syne Mono', ui-monospace, monospace;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

#lz-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#lz-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #142008;
  cursor: crosshair;
}

#lz-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(to bottom, rgba(14, 18, 8, 0.92), transparent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 10;
}

#lz-time {
  font-family: 'Bungee', sans-serif;
  color: var(--lz-slime);
  font-size: 1rem;
}

#lz-status {
  flex: 1;
  text-align: center;
  opacity: 0.7;
  text-transform: lowercase;
}

#lz-tongue-hint {
  opacity: 0.45;
  font-size: 0.68rem;
}

#lz-ticker {
  position: absolute;
  bottom: 12%;
  left: 0;
  right: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  z-index: 8;
  opacity: 0.35;
  font-size: 0.72rem;
  color: var(--lz-wrong);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

#lz-ticker::after {
  content: attr(data-text);
  display: inline-block;
  padding-left: 100%;
  animation: lz-marquee 18s linear infinite;
}

@keyframes lz-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.lz-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 30% 20%, rgba(200, 240, 74, 0.12), transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 77, 26, 0.1), transparent 40%),
    rgba(14, 18, 8, 0.94);
  z-index: 30;
}

.lz-screen.active { display: flex; }

.lz-credit {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.6rem;
}

#lz-start h1,
#lz-over h2 {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(2.2rem, 10vw, 4.4rem);
  color: var(--lz-slime);
  text-shadow:
    4px 4px 0 #3a5010,
    -2px 0 0 var(--lz-bug);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 0.85rem;
  animation: lz-title-wobble 2.8s ease-in-out infinite;
}

@keyframes lz-title-wobble {
  0%, 100% { transform: rotate(-1.2deg) skewX(-2deg); }
  50% { transform: rotate(1.5deg) skewX(2deg) scale(1.02); }
}

.lz-tagline {
  max-width: 34rem;
  font-size: clamp(0.72rem, 2.4vw, 0.9rem);
  line-height: 1.45;
  color: var(--lz-wrong);
  margin-bottom: 1rem;
  word-break: break-word;
}

.lz-sub {
  max-width: 28rem;
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.85;
  margin-bottom: 1.4rem;
}

#lz-play-btn,
#lz-retry-btn {
  font-family: 'Bungee', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.6rem;
  border: 3px solid var(--lz-slime);
  background: #1a2808;
  color: var(--lz-slime);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: 5px 5px 0 #3a1808;
}

#lz-play-btn:hover,
#lz-retry-btn:hover {
  background: #2a4010;
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 7px 7px 0 #3a1808;
}

#lz-play-btn:active,
#lz-retry-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #3a1808;
}

.lz-controls {
  margin-top: 1rem;
  font-size: 0.72rem;
  opacity: 0.5;
}

.lz-controls kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 1px solid rgba(200, 240, 74, 0.4);
  border-radius: 3px;
  font-family: inherit;
}

.lz-over-meta {
  margin: 0.4rem 0 1.2rem;
  color: var(--lz-bug);
  font-size: 0.85rem;
}

#lz-over-msg {
  max-width: 26rem;
  line-height: 1.5;
  opacity: 0.9;
}

#lz-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  background: var(--lz-slime);
  mix-blend-mode: screen;
  transition: opacity 0.05s;
}

#lz-flash.on { opacity: 0.55; }

.lz-exit {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  z-index: 50;
  color: rgba(216, 232, 176, 0.55);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.lz-exit:hover { color: var(--lz-slime); }

body.lz-playing .lz-exit { top: auto; bottom: 0.75rem; }

@media (max-width: 640px) {
  #lz-hud { flex-wrap: wrap; font-size: 0.68rem; }
  #lz-tongue-hint { display: none; }
  .lz-tagline { font-size: 0.68rem; }
}
