html, body {
    height: 100%; margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #333; color: white;
    overflow: hidden;
}

#map {
    width: 100vw; height: 100vh;
}

.overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center; z-index: 1000;
}

.overlay h1 { font-size: 3em; margin-bottom: 20px; }
.overlay p { font-size: 1.2em; max-width: 600px; margin: 0 auto 30px auto; }
.overlay button {
    font-size: 1.5em; padding: 15px 30px; border: none;
    border-radius: 8px; background-color: #4CAF50;
    color: white; cursor: pointer; transition: background-color 0.3s;
}
.overlay button:hover { background-color: #45a049; }

#top-right-ui {
    position: absolute; top: 20px; right: 20px;
    z-index: 999; background-color: rgba(0,0,0,0.5);
    padding: 10px 15px; border-radius: 8px;
    font-size: 1.5em; text-align: right;
}

#controls-display {
    font-size: 0.8em; margin-top: 5px; color: #ccc;
}

/* ★ NEU: Stile für die Lebens-Anzeige und die Herz-Icons */
#lives-display {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Richtet die Herzen rechtsbündig aus */
    height: 35px; /* Feste Höhe für bessere Ausrichtung */
}

#lives-display::before {
    content: "Leben: ";
    margin-right: 5px;
}

#lives-display img {
    width: 30px;
    height: 30px;
    margin-left: 5px;
}

#message-overlay {
    position: absolute; bottom: 10%; left: 50%;
    transform: translateX(-50%); z-index: 999;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333; padding: 20px; border-radius: 10px;
    font-size: 1.8em; font-weight: bold; text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    pointer-events: none;
}

#message-overlay.visible {
    opacity: 1; transform: translateX(-50%) translateY(-20px);
}

.hidden { display: none; }