/* Grund-Reset: alles randlos, dunkler Hintergrund */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
body {
  font-family: "Courier New", monospace;
  color: #e9dfa8;
  cursor: default;
  -webkit-user-select: none; user-select: none;
  touch-action: none; /* verhindert Scroll-Gesten auf dem Handy */
}

/* Canvas füllt den Bildschirm; intern wird klein gerendert und hier hochskaliert.
   image-rendering: pixelated hält den Look scharf-pixelig und ist schnell. */
#view {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #1a1608;
}

.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: 10px; left: 12px;
  font-size: 13px; line-height: 1.5;
  text-shadow: 0 0 4px #000, 0 1px 2px #000;
  opacity: 0.85; pointer-events: none;
}
#seedline { opacity: 0.6; }

#hints {
  position: fixed; bottom: 40px; left: 0; right: 0;
  text-align: center; font-size: 14px;
  text-shadow: 0 0 6px #000;
  opacity: 0.9; pointer-events: none;
  transition: opacity 2s ease;
}
#hints p { margin: 3px 0; }

/* Easter-Egg-Text mittig eingeblendet */
#sign {
  position: fixed; top: 46%; left: 0; right: 0;
  text-align: center; font-size: 20px; letter-spacing: 1px;
  color: #fff3c0; text-shadow: 0 0 10px #000, 0 0 20px #7a6a00;
  pointer-events: none;
}

/* ---------- Overlays (Start / 404) ---------- */
.overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #2a2408 0%, #050400 90%);
  z-index: 20;
}
.panel { text-align: center; max-width: 520px; padding: 24px; }
.panel h1 { font-size: 46px; letter-spacing: 2px; margin-bottom: 18px; color: #f2e79a; }
.panel h1 span { color: #b7a52e; }
.panel h1.err { color: #c9452e; font-size: 90px; text-shadow: 0 0 30px #5a0f00; }
.panel p { margin: 10px 0; line-height: 1.5; color: #d8ce97; }
.panel p.small { font-size: 12px; opacity: 0.6; margin-top: 22px; }
.panel button {
  margin-top: 18px; padding: 12px 26px;
  font-family: inherit; font-size: 16px;
  color: #1a1600; background: #d9c74a; border: none; border-radius: 3px;
  cursor: pointer; transition: background 0.15s;
}
.panel button:hover { background: #efdd66; }

/* ---------- Touch-Steuerung ---------- */
#touch { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.joybase {
  position: absolute; left: 26px; bottom: 26px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(220,200,90,0.08); border: 1px solid rgba(220,200,90,0.25);
  pointer-events: auto;
}
.joystick {
  position: absolute; left: 35px; top: 35px;
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(220,200,90,0.35);
}
.lookpad {
  position: absolute; right: 0; top: 0;
  width: 55%; height: 100%;
  pointer-events: auto;
}

/* ---------- Barrierefreiheit: weniger Bewegung ----------
   Das Flackern wird zusätzlich im JS reduziert; hier dämpfen wir Übergänge. */
@media (prefers-reduced-motion: reduce) {
  #hints { transition: none; }
}
