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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #020408;
  color: #e8dcc8;
  font-family: 'DM Sans', system-ui, sans-serif;
}

#lm-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
}

.lm-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.lm-hud {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  padding: 20px 24px;
}

.lm-hud-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 220, 160, 0.75);
  text-shadow: 0 0 12px rgba(255, 180, 80, 0.35);
}

.lm-prompt {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 236, 200, 0.9);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.35s;
}

.lm-prompt.is-on { opacity: 1; }

.lm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(80, 45, 20, 0.55), transparent 55%),
    linear-gradient(180deg, #0a0c12 0%, #040508 100%);
}

.lm-overlay[hidden] { display: none !important; }

.lm-overlay--dim { background: rgba(0, 0, 0, 0.78); }
.lm-overlay--dead { background: radial-gradient(ellipse at center, #1a0808, #000); }
.lm-overlay--win { background: radial-gradient(ellipse at 50% 40%, rgba(90, 60, 20, 0.5), #050408); }

.lm-menu-inner {
  max-width: 440px;
  text-align: center;
}

.lm-credit {
  margin: 0 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.55;
}

.lm-title {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 12vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #f0d8a0;
  text-shadow:
    0 0 40px rgba(255, 180, 60, 0.45),
    0 0 80px rgba(255, 120, 40, 0.25);
}

.lm-tagline {
  margin: 12px 0 20px;
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: rgba(255, 220, 170, 0.85);
}

.lm-blurb {
  margin: 0 0 28px;
  line-height: 1.55;
  font-size: 0.92rem;
  opacity: 0.85;
}

.lm-controls, .lm-hub {
  margin: 16px 0 0;
  font-size: 0.78rem;
  opacity: 0.55;
}

.lm-hub a { color: #c8a070; }

.lm-btn {
  display: inline-block;
  margin: 6px 4px;
  padding: 12px 28px;
  border: 1px solid rgba(240, 200, 120, 0.35);
  border-radius: 2px;
  background: rgba(30, 22, 14, 0.9);
  color: #f0e0c0;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.lm-btn--primary {
  background: linear-gradient(180deg, #8a5a20, #5a3410);
  border-color: rgba(255, 200, 100, 0.5);
  box-shadow: 0 0 28px rgba(255, 160, 40, 0.25);
}

.lm-btn:hover {
  box-shadow: 0 0 36px rgba(255, 180, 60, 0.4);
}

.lm-menu-inner h2 {
  font-family: 'Cinzel', serif;
  margin: 0 0 20px;
}

.lm-end-dead { color: #c04040; }
.lm-end-win {
  color: #f0d080;
  text-shadow: 0 0 30px rgba(255, 180, 60, 0.4);
}
