diff --git a/node/server/public/app.js b/node/server/public/app.js index 6721e3c..2b26e0a 100644 --- a/node/server/public/app.js +++ b/node/server/public/app.js @@ -411,30 +411,56 @@ async function spawnSpirit(spiritData) { updateSpiritOverlay(spiritData); } -// ---- Overlay für Spirit-Infos ---- -function updateSpiritOverlay(spirit) { +// ---- Overlay-Logik ---- +let lastOverlaySpiritData = null; + +// Overlay zentriert in der Mitte mit Schließen-X +function showSpiritOverlay(spirit) { let el = document.getElementById('spirit-info'); if (!el) { el = document.createElement('div'); el.id = 'spirit-info'; el.style = ` - position:absolute; right:40px; bottom:40px; color:white; - background:rgba(0,0,0,0.6); padding:10px 18px; border-radius:10px; - font-family: sans-serif; z-index:10; max-width: 360px; + position: fixed; + left: 50%; top: 50%; + transform: translate(-50%,-50%); + color: white; + background: rgba(0,0,0,0.87); + padding: 24px 32px 20px 32px; + border-radius: 16px; + font-family: 'Segoe UI', sans-serif; + z-index: 9999; + max-width: 540px; + min-width: 300px; + box-shadow: 0 6px 48px #000a; + text-align: left; `; document.body.appendChild(el); } el.innerHTML = ` -