/* Estilos para la leyenda de colores */
.color-legend {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(15, 25, 35, 0.9);
    border: 3px solid #ff4655;
    border-radius: 10px;
    padding: 15px;
    color: white;
    font-family: 'Tungsten', sans-serif;
    font-size: 1.1rem;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    min-width: 220px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.legend-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #ff4655;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255, 70, 85, 0.6);
    border-bottom: 2px solid rgba(255, 70, 85, 0.7);
    padding-bottom: 8px;
    font-weight: bold;
}

.legend-items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.legend-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

.legend-item span {
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.color-box {
    width: 28px;
    height: 28px;
    margin-right: 15px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
}

.legend-item:hover .color-box {
    transform: scale(1.1);
}

.color-box.match {
    background-color: #4CAF50;
}

.color-box.partial-match {
    background-color: #FFC107;
}

.color-box.no-match {
    background-color: #ff4655;
}

/* Estilos para la leyenda de agentes con flechas */
.agent-legend-item {
    position: relative;
}

.arrow-indicator {
    margin-left: 10px;
    font-size: 1.4rem;
    color: #ff4655;
}

/* Responsive */
@media (max-width: 768px) {
    .color-legend {
        padding: 12px;
        font-size: 1rem;
        min-width: 200px;
        bottom: 15px;
        right: 15px;
    }
    
    .legend-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .legend-item {
        padding: 6px;
    }
    
    .legend-item span {
        font-size: 1.1rem;
    }
    
    .color-box {
        width: 24px;
        height: 24px;
        margin-right: 12px;
    }
}

@media (max-width: 480px) {
    .color-legend {
        padding: 10px;
        font-size: 0.9rem;
        min-width: 180px;
        bottom: 10px;
        right: 10px;
    }
    
    .legend-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
        padding-bottom: 5px;
    }
    
    .legend-items-container {
        gap: 6px;
    }
    
    .legend-item {
        padding: 5px;
        margin-bottom: 4px;
    }
    
    .legend-item span {
        font-size: 1rem;
    }
    
    .color-box {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
    
    .arrow-indicator {
        margin-left: 8px;
        font-size: 1.2rem;
    }
}