body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background-color: #1a1a1a;
    color: #f0f0f0;
}

#map {
    height: 100%;
    width: 100%;
    background-color: #333;
}

/* Leaflet dark theme for tiles */
.leaflet-tile {
    filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

.country-polygon {
    stroke: #ccc;
    stroke-width: 0.5;
    fill-opacity: 0.6;
    transition: fill 0.5s ease, fill-opacity 0.5s ease;
}

.country-polygon:hover {
    fill-opacity: 0.8;
}

#ui-container {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Allow map interaction through the container */
}

#controls {
    background: rgba(0, 0, 0, 0.75);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #444;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    pointer-events: all; /* Enable interaction for controls */
    max-width: 800px;
    margin: 0 auto;
}

#controls button {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 14px;
}

#controls button:hover {
    background-color: #555;
}

#controls button:active {
    transform: scale(0.95);
}

#news-panel {
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 15px;
    max-width: 800px;
    margin: 0 auto;
    pointer-events: all; /* Enable interaction for news panel */
    color: #ffd700; /* Gold color for text */
}

#news-panel h2 {
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 1.2em;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

#news-ticker-container {
    height: 60px; /* Fixed height for 3 lines of text */
    overflow: hidden;
    position: relative;
}

#news-ticker {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    width: 100%;
}

#news-ticker li {
    line-height: 1.25em;
    font-size: 0.9em;
    padding-bottom: 5px;
}

/* --- Modal Styles --- */
#war-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#war-prompt-modal.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

#modal-content {
    background: #1a1a1a;
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 20px 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1);
    transition: transform 0.3s ease;
}

#war-prompt-modal.modal-hidden #modal-content {
    transform: scale(0.9);
}

#modal-title {
    color: #ff4500; /* Orangey-Red */
    margin-top: 0;
}

#modal-text {
    margin-bottom: 25px;
    line-height: 1.6;
}

#modal-begin-button {
    background-color: #B22222; /* FireBrick */
    color: #fff;
    border: 1px solid #ff4500;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

#modal-begin-button:hover {
    background-color: #DC143C; /* Crimson */
}

#modal-begin-button:active {
    transform: scale(0.97);
}

/* --- Animation for Conflict Zones --- */
.conflict-zone-animation {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        fill: #FFA500; /* Orange */
        fill-opacity: 0.7;
    }
    50% {
        fill: #FF0000; /* Red */
        fill-opacity: 0.9;
    }
    100% {
        fill: #FFA500; /* Orange */
        fill-opacity: 0.7;
    }
}