*{
    margin: 0;
    padding: 0;
    box-sizing: 
    border-box;
    }

    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
       
    }

    /* höhe des Kartencontainers erstellen*/
    #map {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Seitenverhältnis */
    border-radius: 0.75rem;
    position: relative;
   
    }

    /* Beispiel für ein zusätzliches Element */
    .header {
        background-color: #ffffff;
        color: white;
        padding: 15px;
        text-align: center;
        font-family: sans-serif;
    }

    /* Wrapper für die Karte, um die Höhe anzupassen, wenn ein Header da ist */
    .map-container {
        /* Berechnet die Höhe: 100% der Viewport-Höhe minus der Höhe des Headers */
        height: calc(100vh - 50px); 
    }

    /* --- Media Query für kleinere Bildschirme --- */
    /* Wenn der Bildschirm 600px oder schmaler ist */
    @media (max-width: 600px) {
        .header {
            font-size: 1rem; /* Kleinere Schrift auf dem Handy */
            padding: 10px;
        }

        .map-container {
             height: calc(100vh - 44px); /* Höhe an den kleineren Header anpassen */
        }
    }

    /* Styling für die neuen, nicht-skalierenden Hauptstadt-Labels */
    .capital-label {
        background-color: transparent;
        border: none;
        box-shadow: none;
        font-weight: bold;
        font-size: 12px; /* Feste Schriftgröße */
        color: #333;
        text-shadow: 0 0 2px white, 0 0 2px white, 0 0 2px white; /* Verbessert die Lesbarkeit auf dunklem Hintergrund */
    }

    /* --- Styling für das neue Länder-Info-Dialogfeld --- */
    .country-dialog {
        position: fixed;
        top: 57%;
        left: 2%;
        transform: translateY(-50%);
        width: 800px;
        height: 750px;
        background-color: white;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 1001; /* Über der Karte */
        display: none; /* Standardmäßig ausgeblendet */
        flex-direction: column;
        border-top-right-radius: 0.75rem;
        border-bottom-right-radius: 0.75rem;
        border-bottom-left-radius: 0.75rem;
        border-top-left-radius: 0.75rem;
        font-family: sans-serif;
    }
    .dialog-header {
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .dialog-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: #333;
    }
    .close-button {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #9ca3af;
    }
    .dialog-content {
        flex-grow: 1;
        padding: 1rem;
        overflow-y: auto;
    }

    /* --- Styling für das neue Länder-Info-Dialogfeld --- */
    .country-dialog {
        position: fixed;
        top: 57%;
        left: 2%;
        transform: translateY(-50%);
        width: 800px;
        height: 750px;
        background-color: white;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 1001; /* Über der Karte */
        display: none; /* Standardmäßig ausgeblendet */
        flex-direction: column;
        border-radius: 0.75rem;
        font-family: sans-serif;
    }

.character-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Stellt sicher, dass der Dialog über der Karte liegt */
}

.character-dialog-content {
    background-color: #2577a3;
    padding: 20px 40px;
    border-radius: 50px;
    text-align: center;
    opacity: 0.9;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.character-options-container {
    
    display: flex;
    gap: 20px;
    margin-top: 0px;
    margin-left: -10px;
    margin-right: -10px;
}

.character-options-container img {
    width: 300px;
    height: 600px;
    cursor: pointer;
    border: 3px solid transparent;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s, border-color 0.2s;
}

.character-options-container img:hover {
    transform: scale(1.1);
    
}

/* --- Styling für das Sprachauswahl-Intro --- */
.language-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Höherer z-index, um über allem zu liegen */
}

.language-selection-content {
    background-color: #2c3e50;
    color: white;
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.language-selection-content h2 {
    margin-bottom: 25px;
    font-family: sans-serif;
}

.language-options-container button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 0 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.language-options-container button:hover {
    background-color: #2980b9;
}

/* --- Fix für Charakter-Icon Interaktion --- */
/* Erzwingt, dass die Charakter-Icons immer den höchsten z-index haben, 
   um Interaktionsprobleme mit den Länder-Layern zu vermeiden. */
.leaflet-pane.leaflet-characterPane .leaflet-marker-icon {
    z-index: 3001 !important;
}
