/* css/map.css - Grafica Mappa e Modali */

.map-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.map-header h3 { color: var(--primary); font-family: 'Orbitron', sans-serif; font-size: 1.2rem; }

.map-legend { display: flex; gap: 15px; background: rgba(0,0,0,0.5); padding: 8px 15px; border-radius: 20px; border: 1px solid var(--border); }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-muted); }
.legend-color { width: 10px; height: 10px; border-radius: 50%; }

.legend-color.marker-player { background: var(--primary); box-shadow: 0 0 5px var(--primary); }
.legend-color.marker-ally1 { background: var(--success); }
.legend-color.marker-ally2 { background: var(--error); }
.legend-color.marker-conflict { background: var(--secondary); box-shadow: 0 0 5px var(--secondary); }

/* GRIGLIA ALLINEATA ALL'IMMAGINE IKARIAM */
#map-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(100, 1fr);
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid var(--border);
    background-image: url('../img/map_background.jpg');
    background-size: 100% 100%; /* FONDAMENTALE */
    padding: 5.4%; /* FONDAMENTALE PER CENTRARE I PALLINI SUL MARE */
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.city-marker {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    margin: auto;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.2s;
}
.city-marker:hover { transform: scale(2.5); border-color: white; z-index: 10; }

.city-marker.marker-player { background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.city-marker.marker-conflict { background: var(--secondary); box-shadow: 0 0 8px var(--secondary); }
.city-marker.marker-ally1 { background: var(--success); }
.city-marker.marker-ally2 { background: var(--error); }

#map-tooltip {
    position: absolute;
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 15px;
    z-index: 2000;
    min-width: 250px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

/* Modali (Pop-up) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%; max-width: 800px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px; margin-bottom: 15px;
}
.close-modal {
    background: transparent; border: none;
    color: var(--text-muted); font-size: 2rem;
    cursor: pointer;
}
.close-modal:hover { color: var(--error); }