.legend-container {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    min-width: 250px;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.3);
}

.legend-title {
    font-size: 18px;
    color: white;
    font-style: bold;
    margin-bottom: 10px;
    text-align: center;
}

.legend-items {
    margin-bottom: 15px;
}

.legend-item {
    flex-direction: row;
    align-items: center;
    margin-bottom: 5px;
}

.color-box {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.5);
}

.legend-text {
    color: white;
    font-size: 14px;
    flex-grow: 1;
}

.controls-info {
    border-top-width: 1px;
    border-top-color: rgba(255, 255, 255, 0.3);
    padding-top: 10px;
}

.controls-title {
    font-size: 16px;
    color: white;
    font-style: bold;
    margin-bottom: 5px;
}

.controls-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 2px;
}

/* Color definitions matching your WorldMapGenerator colors */
.ocean-color {
    background-color: rgb(0, 0, 255); /* Blue */
}

.river-color {
    background-color: rgb(0, 255, 255); /* Cyan */
}

.plain-color {
    background-color: rgb(0, 128, 0); /* Green */
}

.forest-color {
    background-color: rgb(51, 179, 51); /* Dark green (0.2, 0.7, 0.2) */
}

.mountain-color {
    background-color: rgb(128, 128, 128); /* Gray */
}

.town-color {
    background-color: rgb(204, 102, 51); /* Orange-brown (0.8, 0.4, 0.2) */
}

.village-color {
    background-color: rgb(230, 179, 102); /* Light brown (0.9, 0.7, 0.4) */
}

.road-color {
    background-color: rgb(153, 128, 77); /* Brown (0.6, 0.5, 0.3) */
}

.dock-color {
    background-color: rgb(102, 77, 51); /* Dark brown (0.4, 0.3, 0.2) */
}
